depot/third_party/nixpkgs/pkgs/development/beam-modules/fetch-rebar-deps.nix
Default email b6f2ab0a42 Project import generated by Copybara.
GitOrigin-RevId: 253aecf69ed7595aaefabde779aa6449195bebb7
2021-08-18 15:19:15 +02:00

42 lines
701 B
Nix

{ lib, stdenv, rebar3 }:
{ name
, version
, sha256
, src
, meta ? { }
}:
with lib;
stdenv.mkDerivation ({
pname = "rebar-deps-${name}";
inherit version;
dontUnpack = true;
dontConfigure = true;
dontBuild = true;
dontFixup = true;
prePhases = ''
cp ${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;
})