Browse Source

fetchgx: fetch dependencies with gx and gx-go

nixos-19.03
Franz Pletz 6 years ago
parent
commit
ff04adf871
No known key found for this signature in database
GPG Key ID: 846FDED7792617B4
  1. 30
      pkgs/build-support/fetchgx/default.nix
  2. 2
      pkgs/top-level/all-packages.nix

30
pkgs/build-support/fetchgx/default.nix

@ -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;
}

2
pkgs/top-level/all-packages.nix

@ -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…
Cancel
Save