depot/third_party/nixpkgs/pkgs/build-support/fetchgx/default.nix
Default email 619d6dcc77 Project import generated by Copybara.
GitOrigin-RevId: 870959c7fb3a42af1863bed9e1756086a74eb649
2021-08-22 09:53:02 +02:00

30 lines
502 B
Nix

{ stdenvNoCC, gx, gx-go, go, cacert }:
{ name, src, sha256 }:
stdenvNoCC.mkDerivation {
name = "${name}-gxdeps";
inherit src;
nativeBuildInputs = [ cacert go gx gx-go ];
outputHashAlgo = "sha256";
outputHashMode = "recursive";
outputHash = sha256;
dontConfigure = true;
doCheck = false;
doInstallCheck = false;
buildPhase = ''
export GOPATH=$(pwd)/vendor
mkdir -p vendor
gx install
'';
installPhase = ''
mv vendor $out
'';
preferLocalBuild = true;
}