mirror of
https://github.com/SebastianWendel/nixpkgs.git
synced 2024-11-06 18:26:45 +01:00
34 lines
607 B
Nix
34 lines
607 B
Nix
{ lib, stdenv, rebar3 }:
|
|
|
|
{ name, version, sha256, src
|
|
, meta ? {}
|
|
}:
|
|
|
|
with lib;
|
|
|
|
stdenv.mkDerivation ({
|
|
name = "rebar-deps-${name}-${version}";
|
|
|
|
phases = [ "downloadPhase" "installPhase" ];
|
|
|
|
downloadPhase = ''
|
|
cp ${src} .
|
|
HOME='.' DEBUG=1 ${rebar3}/bin/rebar3 get-deps
|
|
'';
|
|
|
|
installPhase = ''
|
|
mkdir -p "$out/_checkouts"
|
|
for i in ./_build/default/lib/* ; do
|
|
echo "$i"
|
|
cp -R "$i" "$out/_checkouts"
|
|
done
|
|
'';
|
|
|
|
outputHashAlgo = "sha256";
|
|
outputHashMode = "recursive";
|
|
outputHash = sha256;
|
|
|
|
impureEnvVars = lib.fetchers.proxyImpureEnvVars;
|
|
inherit meta;
|
|
})
|