Merge pull request #43657 from nlewo/pr-go-shellhook
buildGoPackage: add shellHook attribute
This commit is contained in:
commit
34abb79686
@ -2,6 +2,7 @@
|
|||||||
, removeReferencesTo, fetchFromGitHub }:
|
, removeReferencesTo, fetchFromGitHub }:
|
||||||
|
|
||||||
{ name, buildInputs ? [], nativeBuildInputs ? [], passthru ? {}, preFixup ? ""
|
{ name, buildInputs ? [], nativeBuildInputs ? [], passthru ? {}, preFixup ? ""
|
||||||
|
, shellHook ? ""
|
||||||
|
|
||||||
# We want parallel builds by default
|
# We want parallel builds by default
|
||||||
, enableParallelBuilding ? true
|
, enableParallelBuilding ? true
|
||||||
@ -198,7 +199,7 @@ go.stdenv.mkDerivation (
|
|||||||
''
|
''
|
||||||
) goPath) + ''
|
) goPath) + ''
|
||||||
export GOPATH=${lib.concatStringsSep ":" ( ["$d"] ++ ["$GOPATH"] ++ ["$PWD"] ++ extraSrcPaths)}
|
export GOPATH=${lib.concatStringsSep ":" ( ["$d"] ++ ["$GOPATH"] ++ ["$PWD"] ++ extraSrcPaths)}
|
||||||
'';
|
'' + shellHook;
|
||||||
|
|
||||||
disallowedReferences = lib.optional (!allowGoReference) go
|
disallowedReferences = lib.optional (!allowGoReference) go
|
||||||
++ lib.optional (!dontRenameImports) govers;
|
++ lib.optional (!dontRenameImports) govers;
|
||||||
|
Loading…
Reference in New Issue
Block a user