Merge pull request #19311 from kamilchm/goDeps-FromGitHub

goDeps: support fetchFromGitHub to fetch Go libs
This commit is contained in:
Orivej Desh 2017-11-05 18:16:35 +00:00 committed by GitHub
commit 99640dce1a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,4 +1,5 @@
{ go, govers, parallel, lib, fetchgit, fetchhg, fetchbzr, rsync, removeReferencesTo }: { go, govers, parallel, lib, fetchgit, fetchhg, fetchbzr, rsync
, removeReferencesTo, fetchFromGitHub }:
{ name, buildInputs ? [], nativeBuildInputs ? [], passthru ? {}, preFixup ? "" { name, buildInputs ? [], nativeBuildInputs ? [], passthru ? {}, preFixup ? ""
@ -58,6 +59,10 @@ let
fetchbzr { fetchbzr {
inherit (goDep.fetch) url rev sha256; inherit (goDep.fetch) url rev sha256;
} }
else if goDep.fetch.type == "FromGitHub" then
fetchFromGitHub {
inherit (goDep.fetch) owner repo rev sha256;
}
else abort "Unrecognized package fetch type: ${goDep.fetch.type}"; else abort "Unrecognized package fetch type: ${goDep.fetch.type}";
}; };