depot/third_party/nixpkgs/pkgs/build-support/fetchgx/default.nix
Default email 472aeafc57 Project import generated by Copybara.
GitOrigin-RevId: c31898adf5a8ed202ce5bea9f347b1c6871f32d1
2024-10-04 18:56:33 +02:00

31 lines
592 B
Nix

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