mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-22 15:03:28 +00:00
use lib only where required
use standard phases
This commit is contained in:
parent
39c85b0bcf
commit
f38079ff95
@ -1,14 +1,10 @@
|
||||
{ stdenvNoCC, elixir, hex, rebar, rebar3, cacert, git }:
|
||||
{ stdenvNoCC, lib, elixir, hex, rebar, rebar3, cacert, git }:
|
||||
|
||||
{ name, version, sha256, src, mixEnv ? "prod", debug ? false, meta ? { } }:
|
||||
|
||||
with stdenvNoCC.lib;
|
||||
|
||||
stdenvNoCC.mkDerivation ({
|
||||
name = "mix-deps-${name}-${version}";
|
||||
|
||||
phases = [ "configurePhase" "downloadPhase" ];
|
||||
|
||||
nativeBuildInputs = [ elixir hex cacert git ];
|
||||
|
||||
inherit src;
|
||||
@ -29,9 +25,9 @@ stdenvNoCC.mkDerivation ({
|
||||
export REBAR_CACHE_DIR="$TMPDIR/rebar3.cache"
|
||||
'';
|
||||
|
||||
downloadPhase = ''
|
||||
ln -s ${src}/mix.exs ./mix.exs
|
||||
ln -s ${src}/mix.lock ./mix.lock
|
||||
dontBuild = true;
|
||||
|
||||
installPhase = ''
|
||||
mix deps.get --only ${mixEnv}
|
||||
'';
|
||||
|
||||
@ -39,6 +35,6 @@ stdenvNoCC.mkDerivation ({
|
||||
outputHashMode = "recursive";
|
||||
outputHash = sha256;
|
||||
|
||||
impureEnvVars = stdenvNoCC.lib.fetchers.proxyImpureEnvVars;
|
||||
impureEnvVars = lib.fetchers.proxyImpureEnvVars;
|
||||
inherit meta;
|
||||
})
|
||||
|
Loading…
Reference in New Issue
Block a user