2021-01-23 17:15:07 +00:00
|
|
|
{ lib, stdenv, rebar3 }:
|
2019-01-16 21:51:19 +00:00
|
|
|
|
|
|
|
{ name, version, sha256, src
|
|
|
|
, meta ? {}
|
|
|
|
}:
|
|
|
|
|
2021-01-23 17:15:07 +00:00
|
|
|
with lib;
|
2019-01-16 21:51:19 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation ({
|
|
|
|
name = "rebar-deps-${name}-${version}";
|
|
|
|
|
|
|
|
phases = [ "downloadPhase" "installPhase" ];
|
|
|
|
|
|
|
|
downloadPhase = ''
|
|
|
|
cp ${src} .
|
|
|
|
HOME='.' DEBUG=1 ${rebar3}/bin/rebar3 get-deps
|
|
|
|
'';
|
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
mkdir -p "$out/_checkouts"
|
|
|
|
for i in ./_build/default/lib/* ; do
|
|
|
|
echo "$i"
|
|
|
|
cp -R "$i" "$out/_checkouts"
|
|
|
|
done
|
|
|
|
'';
|
|
|
|
|
|
|
|
outputHashAlgo = "sha256";
|
|
|
|
outputHashMode = "recursive";
|
|
|
|
outputHash = sha256;
|
|
|
|
|
2021-01-23 17:15:07 +00:00
|
|
|
impureEnvVars = lib.fetchers.proxyImpureEnvVars;
|
2019-06-16 19:59:06 +00:00
|
|
|
inherit meta;
|
2019-01-16 21:51:19 +00:00
|
|
|
})
|