2021-02-05 17:12:51 +00:00
|
|
|
{ lib, stdenv, rebar3 }:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-08-18 13:19:15 +00:00
|
|
|
{ name
|
|
|
|
, version
|
|
|
|
, sha256
|
|
|
|
, src
|
|
|
|
, meta ? { }
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
stdenv.mkDerivation ({
|
2021-08-18 13:19:15 +00:00
|
|
|
pname = "rebar-deps-${name}";
|
|
|
|
inherit version;
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-08-18 13:19:15 +00:00
|
|
|
dontUnpack = true;
|
|
|
|
dontConfigure = true;
|
|
|
|
dontFixup = true;
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2022-10-21 18:38:19 +00:00
|
|
|
buildPhase = ''
|
|
|
|
cp -r ${src} src
|
|
|
|
chmod -R u+w src
|
|
|
|
cd src
|
2020-04-24 23:36:52 +00:00
|
|
|
HOME='.' DEBUG=1 ${rebar3}/bin/rebar3 get-deps
|
|
|
|
'';
|
|
|
|
|
|
|
|
installPhase = ''
|
2021-08-18 13:19:15 +00:00
|
|
|
runHook preInstall
|
2020-04-24 23:36:52 +00:00
|
|
|
mkdir -p "$out/_checkouts"
|
|
|
|
for i in ./_build/default/lib/* ; do
|
|
|
|
echo "$i"
|
|
|
|
cp -R "$i" "$out/_checkouts"
|
|
|
|
done
|
2021-08-18 13:19:15 +00:00
|
|
|
runHook postInstall
|
2020-04-24 23:36:52 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
outputHashAlgo = "sha256";
|
|
|
|
outputHashMode = "recursive";
|
|
|
|
outputHash = sha256;
|
|
|
|
|
2021-02-05 17:12:51 +00:00
|
|
|
impureEnvVars = lib.fetchers.proxyImpureEnvVars;
|
2020-04-24 23:36:52 +00:00
|
|
|
inherit meta;
|
|
|
|
})
|