2016-10-29 05:17:27 +02:00
|
|
|
{ stdenv, gx, gx-go, go, cacert }:
|
|
|
|
|
|
|
|
{ name, src, sha256 }:
|
|
|
|
|
|
|
|
stdenv.mkDerivation {
|
|
|
|
name = "${name}-gxdeps";
|
|
|
|
inherit src;
|
|
|
|
|
2018-01-09 21:36:14 +01:00
|
|
|
nativeBuildInputs = [ go gx gx-go ];
|
2016-10-29 05:17:27 +02:00
|
|
|
|
|
|
|
outputHashAlgo = "sha256";
|
|
|
|
outputHashMode = "recursive";
|
|
|
|
outputHash = sha256;
|
|
|
|
|
|
|
|
phases = [ "unpackPhase" "buildPhase" "installPhase" ];
|
|
|
|
|
2017-05-24 16:31:17 +02:00
|
|
|
NIX_SSL_CERT_FILE = "${cacert}/etc/ssl/certs/ca-bundle.crt";
|
2016-10-29 05:17:27 +02:00
|
|
|
|
|
|
|
buildPhase = ''
|
|
|
|
export GOPATH=$(pwd)/vendor
|
2017-03-21 14:25:49 +01:00
|
|
|
mkdir -p vendor
|
2016-10-29 05:17:27 +02:00
|
|
|
gx install
|
|
|
|
'';
|
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
mv vendor $out
|
|
|
|
'';
|
|
|
|
|
|
|
|
preferLocalBuild = true;
|
|
|
|
}
|