depot/third_party/nixpkgs/pkgs/development/beam-modules/fetch-rebar-deps.nix
Default email c594a97518 Project import generated by Copybara.
GitOrigin-RevId: 301aada7a64812853f2e2634a530ef5d34505048
2022-10-21 20:38:19 +02:00

43 lines
719 B
Nix

{ lib, stdenv, rebar3 }:
{ name
, version
, sha256
, src
, meta ? { }
}:
with lib;
stdenv.mkDerivation ({
pname = "rebar-deps-${name}";
inherit version;
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 = ''
runHook preInstall
mkdir -p "$out/_checkouts"
for i in ./_build/default/lib/* ; do
echo "$i"
cp -R "$i" "$out/_checkouts"
done
runHook postInstall
'';
outputHashAlgo = "sha256";
outputHashMode = "recursive";
outputHash = sha256;
impureEnvVars = lib.fetchers.proxyImpureEnvVars;
inherit meta;
})