2021-01-23 17:15:07 +00:00
|
|
|
{ lib, stdenv, rebar3 }:
|
2019-01-16 21:51:19 +00:00
|
|
|
|
2021-08-16 21:09:48 +01:00
|
|
|
{ name
|
|
|
|
, version
|
|
|
|
, sha256
|
|
|
|
, src
|
|
|
|
, meta ? { }
|
2019-01-16 21:51:19 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
stdenv.mkDerivation ({
|
2021-08-16 21:09:48 +01:00
|
|
|
pname = "rebar-deps-${name}";
|
|
|
|
inherit version;
|
2019-01-16 21:51:19 +00:00
|
|
|
|
2021-08-16 21:09:48 +01:00
|
|
|
dontUnpack = true;
|
2021-08-17 04:05:49 +01:00
|
|
|
dontConfigure = true;
|
|
|
|
dontFixup = true;
|
2019-01-16 21:51:19 +00:00
|
|
|
|
2022-09-15 21:25:47 +01:00
|
|
|
buildPhase = ''
|
|
|
|
cp -r ${src} src
|
|
|
|
chmod -R u+w src
|
|
|
|
cd src
|
2019-01-16 21:51:19 +00:00
|
|
|
HOME='.' DEBUG=1 ${rebar3}/bin/rebar3 get-deps
|
|
|
|
'';
|
|
|
|
|
|
|
|
installPhase = ''
|
2021-08-16 21:09:48 +01:00
|
|
|
runHook preInstall
|
2019-01-16 21:51:19 +00:00
|
|
|
mkdir -p "$out/_checkouts"
|
|
|
|
for i in ./_build/default/lib/* ; do
|
|
|
|
echo "$i"
|
|
|
|
cp -R "$i" "$out/_checkouts"
|
|
|
|
done
|
2021-08-16 21:09:48 +01:00
|
|
|
runHook postInstall
|
2019-01-16 21:51:19 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
outputHashAlgo = "sha256";
|
|
|
|
outputHashMode = "recursive";
|
|
|
|
outputHash = sha256;
|
|
|
|
|
2021-01-23 17:15:07 +00:00
|
|
|
impureEnvVars = lib.fetchers.proxyImpureEnvVars;
|
2019-06-16 20:59:06 +01:00
|
|
|
inherit meta;
|
2019-01-16 21:51:19 +00:00
|
|
|
})
|