nixpkgs/pkgs/development/beam-modules/fetch-rebar-deps.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

42 lines
708 B
Nix
Raw Normal View History

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