Add rebar3-pc to plugin deps automatically if compilePorts is enabled

This commit is contained in:
Gleb Peregud 2015-12-12 08:54:57 +01:00
parent 13a1ab440c
commit 7e57b20abc
2 changed files with 4 additions and 3 deletions

View File

@ -1,4 +1,5 @@
{ stdenv, erlang, rebar3, openssl, libyaml, fetchurl, fetchFromGitHub }:
{ stdenv, erlang, rebar3, openssl, libyaml, fetchurl, fetchFromGitHub,
rebar3-pc }:
{ name, version, sha256
, hexPkg ? name
@ -45,9 +46,10 @@ stdenv.mkDerivation (attrs // {
'';
configurePhase = let
plugins = pluginDeps ++ (if compilePorts then [rebar3-pc] else []);
getDeps = drv: [drv] ++ (map getDeps drv.erlangDeps);
recursiveDeps = unique (flatten (map getDeps erlangDeps));
recursivePluginsDeps = unique (flatten (map getDeps pluginDeps));
recursivePluginsDeps = unique (flatten (map getDeps plugins));
in ''
runHook preConfigure
${concatMapStrings (dep: ''

View File

@ -5,5 +5,4 @@ buildHex {
version = "0.2.1";
sha256 = "1296fn1lz4lz4zqzn4dwc3flgkh0i6n4sydg501faabfbv8d3wkr";
compilePorts = true;
pluginDeps = [ rebar3-pc ];
}