mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-21 22:43:01 +00:00
fetchgx: support hash
attribute
This commit is contained in:
parent
45b95421fd
commit
b5aefcd40a
@ -1,30 +1,31 @@
|
|||||||
{ stdenvNoCC, gx, gx-go, go, cacert }:
|
{ lib, stdenvNoCC, gx, gx-go, go, cacert }:
|
||||||
|
|
||||||
{ name, src, sha256 }:
|
lib.fetchers.withNormalizedHash { } (
|
||||||
|
{ name, src, outputHash, outputHashAlgo }:
|
||||||
|
|
||||||
stdenvNoCC.mkDerivation {
|
stdenvNoCC.mkDerivation {
|
||||||
name = "${name}-gxdeps";
|
name = "${name}-gxdeps";
|
||||||
inherit src;
|
inherit src;
|
||||||
|
|
||||||
nativeBuildInputs = [ cacert go gx gx-go ];
|
nativeBuildInputs = [ cacert go gx gx-go ];
|
||||||
|
|
||||||
outputHashAlgo = "sha256";
|
inherit outputHash outputHashAlgo;
|
||||||
outputHashMode = "recursive";
|
outputHashMode = "recursive";
|
||||||
outputHash = sha256;
|
|
||||||
|
|
||||||
dontConfigure = true;
|
dontConfigure = true;
|
||||||
doCheck = false;
|
doCheck = false;
|
||||||
doInstallCheck = false;
|
doInstallCheck = false;
|
||||||
|
|
||||||
buildPhase = ''
|
buildPhase = ''
|
||||||
export GOPATH=$(pwd)/vendor
|
export GOPATH=$(pwd)/vendor
|
||||||
mkdir -p vendor
|
mkdir -p vendor
|
||||||
gx install
|
gx install
|
||||||
'';
|
'';
|
||||||
|
|
||||||
installPhase = ''
|
installPhase = ''
|
||||||
mv vendor $out
|
mv vendor $out
|
||||||
'';
|
'';
|
||||||
|
|
||||||
preferLocalBuild = true;
|
preferLocalBuild = true;
|
||||||
}
|
}
|
||||||
|
)
|
||||||
|
Loading…
Reference in New Issue
Block a user