From d05b21d7c0c53a11319279f05ba56333f9016818 Mon Sep 17 00:00:00 2001 From: Kamil Chmielewski Date: Thu, 6 Oct 2016 23:26:34 +0200 Subject: [PATCH] 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 --- pkgs/development/go-modules/generic/default.nix | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) 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}"; };