treewide: use $out instead of $bin with buildGoPackage

This commit is contained in:
zowoq
2020-04-28 11:50:57 +10:00
parent c59c4e3589
commit b5dc07a4b4
88 changed files with 153 additions and 164 deletions

View File

@@ -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 ]}'
'';

View File

@@ -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 ]}'
'';

View File

@@ -35,10 +35,10 @@ buildGoPackage rec {
patches = [ ./fix-shell-path.patch ];
postInstall = ''
touch $bin/bin/hello
install -d $bin/bin/helper-images
ln -sf ${docker_x86_64} $bin/bin/helper-images/prebuilt-x86_64.tar.xz
ln -sf ${docker_arm} $bin/bin/helper-images/prebuilt-arm.tar.xz
touch $out/bin/hello
install -d $out/bin/helper-images
ln -sf ${docker_x86_64} $out/bin/helper-images/prebuilt-x86_64.tar.xz
ln -sf ${docker_arm} $out/bin/helper-images/prebuilt-arm.tar.xz
'';
meta = with lib; {