2018-01-09 23:38:19 +00:00
|
|
|
{ stdenvNoCC, gx, gx-go, go, cacert }:
|
2016-10-29 04:17:27 +01:00
|
|
|
|
|
|
|
{ name, src, sha256 }:
|
|
|
|
|
2018-01-09 23:38:19 +00:00
|
|
|
stdenvNoCC.mkDerivation {
|
2016-10-29 04:17:27 +01:00
|
|
|
name = "${name}-gxdeps";
|
|
|
|
inherit src;
|
|
|
|
|
2018-01-14 19:18:27 +00:00
|
|
|
nativeBuildInputs = [ cacert go gx gx-go ];
|
2016-10-29 04:17:27 +01:00
|
|
|
|
|
|
|
outputHashAlgo = "sha256";
|
|
|
|
outputHashMode = "recursive";
|
|
|
|
outputHash = sha256;
|
|
|
|
|
|
|
|
phases = [ "unpackPhase" "buildPhase" "installPhase" ];
|
|
|
|
|
|
|
|
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;
|
|
|
|
}
|