Merge pull request #119126 from fabaff/pycomfoconnect
[NixPkgs.git] / pkgs / development / beam-modules / fetch-rebar-deps.nix
blobd858b3d81aff8ba94acecb2ee83435dce59f3c95
1 { lib, stdenv, rebar3 }:
3 { name, version, sha256, src
4 , meta ? {}
5 }:
7 with lib;
9 stdenv.mkDerivation ({
10   name = "rebar-deps-${name}-${version}";
12   phases = [ "downloadPhase" "installPhase" ];
14   downloadPhase = ''
15     cp ${src} .
16     HOME='.' DEBUG=1 ${rebar3}/bin/rebar3 get-deps
17   '';
19   installPhase = ''
20     mkdir -p "$out/_checkouts"
21     for i in ./_build/default/lib/* ; do
22        echo "$i"
23        cp -R "$i" "$out/_checkouts"
24     done
25   '';
27   outputHashAlgo = "sha256";
28   outputHashMode = "recursive";
29   outputHash = sha256;
31   impureEnvVars = lib.fetchers.proxyImpureEnvVars;
32   inherit meta;