1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-12-11 23:24:35 +00:00
nixpkgs/pkgs/build-support/fetchgx/default.nix
Mateusz Naściszewski 00572d595c
ipfs: 0.4.6 -> 0.4.9
2017-05-24 16:31:17 +02:00

31 lines
534 B
Nix

{ 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" ];
NIX_SSL_CERT_FILE = "${cacert}/etc/ssl/certs/ca-bundle.crt";
buildPhase = ''
export GOPATH=$(pwd)/vendor
mkdir -p vendor
gx install
'';
installPhase = ''
mv vendor $out
'';
preferLocalBuild = true;
}