Merge pull request #131977 from NixOS/backport-129447-to-release-21.05

[Backport release-21.05] vault: fix build for darwin
This commit is contained in:
Wael Nasreddine 2021-07-29 23:54:40 -07:00 committed by GitHub
commit 703e32094c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 4 deletions

View File

@ -1,4 +1,4 @@
{ lib, fetchFromGitHub, buildGoPackage, installShellFiles, nixosTests
{ stdenv, lib, fetchFromGitHub, buildGoPackage, installShellFiles, nixosTests
, makeWrapper
, gawk
, glibc
@ -26,7 +26,7 @@ buildGoPackage rec {
postInstall = ''
echo "complete -C $out/bin/vault vault" > vault.bash
installShellCompletion vault.bash
'' + lib.optionalString stdenv.isLinux ''
wrapProgram $out/bin/vault \
--prefix PATH ${lib.makeBinPath [ gawk glibc ]}
'';

View File

@ -40,10 +40,10 @@ in stdenv.mkDerivation {
mkdir -p $out/bin $out/share/bash-completion/completions
mv vault $out/bin
echo "complete -C $out/bin/vault vault" > $out/share/bash-completion/completions/vault
'' + lib.optionalString stdenv.isLinux ''
wrapProgram $out/bin/vault \
--prefix PATH ${lib.makeBinPath [ gawk glibc ]}
'' + ''
runHook postInstall
'';