core/pkgs/build-support/fetchgx/default.nix
2024-06-30 09:16:52 +01:00

46 lines
538 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;
}