43 lines
1.2 KiB
Nix
43 lines
1.2 KiB
Nix
{ lib, buildGoModule, fetchFromGitHub, coreutils }:
|
|
|
|
buildGoModule rec {
|
|
pname = "kopia";
|
|
version = "0.7.0";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = pname;
|
|
repo = pname;
|
|
rev = "v${version}";
|
|
sha256 = "0k0d9fb9f7zfyh7lifaviz8xnx1ansnh1f4q0rhc547m1y4kdw46";
|
|
};
|
|
|
|
vendorSha256 = "0br641lh2bqz18p5riv6dh01kr11vbbnrn4i5r80b0lgjy1774sl";
|
|
|
|
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 ];
|
|
};
|
|
}
|