fetchgx: fetch dependencies with gx and gx-go
This commit is contained in:
parent
24e4d4d76a
commit
ff04adf871
30
pkgs/build-support/fetchgx/default.nix
Normal file
30
pkgs/build-support/fetchgx/default.nix
Normal file
|
@ -0,0 +1,30 @@
|
|||
{ stdenv, gx, gx-go, go, cacert }:
|
||||
|
||||
{ name, src, sha256 }:
|
||||
|
||||
stdenv.mkDerivation {
|
||||
name = "${name}-gxdeps";
|
||||
inherit src;
|
||||
|
||||
buildInputs = [ go gx gx-go ];
|
||||
|
||||
outputHashAlgo = "sha256";
|
||||
outputHashMode = "recursive";
|
||||
outputHash = sha256;
|
||||
|
||||
phases = [ "unpackPhase" "buildPhase" "installPhase" ];
|
||||
|
||||
SSL_CERT_FILE = "${cacert}/etc/ssl/certs/ca-bundle.crt";
|
||||
|
||||
buildPhase = ''
|
||||
export GOPATH=$(pwd)/vendor
|
||||
mkdir vendor
|
||||
gx install
|
||||
'';
|
||||
|
||||
installPhase = ''
|
||||
mv vendor $out
|
||||
'';
|
||||
|
||||
preferLocalBuild = true;
|
||||
}
|
|
@ -250,6 +250,8 @@ in
|
|||
fetchNuGet = callPackage ../build-support/fetchnuget { };
|
||||
buildDotnetPackage = callPackage ../build-support/build-dotnet-package { };
|
||||
|
||||
fetchgx = callPackage ../build-support/fetchgx { };
|
||||
|
||||
resolveMirrorURLs = {url}: fetchurl {
|
||||
showURLs = true;
|
||||
inherit url;
|
||||
|
|
Loading…
Reference in a new issue