fetchgx: fetch dependencies with gx and gx-go

This commit is contained in:
Franz Pletz 2016-10-29 05:17:27 +02:00
parent 24e4d4d76a
commit ff04adf871
No known key found for this signature in database
GPG key ID: 846FDED7792617B4
2 changed files with 32 additions and 0 deletions

View file

@ -0,0 +1,30 @@
{ stdenv, gx, gx-go, go, cacert }:
{ name, src, sha256 }:
stdenv.mkDerivation {
name = "${name}-gxdeps";
inherit src;
buildInputs = [ go gx gx-go ];
outputHashAlgo = "sha256";
outputHashMode = "recursive";
outputHash = sha256;
phases = [ "unpackPhase" "buildPhase" "installPhase" ];
SSL_CERT_FILE = "${cacert}/etc/ssl/certs/ca-bundle.crt";
buildPhase = ''
export GOPATH=$(pwd)/vendor
mkdir vendor
gx install
'';
installPhase = ''
mv vendor $out
'';
preferLocalBuild = true;
}

View file

@ -250,6 +250,8 @@ in
fetchNuGet = callPackage ../build-support/fetchnuget { };
buildDotnetPackage = callPackage ../build-support/build-dotnet-package { };
fetchgx = callPackage ../build-support/fetchgx { };
resolveMirrorURLs = {url}: fetchurl {
showURLs = true;
inherit url;