mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-18 15:56:50 +01:00
doppler: fix build failure with shell completion (#326008)
Sets the HOME environment variable to a temporary dir, as the cli attempts to run a setup routine which creates a directory under the user's home Fixes #325915 also fix cross-compilation
This commit is contained in:
parent
0dec852e05
commit
1049aef047
1 changed files with 4 additions and 0 deletions
|
@ -4,6 +4,7 @@
|
|||
, installShellFiles
|
||||
, lib
|
||||
, testers
|
||||
, stdenv
|
||||
}:
|
||||
|
||||
buildGoModule rec {
|
||||
|
@ -28,6 +29,9 @@ buildGoModule rec {
|
|||
|
||||
postInstall = ''
|
||||
mv $out/bin/cli $out/bin/doppler
|
||||
'' + lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) ''
|
||||
export HOME=$TMPDIR
|
||||
mkdir $HOME/.doppler # to avoid race conditions below
|
||||
installShellCompletion --cmd doppler \
|
||||
--bash <($out/bin/doppler completion bash) \
|
||||
--fish <($out/bin/doppler completion fish) \
|
||||
|
|
Loading…
Reference in a new issue