From 2ff2298f0799621d483e84716c834204a25a7fe6 Mon Sep 17 00:00:00 2001 From: Jonathan Ringer Date: Mon, 28 Jun 2021 14:22:31 -0700 Subject: [PATCH] vault: wrap with gawk glibc Binary will shell out awk and getent (cherry picked from commit 8161c0930504be8c30c51fa36374d751d3850b03) --- pkgs/tools/security/vault/default.nix | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/pkgs/tools/security/vault/default.nix b/pkgs/tools/security/vault/default.nix index eb5ac31d300..f00136d041f 100644 --- a/pkgs/tools/security/vault/default.nix +++ b/pkgs/tools/security/vault/default.nix @@ -1,4 +1,8 @@ -{ lib, fetchFromGitHub, buildGoPackage, installShellFiles, nixosTests }: +{ lib, fetchFromGitHub, buildGoPackage, installShellFiles, nixosTests +, makeWrapper +, gawk +, glibc +}: buildGoPackage rec { pname = "vault"; @@ -15,13 +19,16 @@ buildGoPackage rec { subPackages = [ "." ]; - nativeBuildInputs = [ installShellFiles ]; + nativeBuildInputs = [ installShellFiles makeWrapper ]; buildFlagsArray = [ "-tags=vault" "-ldflags=-s -w -X ${goPackagePath}/sdk/version.GitCommit=${src.rev}" ]; postInstall = '' echo "complete -C $out/bin/vault vault" > vault.bash installShellCompletion vault.bash + + wrapProgram $out/bin/vault \ + --prefix PATH ${lib.makeBinPath [ gawk glibc ]} ''; passthru.tests.vault = nixosTests.vault;