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

@ -29,8 +29,8 @@ buildGoPackage rec {
''; '';
installPhase = '' installPhase = ''
mkdir -pv $bin/bin mkdir -pv $out/bin
cp -v dcrwallet $bin/bin cp -v dcrwallet $out/bin
''; '';

View file

@ -21,8 +21,8 @@ buildGoPackage rec {
''; '';
installPhase = '' installPhase = ''
mkdir -pv $bin/bin mkdir -pv $out/bin
cp -v build/bin/geth build/bin/bootnode build/bin/swarm $bin/bin cp -v build/bin/geth build/bin/bootnode build/bin/swarm $out/bin
''; '';
meta = with stdenv.lib; { meta = with stdenv.lib; {

View file

@ -8,7 +8,7 @@ buildGoPackage rec {
nativeBuildInputs = [ makeWrapper ]; nativeBuildInputs = [ makeWrapper ];
postInstall = '' postInstall = ''
wrapProgram "$bin/bin/overmind" --prefix PATH : "${lib.makeBinPath [ tmux which ]}" wrapProgram "$out/bin/overmind" --prefix PATH : "${lib.makeBinPath [ tmux which ]}"
''; '';
src = fetchFromGitHub { src = fetchFromGitHub {

View file

@ -126,8 +126,8 @@ let
installPhase = '' installPhase = ''
pushd go/src/${goPackagePath} pushd go/src/${goPackagePath}
mkdir -p "$bin/bin" mkdir -p "$out/bin"
install -m 0755 -t "$bin/bin" ./bin/* install -m 0755 -t "$out/bin" ./bin/*
popd popd
''; '';
@ -181,8 +181,8 @@ let
installPhase = '' installPhase = ''
pushd go/src/${goPackagePath} pushd go/src/${goPackagePath}
mkdir -p "$bin/bin" mkdir -p "$out/bin"
install -m 0755 -t "$bin/bin" ./dist/artifacts/k3s install -m 0755 -t "$out/bin" ./dist/artifacts/k3s
popd popd
''; '';

View file

@ -16,7 +16,7 @@ buildGoPackage rec {
nativeBuildInputs = [ installShellFiles ]; nativeBuildInputs = [ installShellFiles ];
postInstall = '' postInstall = ''
for shell in bash zsh; do for shell in bash zsh; do
$bin/bin/kompose completion $shell > kompose.$shell $out/bin/kompose completion $shell > kompose.$shell
installShellCompletion kompose.$shell installShellCompletion kompose.$shell
done done
''; '';

View file

@ -34,7 +34,7 @@ let
postInstall = '' postInstall = ''
for shell in bash zsh; do for shell in bash zsh; do
$bin/bin/kops completion $shell > kops.$shell $out/bin/kops completion $shell > kops.$shell
installShellCompletion kops.$shell installShellCompletion kops.$shell
done done
''; '';

View file

@ -48,7 +48,7 @@ in buildGoPackage rec {
''; '';
postInstall = '' postInstall = ''
wrapProgram "$bin/bin/minishift" \ wrapProgram "$out/bin/minishift" \
--prefix PATH ':' '${lib.makeBinPath [ docker-machine-kvm openshift ]}' --prefix PATH ':' '${lib.makeBinPath [ docker-machine-kvm openshift ]}'
''; '';

View file

@ -72,8 +72,8 @@ in buildGoPackage rec {
''; '';
installPhase = '' installPhase = ''
mkdir -p $bin/bin mkdir -p $out/bin
cp -a "_output/local/bin/$(go env GOOS)/$(go env GOARCH)/"* "$bin/bin/" cp -a "_output/local/bin/$(go env GOOS)/$(go env GOARCH)/"* "$out/bin/"
installShellCompletion --bash contrib/completions/bash/* installShellCompletion --bash contrib/completions/bash/*
installShellCompletion --zsh contrib/completions/zsh/* installShellCompletion --zsh contrib/completions/zsh/*
''; '';

View file

@ -20,7 +20,7 @@ buildGoPackage rec {
nativeBuildInputs = [ installShellFiles ]; nativeBuildInputs = [ installShellFiles ];
postInstall = postInstall =
let stern = if isCrossBuild then buildPackages.stern else "$bin"; in let stern = if isCrossBuild then buildPackages.stern else "$out"; in
'' ''
for shell in bash zsh; do for shell in bash zsh; do
${stern}/bin/stern --completion $shell > stern.$shell ${stern}/bin/stern --completion $shell > stern.$shell

View file

@ -26,7 +26,7 @@ let
postInstall = '' postInstall = ''
# remove all plugins, they are part of the main binary now # remove all plugins, they are part of the main binary now
for i in $bin/bin/*; do for i in $out/bin/*; do
if [[ $(basename $i) != terraform ]]; then if [[ $(basename $i) != terraform ]]; then
rm "$i" rm "$i"
fi fi
@ -88,7 +88,7 @@ let
buildCommand = '' buildCommand = ''
mkdir -p $out/bin/ mkdir -p $out/bin/
makeWrapper "${terraform.bin}/bin/terraform" "$out/bin/terraform" \ makeWrapper "${terraform}/bin/terraform" "$out/bin/terraform" \
--set NIX_TERRAFORM_PLUGIN_DIR "${ --set NIX_TERRAFORM_PLUGIN_DIR "${
buildEnv { buildEnv {
name = "tf-plugin-env"; name = "tf-plugin-env";

View file

@ -23,7 +23,7 @@ buildGoPackage rec {
''; '';
postInstall = '' postInstall = ''
wrapProgram $bin/bin/terragrunt \ wrapProgram $out/bin/terragrunt \
--set TERRAGRUNT_TFPATH ${lib.getBin terraform.full}/bin/terraform --set TERRAGRUNT_TFPATH ${lib.getBin terraform.full}/bin/terraform
''; '';

View file

@ -15,7 +15,7 @@ buildGoPackage rec {
subPackages = [ "." ]; subPackages = [ "." ];
outputs = [ "bin" "out" "man" ]; outputs = [ "out" "man" ];
nativeBuildInputs = [ installShellFiles ]; nativeBuildInputs = [ installShellFiles ];
@ -23,7 +23,7 @@ buildGoPackage rec {
let let
rcloneBin = rcloneBin =
if stdenv.buildPlatform == stdenv.hostPlatform if stdenv.buildPlatform == stdenv.hostPlatform
then "$bin" then "$out"
else stdenv.lib.getBin buildPackages.rclone; else stdenv.lib.getBin buildPackages.rclone;
in in
'' ''

View file

@ -36,7 +36,7 @@ buildGoPackage {
installPhase = '' installPhase = ''
runHook preInstall runHook preInstall
install -D grv $bin/bin/grv install -D grv $out/bin/grv
runHook postInstall runHook postInstall
''; '';

View file

@ -44,7 +44,7 @@ buildGoPackage rec {
) )
''; '';
outputs = [ "bin" "out" "data" ]; outputs = [ "out" "data" ];
postInstall = '' postInstall = ''
mkdir $data mkdir $data
@ -52,7 +52,7 @@ buildGoPackage rec {
mkdir -p $out mkdir -p $out
cp -R ./go/src/${goPackagePath}/options/locale $out/locale cp -R ./go/src/${goPackagePath}/options/locale $out/locale
wrapProgram $bin/bin/gitea \ wrapProgram $out/bin/gitea \
--prefix PATH : ${makeBinPath [ bash git gzip openssh ]} --prefix PATH : ${makeBinPath [ bash git gzip openssh ]}
''; '';

View file

@ -65,7 +65,7 @@ in buildGoPackage rec {
"'/run/gitlab/shell-config.yml'" "'/run/gitlab/shell-config.yml'"
''; '';
outputs = [ "bin" "out" "ruby" ]; outputs = [ "out" "ruby" ];
meta = with stdenv.lib; { meta = with stdenv.lib; {
homepage = "https://gitlab.com/gitlab-org/gitaly"; homepage = "https://gitlab.com/gitlab-org/gitaly";

View file

@ -18,8 +18,8 @@ buildGoPackage rec {
goDeps = ./deps.nix; goDeps = ./deps.nix;
postInstall = '' postInstall = ''
cp -r "$NIX_BUILD_TOP/go/src/$goPackagePath"/bin/* $bin/bin cp -r "$NIX_BUILD_TOP/go/src/$goPackagePath"/bin/* $out/bin
cp -r "$NIX_BUILD_TOP/go/src/$goPackagePath"/{support,VERSION} $bin/ cp -r "$NIX_BUILD_TOP/go/src/$goPackagePath"/{support,VERSION} $out/
''; '';
meta = with stdenv.lib; { meta = with stdenv.lib; {

View file

@ -34,13 +34,13 @@ buildGoPackage rec {
( optional sqliteSupport "sqlite" ( optional sqliteSupport "sqlite"
++ optional pamSupport "pam"); ++ optional pamSupport "pam");
outputs = [ "bin" "out" "data" ]; outputs = [ "out" "data" ];
postInstall = '' postInstall = ''
mkdir $data mkdir $data
cp -R $src/{public,templates} $data cp -R $src/{public,templates} $data
wrapProgram $bin/bin/gogs \ wrapProgram $out/bin/gogs \
--prefix PATH : ${makeBinPath [ bash git gzip openssh ]} --prefix PATH : ${makeBinPath [ bash git gzip openssh ]}
''; '';

View file

@ -14,7 +14,7 @@ buildGoPackage rec {
}; };
goPackagePath = "github.com/containerd/containerd"; goPackagePath = "github.com/containerd/containerd";
outputs = [ "bin" "out" "man" ]; outputs = [ "out" "man" ];
nativeBuildInputs = [ go-md2man utillinux ]; nativeBuildInputs = [ go-md2man utillinux ];
@ -33,7 +33,7 @@ buildGoPackage rec {
installPhase = '' installPhase = ''
for b in bin/*; do for b in bin/*; do
install -Dm555 $b $bin/$b install -Dm555 $b $out/$b
done done
make man make man

View file

@ -32,7 +32,6 @@ in buildGoPackage rec {
sha256 = "1cy2lqasfn5n20vlm3ckb6myci8ya6qv08dw8fq7z4ycnm39r1a6"; sha256 = "1cy2lqasfn5n20vlm3ckb6myci8ya6qv08dw8fq7z4ycnm39r1a6";
}; };
outputs = [ "bin" "out" ];
nativeBuildInputs = [ git pkgconfig which ]; nativeBuildInputs = [ git pkgconfig which ];
buildInputs = [ btrfs-progs gpgme libapparmor libassuan libgpgerror buildInputs = [ btrfs-progs gpgme libapparmor libassuan libgpgerror
libseccomp libselinux lvm2 ] libseccomp libselinux lvm2 ]
@ -47,9 +46,9 @@ in buildGoPackage rec {
bin/pinns bin/pinns
''; '';
installPhase = '' installPhase = ''
install -Dm755 bin/crio $bin/bin/crio${flavor} install -Dm755 bin/crio $out/bin/crio${flavor}
install -Dm755 bin/crio-status $bin/bin/crio-status${flavor} install -Dm755 bin/crio-status $out/bin/crio-status${flavor}
install -Dm755 bin/pinns $bin/bin/pinns${flavor} install -Dm755 bin/pinns $out/bin/pinns${flavor}
''; '';
meta = with stdenv.lib; { meta = with stdenv.lib; {

View file

@ -33,7 +33,7 @@ buildGoPackage rec {
# docker-slim tries to create its state dir next to the binary (inside the nix # docker-slim tries to create its state dir next to the binary (inside the nix
# store), so we set it to use the working directory at the time of invocation # store), so we set it to use the working directory at the time of invocation
postInstall = '' postInstall = ''
wrapProgram "$bin/bin/docker-slim" --add-flags '--state-path "$(pwd)"' wrapProgram "$out/bin/docker-slim" --add-flags '--state-path "$(pwd)"'
''; '';
meta = with stdenv.lib; { meta = with stdenv.lib; {

View file

@ -16,7 +16,7 @@ buildGoPackage rec {
goDeps = null; goDeps = null;
installPhase = '' installPhase = ''
install -m755 -D ./go/bin/proxy $bin/bin/docker-proxy install -m755 -D ./go/bin/proxy $out/bin/docker-proxy
''; '';
meta = with stdenv.lib; { meta = with stdenv.lib; {

View file

@ -25,7 +25,7 @@ buildGoPackage rec {
goPackagePath = "github.com/containers/libpod"; goPackagePath = "github.com/containers/libpod";
outputs = [ "bin" "out" "man" ]; outputs = [ "out" "man" ];
nativeBuildInputs = [ pkg-config go-md2man installShellFiles ]; nativeBuildInputs = [ pkg-config go-md2man installShellFiles ];
@ -40,7 +40,7 @@ buildGoPackage rec {
''; '';
installPhase = '' installPhase = ''
install -Dm555 bin/podman $bin/bin/podman install -Dm555 bin/podman $out/bin/podman
installShellCompletion --bash completions/bash/podman installShellCompletion --bash completions/bash/podman
installShellCompletion --zsh completions/zsh/_podman installShellCompletion --zsh completions/zsh/_podman
MANDIR=$man/share/man make install.man MANDIR=$man/share/man make install.man

View file

@ -22,7 +22,7 @@ buildGoPackage rec {
}; };
goPackagePath = "github.com/opencontainers/runc"; goPackagePath = "github.com/opencontainers/runc";
outputs = [ "bin" "out" "man" ]; outputs = [ "out" "man" ];
nativeBuildInputs = [ go-md2man installShellFiles pkg-config which ]; nativeBuildInputs = [ go-md2man installShellFiles pkg-config which ];
buildInputs = [ libseccomp libapparmor apparmor-parser ]; buildInputs = [ libseccomp libapparmor apparmor-parser ];
@ -38,7 +38,7 @@ buildGoPackage rec {
''; '';
installPhase = '' installPhase = ''
install -Dm755 runc $bin/bin/runc install -Dm755 runc $out/bin/runc
installManPage man/*/* installManPage man/*/*
''; '';

View file

@ -42,7 +42,7 @@ buildGoPackage rec {
patchShebangs . patchShebangs .
sed -i 's|defaultPath := "[^"]*"|defaultPath := "${stdenv.lib.makeBinPath propagatedBuildInputs}"|' cmd/internal/cli/actions.go sed -i 's|defaultPath := "[^"]*"|defaultPath := "${stdenv.lib.makeBinPath propagatedBuildInputs}"|' cmd/internal/cli/actions.go
./mconfig -V ${version} -p $bin --localstatedir=/var ./mconfig -V ${version} -p $out --localstatedir=/var
# Don't install SUID binaries # Don't install SUID binaries
sed -i 's/-m 4755/-m 755/g' builddir/Makefile sed -i 's/-m 4755/-m 755/g' builddir/Makefile
@ -54,16 +54,16 @@ buildGoPackage rec {
''; '';
installPhase = '' installPhase = ''
make -C builddir install LOCALSTATEDIR=$bin/var make -C builddir install LOCALSTATEDIR=$out/var
chmod 755 $bin/libexec/singularity/bin/starter-suid chmod 755 $out/libexec/singularity/bin/starter-suid
wrapProgram $bin/bin/singularity --prefix PATH : ${stdenv.lib.makeBinPath propagatedBuildInputs} wrapProgram $out/bin/singularity --prefix PATH : ${stdenv.lib.makeBinPath propagatedBuildInputs}
''; '';
postFixup = '' postFixup = ''
find $bin/ -type f -executable -exec remove-references-to -t ${go} '{}' + || true find $out/libexec/ -type f -executable -exec remove-references-to -t ${go} '{}' + || true
# These etc scripts shouldn't have their paths patched # These etc scripts shouldn't have their paths patched
cp etc/actions/* $bin/etc/singularity/actions/ cp etc/actions/* $out/etc/singularity/actions/
''; '';
meta = with stdenv.lib; { meta = with stdenv.lib; {

View file

@ -37,8 +37,6 @@ buildGoPackage rec {
goDeps = ./deps.nix; goDeps = ./deps.nix;
outputs = [ "out" ];
nativeBuildInputs = [ nativeBuildInputs = [
pkgconfig pkgconfig
deepin-gettext-tools # build deepin-gettext-tools # build
@ -109,7 +107,7 @@ buildGoPackage rec {
installPhase = '' installPhase = ''
make install PREFIX="$out" SYSTEMD_LIB_DIR="$out/lib" -C go/src/${goPackagePath} make install PREFIX="$out" SYSTEMD_LIB_DIR="$out/lib" -C go/src/${goPackagePath}
mv $out/share/gocode $out/share/go mv $out/share/gocode $out/share/go
remove-references-to -t ${go} $out/bin/* $out/lib/deepin-api/* remove-references-to -t ${go} $out/lib/deepin-api/*
''; '';
postFixup = '' postFixup = ''

View file

@ -29,8 +29,6 @@ buildGoPackage rec {
goDeps = ./deps.nix; goDeps = ./deps.nix;
outputs = [ "out" ];
nativeBuildInputs = [ nativeBuildInputs = [
pkgconfig pkgconfig
dbus-factory dbus-factory

View file

@ -22,8 +22,6 @@ buildGoPackage rec {
goDeps = ./deps.nix; goDeps = ./deps.nix;
outputs = [ "out" ];
nativeBuildInputs = [ nativeBuildInputs = [
pkgconfig pkgconfig
dbus-factory dbus-factory
@ -114,7 +112,7 @@ buildGoPackage rec {
installPhase = '' installPhase = ''
make install PREFIX="$out" -C go/src/${goPackagePath} make install PREFIX="$out" -C go/src/${goPackagePath}
rm -rf $out/share/lightdm # this is uselesss for NixOS rm -rf $out/share/lightdm # this is uselesss for NixOS
remove-references-to -t ${go} $out/bin/* $out/sbin/* remove-references-to -t ${go} $out/sbin/*
''; '';
postFixup = '' postFixup = ''

View file

@ -22,7 +22,7 @@ buildGoPackage rec {
sha256 = "187cvb3i5cwm7cwxmzpl2ca7900yb6v6b6cybyz5mnd5ccy5ff1q"; sha256 = "187cvb3i5cwm7cwxmzpl2ca7900yb6v6b6cybyz5mnd5ccy5ff1q";
}; };
outputs = [ "bin" "man" "out" ]; outputs = [ "out" "man" ];
goPackagePath = "github.com/containers/buildah"; goPackagePath = "github.com/containers/buildah";
excludedPackages = [ "tests" ]; excludedPackages = [ "tests" ];
@ -35,7 +35,7 @@ buildGoPackage rec {
buildPhase = '' buildPhase = ''
pushd go/src/${goPackagePath} pushd go/src/${goPackagePath}
make GIT_COMMIT="unknown" make GIT_COMMIT="unknown"
install -Dm755 buildah $bin/bin/buildah install -Dm755 buildah $out/bin/buildah
installShellCompletion --bash contrib/completions/bash/buildah installShellCompletion --bash contrib/completions/bash/buildah
''; '';

View file

@ -34,7 +34,7 @@ buildGoPackage rec {
''; '';
installPhase = '' installPhase = ''
install -Dm555 out/cf "$bin/bin/cf" install -Dm555 out/cf "$out/bin/cf"
installShellCompletion --bash "$src/ci/installers/completion/cf" installShellCompletion --bash "$src/ci/installers/completion/cf"
''; '';

View file

@ -20,8 +20,8 @@ buildGoPackage rec {
''; '';
postInstall = '' postInstall = ''
mv $bin/bin/{internal,ct} mv $out/bin/{internal,ct}
rm $bin/bin/tools rm $out/bin/tools
''; '';
meta = { meta = {

View file

@ -24,10 +24,10 @@ buildGoPackage rec {
postInstall = '' postInstall = ''
# Fix binary name # Fix binary name
mv $bin/bin/{agent,buildkite-agent} mv $out/bin/{agent,buildkite-agent}
# These are runtime dependencies # These are runtime dependencies
wrapProgram $bin/bin/buildkite-agent \ wrapProgram $out/bin/buildkite-agent \
--prefix PATH : '${stdenv.lib.makeBinPath [ openssh git coreutils gnused gnugrep ]}' --prefix PATH : '${stdenv.lib.makeBinPath [ openssh git coreutils gnused gnugrep ]}'
''; '';

View file

@ -15,17 +15,17 @@ buildGoPackage {
postInstall = '' postInstall = ''
${stdenv.lib.optionalString hasBootstrapScript '' ${stdenv.lib.optionalString hasBootstrapScript ''
# Install bootstrap.sh # Install bootstrap.sh
mkdir -p $bin/libexec/buildkite-agent mkdir -p $out/libexec/buildkite-agent
cp $NIX_BUILD_TOP/go/src/${goPackagePath}/templates/bootstrap.sh $bin/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 $bin/libexec/buildkite-agent/bootstrap.sh sed -e "s|#!/bin/bash|#!${bash}/bin/bash|g" -i $out/libexec/buildkite-agent/bootstrap.sh
''} ''}
# Fix binary name # Fix binary name
mv $bin/bin/{agent,buildkite-agent} mv $out/bin/{agent,buildkite-agent}
# These are runtime dependencies # These are runtime dependencies
wrapProgram $bin/bin/buildkite-agent \ wrapProgram $out/bin/buildkite-agent \
${stdenv.lib.optionalString hasBootstrapScript "--set BUILDKITE_BOOTSTRAP_SCRIPT_PATH $bin/libexec/buildkite-agent/bootstrap.sh"} \ ${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 ]}' --prefix PATH : '${stdenv.lib.makeBinPath [ openssh git coreutils gnused gnugrep ]}'
''; '';

View file

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

View file

@ -9,8 +9,8 @@ buildGoPackage rec {
subPackages = [ "client" ]; subPackages = [ "client" ];
postInstall = '' postInstall = ''
if [ -f "$bin/bin/client" ]; then if [ -f "$out/bin/client" ]; then
mv "$bin/bin/client" "$bin/bin/deis" mv "$out/bin/client" "$out/bin/deis"
fi fi
''; '';

View file

@ -19,7 +19,7 @@ buildGoPackage rec {
]; ];
postFixup = '' postFixup = ''
wrapProgram $bin/bin/dep2nix \ wrapProgram $out/bin/dep2nix \
--prefix PATH : ${nix-prefetch-scripts}/bin --prefix PATH : ${nix-prefetch-scripts}/bin
''; '';

View file

@ -21,7 +21,7 @@ buildGoPackage rec {
postInstall = '' postInstall = ''
export HOME=$(mktemp -d) # attempts to write to /homeless-shelter export HOME=$(mktemp -d) # attempts to write to /homeless-shelter
for shell in bash fish zsh; do for shell in bash fish zsh; do
$bin/bin/doctl completion $shell > doctl.$shell $out/bin/doctl completion $shell > doctl.$shell
installShellCompletion doctl.$shell installShellCompletion doctl.$shell
done done
''; '';

View file

@ -18,7 +18,7 @@ buildGoPackage rec {
nativeBuildInputs = [ makeWrapper ]; nativeBuildInputs = [ makeWrapper ];
postInstall = '' postInstall = ''
wrapProgram $bin/bin/fac \ wrapProgram $out/bin/fac \
--prefix PATH : ${git}/bin --prefix PATH : ${git}/bin
# Install man page, not installed by default # Install man page, not installed by default

View file

@ -17,14 +17,14 @@ buildGoPackage rec {
goDeps = ./deps.nix; goDeps = ./deps.nix;
outputs = [ "bin" "out" "man" ]; outputs = [ "out" "man" ];
nativeBuildInputs = [ go-bindata gotools makeWrapper ]; nativeBuildInputs = [ go-bindata gotools makeWrapper ];
preBuild = ''go generate ./...''; preBuild = ''go generate ./...'';
postInstall = '' postInstall = ''
wrapProgram $bin/bin/go2nix \ wrapProgram $out/bin/go2nix \
--prefix PATH : ${nix-prefetch-git}/bin \ --prefix PATH : ${nix-prefetch-git}/bin \
--prefix PATH : ${git}/bin --prefix PATH : ${git}/bin

View file

@ -25,7 +25,7 @@ buildGoPackage rec {
goDeps = ./deps.nix; goDeps = ./deps.nix;
postInstall = '' postInstall = ''
mv $bin/bin/gocode $bin/bin/gocode-gomod mv $out/bin/gocode $out/bin/gocode-gomod
''; '';
meta = with stdenv.lib; { meta = with stdenv.lib; {

View file

@ -20,7 +20,7 @@ buildGoPackage rec {
nativeBuildInputs = [ installShellFiles ]; nativeBuildInputs = [ installShellFiles ];
postInstall = '' postInstall = ''
for shell in bash zsh; do for shell in bash zsh; do
$bin/bin/kind completion $shell > kind.$shell $out/bin/kind completion $shell > kind.$shell
installShellCompletion kind.$shell installShellCompletion kind.$shell
done done
''; '';

View file

@ -27,7 +27,7 @@ buildGoPackage rec {
postInstall = with stdenv; let postInstall = with stdenv; let
binPath = lib.makeBinPath [ mercurial git ]; binPath = lib.makeBinPath [ mercurial git ];
in '' in ''
wrapProgram $bin/bin/houndd --prefix PATH : ${binPath} wrapProgram $out/bin/houndd --prefix PATH : ${binPath}
''; '';
meta = { meta = {

View file

@ -17,7 +17,7 @@ buildGoPackage rec {
goDeps = ./deps.nix; goDeps = ./deps.nix;
postFixup = '' postFixup = ''
wrapProgram $bin/bin/out-of-tree \ wrapProgram $out/bin/out-of-tree \
--prefix PATH : "${stdenv.lib.makeBinPath [ qemu docker which ]}" --prefix PATH : "${stdenv.lib.makeBinPath [ qemu docker which ]}"
''; '';

View file

@ -26,7 +26,7 @@ buildGoPackage rec {
nativeBuildInputs = [ installShellFiles ]; nativeBuildInputs = [ installShellFiles ];
postInstall = '' postInstall = ''
for shell in bash zsh; do for shell in bash zsh; do
$bin/bin/skaffold completion $shell > skaffold.$shell $out/bin/skaffold completion $shell > skaffold.$shell
installShellCompletion skaffold.$shell installShellCompletion skaffold.$shell
done done
''; '';

View file

@ -34,7 +34,7 @@ buildGoPackage {
inherit version; inherit version;
inherit src goPackagePath; inherit src goPackagePath;
outputs = [ "bin" "man" "out" ]; outputs = [ "out" "man" ];
excludedPackages = [ "integration" ]; excludedPackages = [ "integration" ];

View file

@ -15,8 +15,8 @@ buildGoPackage rec {
buildFlagsArray = "-ldflags=-X github.com/Shopify/toxiproxy.Version=v${version}"; buildFlagsArray = "-ldflags=-X github.com/Shopify/toxiproxy.Version=v${version}";
postInstall = '' postInstall = ''
mv $bin/bin/cli $bin/bin/toxiproxy-cli mv $out/bin/cli $out/bin/toxiproxy-cli
mv $bin/bin/cmd $bin/bin/toxiproxy-cmd mv $out/bin/cmd $out/bin/toxiproxy-cmd
''; '';
meta = { meta = {

View file

@ -28,7 +28,7 @@ buildGoPackage {
postInstall = with stdenv; let postInstall = with stdenv; let
binPath = lib.makeBinPath [ nix-prefetch-git go ]; binPath = lib.makeBinPath [ nix-prefetch-git go ];
in '' in ''
wrapProgram $bin/bin/vgo2nix --prefix PATH : ${binPath} wrapProgram $out/bin/vgo2nix --prefix PATH : ${binPath}
''; '';
meta = with stdenv.lib; { meta = with stdenv.lib; {

View file

@ -19,7 +19,7 @@ buildGoPackage rec {
}; };
postInstall = '' postInstall = ''
mv $bin/bin/cli $bin/bin/wally mv $out/bin/cli $out/bin/wally
''; '';
goDeps = ./deps.nix; goDeps = ./deps.nix;

View file

@ -14,7 +14,7 @@ buildGoPackage rec {
goDeps = ./deps.nix; goDeps = ./deps.nix;
postInstall = "mv $bin/bin/boohu.git $bin/bin/boohu"; postInstall = "mv $out/bin/boohu.git $out/bin/boohu";
meta = with stdenv.lib; { meta = with stdenv.lib; {
description = "A new coffee-break roguelike game"; description = "A new coffee-break roguelike game";

View file

@ -14,7 +14,7 @@ buildGoPackage rec {
goDeps = ./deps.nix; goDeps = ./deps.nix;
postInstall = "mv $bin/bin/harmonist.git $bin/bin/harmonist"; postInstall = "mv $out/bin/harmonist.git $out/bin/harmonist";
meta = with stdenv.lib; { meta = with stdenv.lib; {
description = "A stealth coffee-break roguelike game"; description = "A stealth coffee-break roguelike game";

View file

@ -47,7 +47,7 @@ in {
''; '';
buildInputs = [ systemd.dev ]; buildInputs = [ systemd.dev ];
postFixup = let libPath = stdenv.lib.makeLibraryPath [ systemd.lib ]; in '' postFixup = let libPath = stdenv.lib.makeLibraryPath [ systemd.lib ]; in ''
patchelf --set-rpath ${libPath} "$bin/bin/journalbeat" patchelf --set-rpath ${libPath} "$out/bin/journalbeat"
''; '';
}; };
} }

View file

@ -46,7 +46,7 @@ in {
''; '';
buildInputs = [ systemd.dev ]; buildInputs = [ systemd.dev ];
postFixup = let libPath = stdenv.lib.makeLibraryPath [ systemd.lib ]; in '' postFixup = let libPath = stdenv.lib.makeLibraryPath [ systemd.lib ]; in ''
patchelf --set-rpath ${libPath} "$bin/bin/journalbeat" patchelf --set-rpath ${libPath} "$out/bin/journalbeat"
''; '';
}; };
} }

View file

@ -22,8 +22,8 @@ buildGoPackage rec {
]; ];
postInstall = '' postInstall = ''
mkdir -p $bin/share mkdir -p $out/share
cp -r $src/web $bin/share/web cp -r $src/web $out/share/web
''; '';
meta = with lib; { meta = with lib; {

View file

@ -22,7 +22,7 @@ buildGoPackage rec {
''; '';
installPhase = '' installPhase = ''
install -Dm755 bin/* bin/functional/cmd/* -t $bin/bin install -Dm755 bin/* bin/functional/cmd/* -t $out/bin
''; '';
passthru.tests = with nixosTests; { passthru.tests = with nixosTests; {

View file

@ -35,9 +35,9 @@ buildGoPackage {
''; '';
installPhase = '' installPhase = ''
mkdir -p $bin/bin $bin/share/meguca mkdir -p $out/bin $out/share/meguca
cp meguca $bin/bin cp meguca $out/bin
cp -r www $bin/share/meguca cp -r www $out/share/meguca
''; '';
meta = with stdenv.lib; { meta = with stdenv.lib; {

View file

@ -20,7 +20,7 @@ buildGoPackage rec {
''; '';
postInstall = '' postInstall = ''
mv $bin/bin/miniflux.app $bin/bin/miniflux mv $out/bin/miniflux.app $out/bin/miniflux
''; '';
meta = with stdenv.lib; { meta = with stdenv.lib; {

View file

@ -19,7 +19,7 @@ buildGoPackage rec {
}; };
postInstall = '' postInstall = ''
wrapProgram $bin/bin/grafana-reporter \ wrapProgram $out/bin/grafana-reporter \
--prefix PATH : ${makeBinPath [ tetex ]} --prefix PATH : ${makeBinPath [ tetex ]}
''; '';

View file

@ -29,10 +29,10 @@ buildGoPackage rec {
postInstall = '' postInstall = ''
tar -xvf $srcStatic tar -xvf $srcStatic
mkdir -p $bin/share/grafana mkdir -p $out/share/grafana
mv grafana-*/{public,conf,tools} $bin/share/grafana/ mv grafana-*/{public,conf,tools} $out/share/grafana/
'' + lib.optionalString phantomJsSupport '' '' + lib.optionalString phantomJsSupport ''
ln -sf ${phantomjs2}/bin/phantomjs $bin/share/grafana/tools/phantomjs/phantomjs ln -sf ${phantomjs2}/bin/phantomjs $out/share/grafana/tools/phantomjs/phantomjs
''; '';
meta = with lib; { meta = with lib; {

View file

@ -24,7 +24,7 @@ buildGoPackage rec {
buildInputs = stdenv.lib.optionals stdenv.isLinux [ systemd.dev ]; buildInputs = stdenv.lib.optionals stdenv.isLinux [ systemd.dev ];
preFixup = stdenv.lib.optionalString stdenv.isLinux '' preFixup = stdenv.lib.optionalString stdenv.isLinux ''
wrapProgram $bin/bin/promtail \ wrapProgram $out/bin/promtail \
--prefix LD_LIBRARY_PATH : "${systemd.lib}/lib" --prefix LD_LIBRARY_PATH : "${systemd.lib}/lib"
''; '';

View file

@ -27,7 +27,7 @@ buildGoPackage rec {
nativeBuildInputs = [ installShellFiles ]; nativeBuildInputs = [ installShellFiles ];
postInstall = '' postInstall = ''
$bin/bin/amtool --completion-script-bash > amtool.bash $out/bin/amtool --completion-script-bash > amtool.bash
installShellCompletion amtool.bash installShellCompletion amtool.bash
''; '';

View file

@ -54,9 +54,9 @@ in buildGoPackage rec {
''; '';
preInstall = '' preInstall = ''
mkdir -p "$bin/share/doc/prometheus" "$bin/etc/prometheus" mkdir -p "$out/share/doc/prometheus" "$out/etc/prometheus"
cp -a $src/documentation/* $bin/share/doc/prometheus cp -a $src/documentation/* $out/share/doc/prometheus
cp -a $src/console_libraries $src/consoles $bin/etc/prometheus cp -a $src/console_libraries $src/consoles $out/etc/prometheus
''; '';
doCheck = true; doCheck = true;

View file

@ -43,7 +43,7 @@ buildGoPackage rec {
]; ];
postInstall = optionalString withSystemdSupport '' postInstall = optionalString withSystemdSupport ''
wrapProgram $bin/bin/postfix_exporter \ wrapProgram $out/bin/postfix_exporter \
--prefix LD_LIBRARY_PATH : "${systemd.lib}/lib" --prefix LD_LIBRARY_PATH : "${systemd.lib}/lib"
''; '';

View file

@ -29,7 +29,7 @@ buildGoPackage rec {
doInstallCheck = true; doInstallCheck = true;
installCheckPhase = '' installCheckPhase = ''
export PATH=$PATH:$bin/bin export PATH=$PATH:$out/bin
pushgateway --help pushgateway --help

View file

@ -16,7 +16,7 @@ let
goPackagePath = "github.com/${owner}/${repo}"; goPackagePath = "github.com/${owner}/${repo}";
inherit src; inherit src;
postInstall = '' postInstall = ''
mkdir $out mkdir -p $out
cp go/src/github.com/sensu/uchiwa/public/index.html $out/ cp go/src/github.com/sensu/uchiwa/public/index.html $out/
''; '';
}; };
@ -37,7 +37,7 @@ in stdenv.mkDerivation {
buildCommand = '' buildCommand = ''
mkdir -p $out/bin $out/public mkdir -p $out/bin $out/public
makeWrapper ${backend.bin}/bin/uchiwa $out/bin/uchiwa \ makeWrapper ${backend}/bin/uchiwa $out/bin/uchiwa \
--add-flags "-p $out/public" --add-flags "-p $out/public"
ln -s ${backend.out}/index.html $out/public/index.html ln -s ${backend.out}/index.html $out/public/index.html
ln -s ${frontend.out}/bower_components $out/public/bower_components ln -s ${frontend.out}/bower_components $out/public/bower_components

View file

@ -15,8 +15,8 @@ buildGoPackage rec {
}; };
postInstall = '' postInstall = ''
mkdir -p $bin/share mkdir -p $out/share
cp -R $src/frontend $bin/share cp -R $src/frontend $out/share
''; '';
meta = with stdenv.lib; { meta = with stdenv.lib; {

View file

@ -42,7 +42,7 @@ buildGoPackage rec {
installPhase = '' installPhase = ''
runHook preInstall runHook preInstall
install -D cockroachoss $bin/bin/cockroach install -D cockroachoss $out/bin/cockroach
installShellCompletion cockroach.bash installShellCompletion cockroach.bash
mkdir -p $man/share/man mkdir -p $man/share/man
@ -51,11 +51,7 @@ buildGoPackage rec {
runHook postInstall runHook postInstall
''; '';
# Unfortunately we have to keep an empty reference to $out, because it seems outputs = [ "out" "man" ];
# buildGoPackages only nukes references to the go compiler under $bin, effectively
# making all binary output under $bin mandatory. Ideally, we would just use
# $out and $man and remove $bin since there's no point in an empty path. :(
outputs = [ "bin" "man" "out" ];
meta = with stdenv.lib; { meta = with stdenv.lib; {
homepage = "https://www.cockroachlabs.com"; homepage = "https://www.cockroachlabs.com";

View file

@ -32,11 +32,11 @@ buildGoPackage rec {
installPhase = installPhase =
if stdenv.isDarwin if stdenv.isDarwin
then '' then ''
install -Dm755 -t $bin/bin bin/docker-credential-osxkeychain install -Dm755 -t $out/bin bin/docker-credential-osxkeychain
'' ''
else '' else ''
install -Dm755 -t $bin/bin bin/docker-credential-pass install -Dm755 -t $out/bin bin/docker-credential-pass
install -Dm755 -t $bin/bin bin/docker-credential-secretservice install -Dm755 -t $out/bin bin/docker-credential-secretservice
''; '';
meta = with stdenv.lib; { meta = with stdenv.lib; {

View file

@ -31,9 +31,9 @@ buildGoPackage rec {
postInstall = '' postInstall = ''
# test binaries, code generation # test binaries, code generation
rm $bin/bin/{deps,macaroon-identity,generate} rm $out/bin/{deps,macaroon-identity,generate}
wrapProgram $bin/bin/lxd --prefix PATH : ${stdenv.lib.makeBinPath [ wrapProgram $out/bin/lxd --prefix PATH : ${stdenv.lib.makeBinPath [
acl rsync gnutar xz btrfs-progs gzip dnsmasq squashfsTools iproute iptables ebtables bash criu acl rsync gnutar xz btrfs-progs gzip dnsmasq squashfsTools iproute iptables ebtables bash criu
(writeShellScriptBin "apparmor_parser" '' (writeShellScriptBin "apparmor_parser" ''
exec '${apparmor-parser}/bin/apparmor_parser' -I '${apparmor-profiles}/etc/apparmor.d' "$@" exec '${apparmor-parser}/bin/apparmor_parser' -I '${apparmor-profiles}/etc/apparmor.d' "$@"

View file

@ -17,7 +17,7 @@ buildGoPackage rec {
buildInputs = [ makeWrapper ]; buildInputs = [ makeWrapper ];
preFixup = '' preFixup = ''
wrapProgram "$bin/bin/diskrsync" --argv0 diskrsync --prefix PATH : ${openssh}/bin wrapProgram "$out/bin/diskrsync" --argv0 diskrsync --prefix PATH : ${openssh}/bin
''; '';
meta = with stdenv.lib; { meta = with stdenv.lib; {

View file

@ -19,7 +19,7 @@ buildGoPackage rec {
''; '';
installPhase = '' installPhase = ''
install -D duplicacy_main $bin/bin/duplicacy install -D duplicacy_main $out/bin/duplicacy
''; '';
meta = with lib; { meta = with lib; {

View file

@ -20,7 +20,7 @@ buildGoPackage rec {
passthru.tests.restic = nixosTests.restic; passthru.tests.restic = nixosTests.restic;
postInstall = lib.optionalString (stdenv.hostPlatform == stdenv.buildPlatform) '' postInstall = lib.optionalString (stdenv.hostPlatform == stdenv.buildPlatform) ''
$bin/bin/restic generate \ $out/bin/restic generate \
--bash-completion restic.bash \ --bash-completion restic.bash \
--zsh-completion restic.zsh \ --zsh-completion restic.zsh \
--man . --man .

View file

@ -19,7 +19,7 @@ buildGoPackage rec {
''; '';
installPhase = '' installPhase = ''
install -Dt $bin/bin rest-server install -Dt $out/bin rest-server
''; '';
meta = with lib; { meta = with lib; {

View file

@ -16,8 +16,8 @@ buildGoPackage rec {
subPackages = [ "." "tools/mount_gcsfuse" ]; subPackages = [ "." "tools/mount_gcsfuse" ];
postInstall = '' postInstall = ''
ln -s $bin/bin/mount_gcsfuse $bin/bin/mount.gcsfuse ln -s $out/bin/mount_gcsfuse $out/bin/mount.gcsfuse
ln -s $bin/bin/mount_gcsfuse $bin/bin/mount.fuse.gcsfuse ln -s $out/bin/mount_gcsfuse $out/bin/mount.fuse.gcsfuse
''; '';
meta = with lib;{ meta = with lib;{

View file

@ -33,7 +33,7 @@ buildGoPackage {
postInstall = '' postInstall = ''
installShellCompletion --bash ${aptlyCompletionSrc}/aptly installShellCompletion --bash ${aptlyCompletionSrc}/aptly
wrapProgram "$bin/bin/aptly" \ wrapProgram "$out/bin/aptly" \
--prefix PATH ":" "${stdenv.lib.makeBinPath [ gnupg bzip2 xz graphviz ]}" --prefix PATH ":" "${stdenv.lib.makeBinPath [ gnupg bzip2 xz graphviz ]}"
''; '';

View file

@ -23,9 +23,9 @@ buildGoPackage rec {
installPhase = '' installPhase = ''
mkdir -p $out mkdir -p $out
make install DESTDIR=$bin make install DESTDIR=$out
mkdir -p $bin/share/fish/vendor_conf.d mkdir -p $out/share/fish/vendor_conf.d
echo "eval ($bin/bin/direnv hook fish)" > $bin/share/fish/vendor_conf.d/direnv.fish echo "eval ($out/bin/direnv hook fish)" > $out/share/fish/vendor_conf.d/direnv.fish
''; '';
meta = with stdenv.lib; { meta = with stdenv.lib; {

View file

@ -45,7 +45,7 @@ in buildGoPackage {
runHook preBuild runHook preBuild
${stdenv.lib.concatMapStrings (t: '' ${stdenv.lib.concatMapStrings (t: ''
go build -o "$bin/bin/${t}" -tags ssl -ldflags "-s -w" $goPackagePath/${t}/main go build -o "$out/bin/${t}" -tags ssl -ldflags "-s -w" $goPackagePath/${t}/main
'') tools} '') tools}
runHook postBuild runHook postBuild

View file

@ -15,7 +15,7 @@ buildGoPackage rec {
}; };
postInstall = '' postInstall = ''
ln -s $bin/bin/phraseapp-client $bin/bin/phraseapp ln -s $out/bin/phraseapp-client $out/bin/phraseapp
''; '';
meta = with stdenv.lib; { meta = with stdenv.lib; {

View file

@ -18,12 +18,12 @@ buildGoPackage rec {
goDeps = ./deps.nix; goDeps = ./deps.nix;
postInstall = '' postInstall = ''
install -D -t $bin/share/tewisay/cows go/src/${goPackagePath}/cows/*.cow install -D -t $out/share/tewisay/cows go/src/${goPackagePath}/cows/*.cow
''; '';
preFixup = '' preFixup = ''
wrapProgram $bin/bin/tewisay \ wrapProgram $out/bin/tewisay \
--prefix COWPATH : $bin/share/tewisay/cows --prefix COWPATH : $out/share/tewisay/cows
''; '';
meta = { meta = {

View file

@ -10,7 +10,7 @@ buildGoPackage rec {
nativeBuildInputs = [ makeWrapper ]; nativeBuildInputs = [ makeWrapper ];
postInstall = '' postInstall = ''
wrapProgram "$bin/bin/assh" \ wrapProgram "$out/bin/assh" \
--prefix PATH : ${openssh}/bin --prefix PATH : ${openssh}/bin
''; '';

View file

@ -47,8 +47,8 @@ in buildGoPackage rec {
# DataDog use paths relative to the agent binary, so fix these. # DataDog use paths relative to the agent binary, so fix these.
postPatch = '' postPatch = ''
sed -e "s|PyChecksPath =.*|PyChecksPath = \"$bin/${python.sitePackages}\"|" \ sed -e "s|PyChecksPath =.*|PyChecksPath = \"$out/${python.sitePackages}\"|" \
-e "s|distPath =.*|distPath = \"$bin/share/datadog-agent\"|" \ -e "s|distPath =.*|distPath = \"$out/share/datadog-agent\"|" \
-i cmd/agent/common/common_nix.go -i cmd/agent/common/common_nix.go
sed -e "s|/bin/hostname|${lib.getBin hostname}/bin/hostname|" \ sed -e "s|/bin/hostname|${lib.getBin hostname}/bin/hostname|" \
-i pkg/util/hostname_nix.go -i pkg/util/hostname_nix.go
@ -57,14 +57,14 @@ in buildGoPackage rec {
# Install the config files and python modules from the "dist" dir # Install the config files and python modules from the "dist" dir
# into standard paths. # into standard paths.
postInstall = '' postInstall = ''
mkdir -p $bin/${python.sitePackages} $bin/share/datadog-agent mkdir -p $out/${python.sitePackages} $out/share/datadog-agent
cp -R $src/cmd/agent/dist/conf.d $bin/share/datadog-agent cp -R $src/cmd/agent/dist/conf.d $out/share/datadog-agent
cp -R $src/cmd/agent/dist/{checks,utils,config.py} $bin/${python.sitePackages} cp -R $src/cmd/agent/dist/{checks,utils,config.py} $out/${python.sitePackages}
cp -R $src/pkg/status/dist/templates $bin/share/datadog-agent cp -R $src/pkg/status/dist/templates $out/share/datadog-agent
wrapProgram "$bin/bin/agent" \ wrapProgram "$out/bin/agent" \
--set PYTHONPATH "$bin/${python.sitePackages}" \ --set PYTHONPATH "$out/${python.sitePackages}" \
--prefix LD_LIBRARY_PATH : ${systemd.lib}/lib --prefix LD_LIBRARY_PATH : ${systemd.lib}/lib
''; '';

View file

@ -23,14 +23,14 @@ buildGoPackage rec {
goDeps = ./deps.nix; goDeps = ./deps.nix;
postInstall = '' postInstall = ''
mkdir -p $bin/bin $out/share/doc/${pname} mkdir -p $out/bin $out/share/doc/${pname}
cp -v ./go/src/github.com/StanfordSNR/${pname}/scripts/* $bin/bin/ cp -v ./go/src/github.com/StanfordSNR/${pname}/scripts/* $out/bin/
cp -vr ./go/src/github.com/StanfordSNR/${pname}/{AUTHORS,doc,LICENSE,README.md} $out/share/doc/guardian-agent cp -vr ./go/src/github.com/StanfordSNR/${pname}/{AUTHORS,doc,LICENSE,README.md} $out/share/doc/guardian-agent
''; '';
postFixup = '' postFixup = ''
wrapProgram $bin/bin/sga-guard \ wrapProgram $out/bin/sga-guard \
--prefix PATH : "$bin/bin" \ --prefix PATH : "$out/bin" \
--prefix PATH : "${autossh}/bin" --prefix PATH : "${autossh}/bin"
''; '';

View file

@ -29,10 +29,10 @@ buildGoPackage rec {
postInstall = '' postInstall = ''
mkdir -p $lib mkdir -p $lib
cp -v $src/data/*.nix $lib cp -v $src/data/*.nix $lib
wrapProgram $bin/bin/morph --prefix PATH : ${lib.makeBinPath [ openssh ]}; wrapProgram $out/bin/morph --prefix PATH : ${lib.makeBinPath [ openssh ]};
''; '';
outputs = [ "out" "bin" "lib" ]; outputs = [ "out" "lib" ];
meta = with lib; { meta = with lib; {
description = "Morph is a NixOS host manager written in Golang."; description = "Morph is a NixOS host manager written in Golang.";

View file

@ -23,13 +23,13 @@ buildGoPackage rec {
postInstall = '' postInstall = ''
for shell in bash fish zsh; do for shell in bash fish zsh; do
$bin/bin/gopass completion $shell > gopass.$shell $out/bin/gopass completion $shell > gopass.$shell
installShellCompletion gopass.$shell installShellCompletion gopass.$shell
done done
''; '';
postFixup = '' postFixup = ''
wrapProgram $bin/bin/gopass \ wrapProgram $out/bin/gopass \
--prefix PATH : "${wrapperPath}" --prefix PATH : "${wrapperPath}"
''; '';

View file

@ -26,7 +26,7 @@ buildGoPackage rec {
installPhase = '' installPhase = ''
runHook preInstall runHook preInstall
install -D bin/notary $bin/bin/notary install -D bin/notary $out/bin/notary
runHook postInstall runHook postInstall
''; '';

View file

@ -23,7 +23,7 @@ buildGoPackage rec {
]; ];
postInstall = '' postInstall = ''
echo "complete -C $bin/bin/vault vault" > vault.bash echo "complete -C $out/bin/vault vault" > vault.bash
installShellCompletion vault.bash installShellCompletion vault.bash
''; '';

View file

@ -28,8 +28,8 @@ buildGoPackage rec {
''; '';
installPhase = '' installPhase = ''
mkdir -p $bin/bin mkdir -p $out/bin
cp go/src/$goPackagePath/build/bin/linux/verifpal $bin/bin/ cp go/src/$goPackagePath/build/bin/linux/verifpal $out/bin/
''; '';
meta = { meta = {

View file

@ -16,7 +16,7 @@ buildGoPackage rec {
makeFlags = [ makeFlags = [
"PREFIX=${placeholder "out"}" "PREFIX=${placeholder "out"}"
"BINDIR=${placeholder "bin"}/bin" "BINDIR=${placeholder "out"}/bin"
]; ];
buildPhase = '' buildPhase = ''

View file

@ -14,7 +14,7 @@ buildGoPackage rec {
buildPhase = '' buildPhase = ''
pushd go/src/${goPackagePath} pushd go/src/${goPackagePath}
make all install BINDIR=$bin/bin make all install BINDIR=$out/bin
''; '';
meta = with lib; { meta = with lib; {

View file

@ -23,7 +23,7 @@ buildGoPackage rec {
goDeps = ./deps.nix; goDeps = ./deps.nix;
postInstall = '' postInstall = ''
wrapProgram $bin/bin/distrobuilder --prefix PATH ":" ${binPath} wrapProgram $out/bin/distrobuilder --prefix PATH ":" ${binPath}
''; '';
nativeBuildInputs = [ pkgconfig makeWrapper ]; nativeBuildInputs = [ pkgconfig makeWrapper ];