Merge pull request #52460 from Mic92/go-pname

buildGoPackage: also support pname
This commit is contained in:
Jörg Thalheim 2018-12-18 04:54:47 +00:00 committed by GitHub
commit 97d35b661c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,7 +1,10 @@
{ go, govers, lib, fetchgit, fetchhg, fetchbzr, rsync
, removeReferencesTo, fetchFromGitHub, stdenv }:
{ name, buildInputs ? [], nativeBuildInputs ? [], passthru ? {}, preFixup ? ""
{ buildInputs ? []
, nativeBuildInputs ? []
, passthru ? {}
, preFixup ? ""
, shellHook ? ""
# We want parallel builds by default
@ -34,7 +37,6 @@
, meta ? {}, ... } @ args':
if disabled then throw "${name} not supported for go ${go.meta.branch}" else
with builtins;
@ -72,12 +74,9 @@ let
goPath = if goDeps != null then importGodeps { depsFile = goDeps; } ++ extraSrcs
else extraSrcs;
in
go.stdenv.mkDerivation (
package = go.stdenv.mkDerivation (
(builtins.removeAttrs args [ "goPackageAliases" "disabled" ]) // {
inherit name;
nativeBuildInputs = [ removeReferencesTo go ]
++ (lib.optional (!dontRenameImports) govers) ++ nativeBuildInputs;
buildInputs = buildInputs;
@ -238,4 +237,8 @@ go.stdenv.mkDerivation (
maintainers = (meta.maintainers or []) ++
[ lib.maintainers.ehmry lib.maintainers.lethalman ];
};
})
});
in if disabled then
throw "${package.name} not supported for go ${go.meta.branch}"
else
package