3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/pkgs/tools/backup/kopia/default.nix

39 lines
1.1 KiB
Nix
Raw Normal View History

2020-08-01 18:19:33 +01:00
{ lib, buildGoModule, fetchFromGitHub, coreutils }:
buildGoModule rec {
pname = "kopia";
2020-10-13 18:36:57 +01:00
version = "0.7.3";
2020-08-01 18:19:33 +01:00
src = fetchFromGitHub {
owner = pname;
repo = pname;
rev = "v${version}";
2020-10-13 18:36:57 +01:00
sha256 = "1dnk764y71c9k9nghn9q06f2zz9igsvm4z826azil2d58h5d06j6";
2020-08-01 18:19:33 +01:00
};
2020-10-05 15:59:15 +01:00
vendorSha256 = "1mnhq6kn0pn67l55a9k6irmjlprr295218nms3klsk2720syzdwq";
doCheck = false;
2020-08-01 18:19:33 +01:00
subPackages = [ "." ];
2020-08-16 22:04:50 +01:00
buildFlagsArray = ''
-ldflags=
-X github.com/kopia/kopia/repo.BuildVersion=${version}
-X github.com/kopia/kopia/repo.BuildInfo=${src.rev}
'';
2020-08-01 18:19:33 +01:00
postConfigure = ''
# speakeasy hardcodes /bin/stty https://github.com/bgentry/speakeasy/issues/22
substituteInPlace vendor/github.com/bgentry/speakeasy/speakeasy_unix.go \
--replace "/bin/stty" "${coreutils}/bin/stty"
'';
meta = with lib; {
homepage = "https://kopia.io";
description = "Cross-platform backup tool with fast, incremental backups, client-side end-to-end encryption, compression and data deduplication";
license = licenses.asl20;
maintainers = [ maintainers.bbigras ];
};
}