Merge pull request #129447 from eraserhd/fix-broken-vault-darwin

This commit is contained in:
Sandro 2021-07-07 02:02:22 +02:00 committed by GitHub
commit 3e03b1eb46
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 , makeWrapper
, gawk , gawk
, glibc , glibc
@ -26,7 +26,7 @@ buildGoPackage rec {
postInstall = '' postInstall = ''
echo "complete -C $out/bin/vault vault" > vault.bash echo "complete -C $out/bin/vault vault" > vault.bash
installShellCompletion vault.bash installShellCompletion vault.bash
'' + lib.optionalString stdenv.isLinux ''
wrapProgram $out/bin/vault \ wrapProgram $out/bin/vault \
--prefix PATH ${lib.makeBinPath [ gawk glibc ]} --prefix PATH ${lib.makeBinPath [ gawk glibc ]}
''; '';

View file

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