treewide: use $out instead of $bin with buildGoPackage

This commit is contained in:
zowoq
2020-04-28 20:30:29 +10:00
parent c59c4e3589
commit b5dc07a4b4
88 changed files with 153 additions and 164 deletions
@@ -24,10 +24,10 @@ buildGoPackage rec {
postInstall = ''
# Fix binary name
mv $bin/bin/{agent,buildkite-agent}
mv $out/bin/{agent,buildkite-agent}
# These are runtime dependencies
wrapProgram $bin/bin/buildkite-agent \
wrapProgram $out/bin/buildkite-agent \
--prefix PATH : '${stdenv.lib.makeBinPath [ openssh git coreutils gnused gnugrep ]}'
'';
@@ -15,17 +15,17 @@ buildGoPackage {
postInstall = ''
${stdenv.lib.optionalString hasBootstrapScript ''
# Install bootstrap.sh
mkdir -p $bin/libexec/buildkite-agent
cp $NIX_BUILD_TOP/go/src/${goPackagePath}/templates/bootstrap.sh $bin/libexec/buildkite-agent
sed -e "s|#!/bin/bash|#!${bash}/bin/bash|g" -i $bin/libexec/buildkite-agent/bootstrap.sh
mkdir -p $out/libexec/buildkite-agent
cp $NIX_BUILD_TOP/go/src/${goPackagePath}/templates/bootstrap.sh $out/libexec/buildkite-agent
sed -e "s|#!/bin/bash|#!${bash}/bin/bash|g" -i $out/libexec/buildkite-agent/bootstrap.sh
''}
# Fix binary name
mv $bin/bin/{agent,buildkite-agent}
mv $out/bin/{agent,buildkite-agent}
# These are runtime dependencies
wrapProgram $bin/bin/buildkite-agent \
${stdenv.lib.optionalString hasBootstrapScript "--set BUILDKITE_BOOTSTRAP_SCRIPT_PATH $bin/libexec/buildkite-agent/bootstrap.sh"} \
wrapProgram $out/bin/buildkite-agent \
${stdenv.lib.optionalString hasBootstrapScript "--set BUILDKITE_BOOTSTRAP_SCRIPT_PATH $out/libexec/buildkite-agent/bootstrap.sh"} \
--prefix PATH : '${stdenv.lib.makeBinPath [ openssh git coreutils gnused gnugrep ]}'
'';