about summary refs log tree commit diff
path: root/pkgs/development/go-modules/generic
diff options
context:
space:
mode:
authorKamil Chmielewski <kamil.chm@gmail.com>2016-10-06 23:26:34 +0200
committerSamuel Leathers <sam@appliedtrust.com>2017-11-01 01:28:57 +0100
commitd05b21d7c0c53a11319279f05ba56333f9016818 (patch)
tree3c115c6576b3e25fe9a206a8f15a525bf700df3a /pkgs/development/go-modules/generic
parentfe9cefa7e4ed4da1a0d1d9777bf0f7145fff22e3 (diff)
downloadnixlib-d05b21d7c0c53a11319279f05ba56333f9016818.tar
nixlib-d05b21d7c0c53a11319279f05ba56333f9016818.tar.gz
nixlib-d05b21d7c0c53a11319279f05ba56333f9016818.tar.bz2
nixlib-d05b21d7c0c53a11319279f05ba56333f9016818.tar.lz
nixlib-d05b21d7c0c53a11319279f05ba56333f9016818.tar.xz
nixlib-d05b21d7c0c53a11319279f05ba56333f9016818.tar.zst
nixlib-d05b21d7c0c53a11319279f05ba56333f9016818.zip
goDeps: support fetchFromGiHub to fetch Go libs
https://github.com/NixOS/nixpkgs/pull/16017#issuecomment-246252087
https://github.com/NixOS/nixpkgs/pull/17254#issuecomment-245297782
Diffstat (limited to 'pkgs/development/go-modules/generic')
-rw-r--r--pkgs/development/go-modules/generic/default.nix7
1 files changed, 6 insertions, 1 deletions
diff --git a/pkgs/development/go-modules/generic/default.nix b/pkgs/development/go-modules/generic/default.nix
index 5a1a0eb52eb3..3a973fc2644a 100644
--- a/pkgs/development/go-modules/generic/default.nix
+++ b/pkgs/development/go-modules/generic/default.nix
@@ -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 ? ""
 
@@ -58,6 +59,10 @@ let
         fetchbzr {
           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}";
     };