about summary refs log tree commit diff
path: root/nixpkgs/pkgs/build-support/fetchgx/default.nix
blob: 93f60c0a9cac80159f2d9f1c3daa93adf7995af1 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
{ stdenvNoCC, gx, gx-go, go, cacert }:

{ name, src, sha256 }:

stdenvNoCC.mkDerivation {
  name = "${name}-gxdeps";
  inherit src;

  nativeBuildInputs = [ cacert go gx gx-go ];

  outputHashAlgo = "sha256";
  outputHashMode = "recursive";
  outputHash = sha256;

  dontConfigure = true;
  doCheck = false;
  doInstallCheck = false;

  buildPhase = ''
    export GOPATH=$(pwd)/vendor
    mkdir -p vendor
    gx install
  '';

  installPhase = ''
    mv vendor $out
  '';

  preferLocalBuild = true;
}