summary refs log blame commit diff
path: root/pkgs/build-support/fetchgx/default.nix
blob: 3ccf5d273fc5a9c7362cfcf7134eeac9399de8d5 (plain) (tree)
1
2
3
4
5
6
7
8
9
                                      


                      
                         


                          
                                             






                                                         

                               
                   








                          
{ 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;

  phases = [ "unpackPhase" "buildPhase" "installPhase" ];

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

  installPhase = ''
    mv vendor $out
  '';

  preferLocalBuild = true;
}