diff options
author | Luca Bruno <lethalman88@gmail.com> | 2015-02-05 18:07:28 +0100 |
---|---|---|
committer | Luca Bruno <lethalman88@gmail.com> | 2015-02-05 18:07:28 +0100 |
commit | 3f718a743dba51bd71acf03dc0e8d7bbff7410f4 (patch) | |
tree | a8caa519e4f788f8042cb87664eb987351854f08 /pkgs/development/go-modules | |
parent | 4ce497e74f3aaf2fb1c0c9521505568c61a7ccbb (diff) |
Add dontInstallSrc flag to buildGoPackage
Diffstat (limited to 'pkgs/development/go-modules')
-rw-r--r-- | pkgs/development/go-modules/generic/default.nix | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/pkgs/development/go-modules/generic/default.nix b/pkgs/development/go-modules/generic/default.nix index fcf991f12f28..5dcfa4502aca 100644 --- a/pkgs/development/go-modules/generic/default.nix +++ b/pkgs/development/go-modules/generic/default.nix @@ -64,12 +64,16 @@ go.stdenv.mkDerivation ( args // { installPhase = args.installPhase or '' runHook preInstall - local dir - for d in pkg src; do - mkdir -p $out/share/go - dir="$NIX_BUILD_TOP/go/$d" - [ -e "$dir" ] && cp -r $dir $out/share/go - done + mkdir $out + + if [ -z "$dontInstallSrc" ]; then + local dir + for d in pkg src; do + mkdir -p $out/share/go + dir="$NIX_BUILD_TOP/go/$d" + [ -e "$dir" ] && cp -r $dir $out/share/go + done + fi dir="$NIX_BUILD_TOP/go/bin" [ -e "$dir" ] && cp -r $dir $out |