summary refs log tree commit diff
path: root/pkgs/applications/networking/cluster/werf/default.nix
diff options
context:
space:
mode:
authorAzat Bahawi <azat@bahawi.net>2022-09-07 01:31:30 +0300
committerAzat Bahawi <azat@bahawi.net>2022-09-15 21:33:31 +0300
commit18eba591805ea1f655cc4cc1efa83276b57b58ad (patch)
tree652f085b71a2d740d75bc3023cc9970d7679111e /pkgs/applications/networking/cluster/werf/default.nix
parent454887a35de6317a30be284e8adc2d2f6d8a07c4 (diff)
downloadnixpkgs-18eba591805ea1f655cc4cc1efa83276b57b58ad.tar
nixpkgs-18eba591805ea1f655cc4cc1efa83276b57b58ad.tar.gz
nixpkgs-18eba591805ea1f655cc4cc1efa83276b57b58ad.tar.bz2
nixpkgs-18eba591805ea1f655cc4cc1efa83276b57b58ad.tar.lz
nixpkgs-18eba591805ea1f655cc4cc1efa83276b57b58ad.tar.xz
nixpkgs-18eba591805ea1f655cc4cc1efa83276b57b58ad.tar.zst
nixpkgs-18eba591805ea1f655cc4cc1efa83276b57b58ad.zip
werf: 1.2.168 -> 1.2.173
Diffstat (limited to 'pkgs/applications/networking/cluster/werf/default.nix')
-rw-r--r--pkgs/applications/networking/cluster/werf/default.nix18
1 files changed, 11 insertions, 7 deletions
diff --git a/pkgs/applications/networking/cluster/werf/default.nix b/pkgs/applications/networking/cluster/werf/default.nix
index d7f9dc7bf89..4eff84ea5e8 100644
--- a/pkgs/applications/networking/cluster/werf/default.nix
+++ b/pkgs/applications/networking/cluster/werf/default.nix
@@ -4,30 +4,31 @@
 , fetchFromGitHub
 , installShellFiles
 , btrfs-progs
-, glibc
 , testers
 , werf
 }:
 
 buildGoModule rec {
   pname = "werf";
-  version = "1.2.168";
+  version = "1.2.173";
 
   src = fetchFromGitHub {
     owner = "werf";
     repo = "werf";
     rev = "v${version}";
-    hash = "sha256-/Shmnnpme1ffN7GMTryb4ddPlcAsruyWhFdjr1PJ3HM=";
+    hash = "sha256-jbV2pQSFq/E++eOyQwB0ssG2R9mm3sprlm5mFfHJsBA=";
   };
 
-  vendorHash = "sha256-E5yDk48O7zze8QTeLQ999QmB8XLkpKNZ8JQ2wVRMGCU=";
+  vendorHash = "sha256-NHRPl38/R7yS8Hht118mBc+OBPwfYiHOaGIwryNK8Mo=";
 
   proxyVendor = true;
 
   subPackages = [ "cmd/werf" ];
 
   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;
 
@@ -36,7 +37,7 @@ buildGoModule rec {
     "-w"
     "-X github.com/werf/werf/pkg/werf.Version=${src.rev}"
   ] ++ lib.optionals stdenv.isLinux [
-    "-extldflags=-static"
+    "-extldflags '-static'"
     "-linkmode external"
   ];
 
@@ -61,6 +62,9 @@ buildGoModule rec {
       integration/suites \
       pkg/true_git/*test.go \
       test/e2e
+  '' + lib.optionalString (CGO_ENABLED == 0) ''
+    # A workaround for osusergo.
+    export USER=nixbld
   '';
 
   postInstall = ''
@@ -72,7 +76,7 @@ buildGoModule rec {
   passthru.tests.version = testers.testVersion {
     package = werf;
     command = "werf version";
-    version = "v${version}";
+    version = src.rev;
   };
 
   meta = with lib; {