summary refs log tree commit diff
diff options
context:
space:
mode:
authorJaka Hudoklin <offlinehacker@users.noreply.github.com>2018-07-23 13:33:56 +0200
committerGitHub <noreply@github.com>2018-07-23 13:33:56 +0200
commit34abb796862a42679212a5a21afdd1bf0b2768e6 (patch)
tree1768a80a48020d198cf1d2be048fe63c7a6a0a4b
parent5fe904b7ecce7ef15a942a542f7e08e041bd7c0f (diff)
parenta8a5bf049653617e8913bfbe65ac7eb44dc5e597 (diff)
downloadnixlib-34abb796862a42679212a5a21afdd1bf0b2768e6.tar
nixlib-34abb796862a42679212a5a21afdd1bf0b2768e6.tar.gz
nixlib-34abb796862a42679212a5a21afdd1bf0b2768e6.tar.bz2
nixlib-34abb796862a42679212a5a21afdd1bf0b2768e6.tar.lz
nixlib-34abb796862a42679212a5a21afdd1bf0b2768e6.tar.xz
nixlib-34abb796862a42679212a5a21afdd1bf0b2768e6.tar.zst
nixlib-34abb796862a42679212a5a21afdd1bf0b2768e6.zip
Merge pull request #43657 from nlewo/pr-go-shellhook
buildGoPackage: add shellHook attribute
-rw-r--r--pkgs/development/go-modules/generic/default.nix3
1 files changed, 2 insertions, 1 deletions
diff --git a/pkgs/development/go-modules/generic/default.nix b/pkgs/development/go-modules/generic/default.nix
index bd047da4c919..bb9aaeb00cf2 100644
--- a/pkgs/development/go-modules/generic/default.nix
+++ b/pkgs/development/go-modules/generic/default.nix
@@ -2,6 +2,7 @@
 , removeReferencesTo, fetchFromGitHub }:
 
 { name, buildInputs ? [], nativeBuildInputs ? [], passthru ? {}, preFixup ? ""
+, shellHook ? ""
 
 # We want parallel builds by default
 , enableParallelBuilding ? true
@@ -198,7 +199,7 @@ go.stdenv.mkDerivation (
   ''
   ) goPath) + ''
     export GOPATH=${lib.concatStringsSep ":" ( ["$d"] ++ ["$GOPATH"] ++ ["$PWD"] ++ extraSrcPaths)}
-  '';
+  '' + shellHook;
 
   disallowedReferences = lib.optional (!allowGoReference) go
     ++ lib.optional (!dontRenameImports) govers;