Merge pull request #189893 from azahi/werf169
This commit is contained in:
commit
f756c1e3bf
1 changed files with 11 additions and 7 deletions
|
@ -4,30 +4,31 @@
|
||||||
, fetchFromGitHub
|
, fetchFromGitHub
|
||||||
, installShellFiles
|
, installShellFiles
|
||||||
, btrfs-progs
|
, btrfs-progs
|
||||||
, glibc
|
|
||||||
, testers
|
, testers
|
||||||
, werf
|
, werf
|
||||||
}:
|
}:
|
||||||
|
|
||||||
buildGoModule rec {
|
buildGoModule rec {
|
||||||
pname = "werf";
|
pname = "werf";
|
||||||
version = "1.2.168";
|
version = "1.2.173";
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "werf";
|
owner = "werf";
|
||||||
repo = "werf";
|
repo = "werf";
|
||||||
rev = "v${version}";
|
rev = "v${version}";
|
||||||
hash = "sha256-/Shmnnpme1ffN7GMTryb4ddPlcAsruyWhFdjr1PJ3HM=";
|
hash = "sha256-jbV2pQSFq/E++eOyQwB0ssG2R9mm3sprlm5mFfHJsBA=";
|
||||||
};
|
};
|
||||||
|
|
||||||
vendorHash = "sha256-E5yDk48O7zze8QTeLQ999QmB8XLkpKNZ8JQ2wVRMGCU=";
|
vendorHash = "sha256-NHRPl38/R7yS8Hht118mBc+OBPwfYiHOaGIwryNK8Mo=";
|
||||||
|
|
||||||
proxyVendor = true;
|
proxyVendor = true;
|
||||||
|
|
||||||
subPackages = [ "cmd/werf" ];
|
subPackages = [ "cmd/werf" ];
|
||||||
|
|
||||||
nativeBuildInputs = [ installShellFiles ];
|
nativeBuildInputs = [ installShellFiles ];
|
||||||
buildInputs = lib.optionals stdenv.isLinux [ btrfs-progs glibc.static ];
|
|
||||||
|
buildInputs = lib.optionals stdenv.isLinux [ btrfs-progs ]
|
||||||
|
++ lib.optionals stdenv.hostPlatform.isGnu [ stdenv.cc.libc.static ];
|
||||||
|
|
||||||
CGO_ENABLED = if stdenv.isLinux then 1 else 0;
|
CGO_ENABLED = if stdenv.isLinux then 1 else 0;
|
||||||
|
|
||||||
|
@ -36,7 +37,7 @@ buildGoModule rec {
|
||||||
"-w"
|
"-w"
|
||||||
"-X github.com/werf/werf/pkg/werf.Version=${src.rev}"
|
"-X github.com/werf/werf/pkg/werf.Version=${src.rev}"
|
||||||
] ++ lib.optionals stdenv.isLinux [
|
] ++ lib.optionals stdenv.isLinux [
|
||||||
"-extldflags=-static"
|
"-extldflags '-static'"
|
||||||
"-linkmode external"
|
"-linkmode external"
|
||||||
];
|
];
|
||||||
|
|
||||||
|
@ -61,6 +62,9 @@ buildGoModule rec {
|
||||||
integration/suites \
|
integration/suites \
|
||||||
pkg/true_git/*test.go \
|
pkg/true_git/*test.go \
|
||||||
test/e2e
|
test/e2e
|
||||||
|
'' + lib.optionalString (CGO_ENABLED == 0) ''
|
||||||
|
# A workaround for osusergo.
|
||||||
|
export USER=nixbld
|
||||||
'';
|
'';
|
||||||
|
|
||||||
postInstall = ''
|
postInstall = ''
|
||||||
|
@ -72,7 +76,7 @@ buildGoModule rec {
|
||||||
passthru.tests.version = testers.testVersion {
|
passthru.tests.version = testers.testVersion {
|
||||||
package = werf;
|
package = werf;
|
||||||
command = "werf version";
|
command = "werf version";
|
||||||
version = "v${version}";
|
version = src.rev;
|
||||||
};
|
};
|
||||||
|
|
||||||
meta = with lib; {
|
meta = with lib; {
|
||||||
|
|
Loading…
Reference in a new issue