2016-10-29 04:17:27 +01:00
|
|
|
{ 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" ];
|
|
|
|
|
2017-05-24 15:31:17 +01:00
|
|
|
NIX_SSL_CERT_FILE = "${cacert}/etc/ssl/certs/ca-bundle.crt";
|
2016-10-29 04:17:27 +01:00
|
|
|
|
|
|
|
buildPhase = ''
|
|
|
|
export GOPATH=$(pwd)/vendor
|
2017-03-21 13:25:49 +00:00
|
|
|
mkdir -p vendor
|
2016-10-29 04:17:27 +01:00
|
|
|
gx install
|
|
|
|
'';
|
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
mv vendor $out
|
|
|
|
'';
|
|
|
|
|
|
|
|
preferLocalBuild = true;
|
|
|
|
}
|