2020-08-20 17:08:02 +00:00
|
|
|
{ lib, buildGoModule, fetchFromGitHub, coreutils }:
|
|
|
|
|
|
|
|
buildGoModule rec {
|
|
|
|
pname = "kopia";
|
2020-09-25 04:45:31 +00:00
|
|
|
version = "0.7.1";
|
2020-08-20 17:08:02 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = pname;
|
|
|
|
repo = pname;
|
|
|
|
rev = "v${version}";
|
2020-09-25 04:45:31 +00:00
|
|
|
sha256 = "1ngm0vbx6ryks68bp0zarvncc36gbpkkqavxb3sfph9p959b9hif";
|
2020-08-20 17:08:02 +00:00
|
|
|
};
|
|
|
|
|
2020-09-25 04:45:31 +00:00
|
|
|
vendorSha256 = "07p2ka5rbasrgjfd4k2jn0ffshjp39kilz9b714ykyi1qflczr9b";
|
2020-08-20 17:08:02 +00:00
|
|
|
|
|
|
|
doCheck = false;
|
|
|
|
|
|
|
|
subPackages = [ "." ];
|
|
|
|
|
|
|
|
buildFlagsArray = ''
|
|
|
|
-ldflags=
|
|
|
|
-X github.com/kopia/kopia/repo.BuildVersion=${version}
|
|
|
|
-X github.com/kopia/kopia/repo.BuildInfo=${src.rev}
|
|
|
|
'';
|
|
|
|
|
|
|
|
postConfigure = ''
|
|
|
|
# make 'vendor' writable
|
|
|
|
cp -L -r vendor tmp-vendor
|
|
|
|
rm -rf vendor
|
|
|
|
mv tmp-vendor vendor
|
|
|
|
|
|
|
|
# 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 ];
|
|
|
|
};
|
|
|
|
}
|