mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-12-26 04:43:09 +03:00
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 { };
|
fetchNuGet = callPackage ../build-support/fetchnuget { };
|
||||||
buildDotnetPackage = callPackage ../build-support/build-dotnet-package { };
|
buildDotnetPackage = callPackage ../build-support/build-dotnet-package { };
|
||||||
|
|
||||||
|
fetchgx = callPackage ../build-support/fetchgx { };
|
||||||
|
|
||||||
resolveMirrorURLs = {url}: fetchurl {
|
resolveMirrorURLs = {url}: fetchurl {
|
||||||
showURLs = true;
|
showURLs = true;
|
||||||
inherit url;
|
inherit url;
|
||||||
|
Loading…
Reference in New Issue
Block a user