From d4b439c5233752f9b17426f56cd1e0efaf627e19 Mon Sep 17 00:00:00 2001 From: Luke Granger-Brown Date: Sun, 27 Dec 2020 19:49:02 +0000 Subject: [PATCH] nix/pkgs/pomerium: move envoy zip appending to postFixup phase This ensures that we don't immediately remove it (because strip will otherwise just strip it because it's trailing content). --- nix/pkgs/pomerium.nix | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/nix/pkgs/pomerium.nix b/nix/pkgs/pomerium.nix index fd78c3409e..d4e303eb52 100644 --- a/nix/pkgs/pomerium.nix +++ b/nix/pkgs/pomerium.nix @@ -52,8 +52,11 @@ buildGoModule rec { ''; installPhase = '' - mkdir -p $out/bin - cat $GOPATH/bin/pomerium $NIX_BUILD_TOP/envoy/envoy.zip >$out/bin/pomerium + install -Dm0755 $GOPATH/bin/pomerium $out/bin/pomerium + ''; + postFixup = '' + cat $out/bin/pomerium $NIX_BUILD_TOP/envoy/envoy.zip >$out/bin/pomerium.new + mv $out/bin/pomerium.new $out/bin/pomerium chmod +x $out/bin/pomerium zip --adjust-sfx $out/bin/pomerium '';