Add rebar3-pc to plugin deps automatically if compilePorts is enabled
This commit is contained in:
parent
13a1ab440c
commit
7e57b20abc
@ -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: ''
|
||||
|
@ -5,5 +5,4 @@ buildHex {
|
||||
version = "0.2.1";
|
||||
sha256 = "1296fn1lz4lz4zqzn4dwc3flgkh0i6n4sydg501faabfbv8d3wkr";
|
||||
compilePorts = true;
|
||||
pluginDeps = [ rebar3-pc ];
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user