From 7e57b20abc0f23c27eb7b315cb4bf0596160ab67 Mon Sep 17 00:00:00 2001 From: Gleb Peregud Date: Sat, 12 Dec 2015 08:54:57 +0100 Subject: [PATCH] Add rebar3-pc to plugin deps automatically if compilePorts is enabled --- pkgs/development/erlang-modules/build-hex.nix | 6 ++++-- pkgs/development/erlang-modules/hex/esqlite.nix | 1 - 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/pkgs/development/erlang-modules/build-hex.nix b/pkgs/development/erlang-modules/build-hex.nix index 777a5c5047f4..6a1f4172bbd3 100644 --- a/pkgs/development/erlang-modules/build-hex.nix +++ b/pkgs/development/erlang-modules/build-hex.nix @@ -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: '' diff --git a/pkgs/development/erlang-modules/hex/esqlite.nix b/pkgs/development/erlang-modules/hex/esqlite.nix index 7bcd69c0555a..1fc3a2e91dc6 100644 --- a/pkgs/development/erlang-modules/hex/esqlite.nix +++ b/pkgs/development/erlang-modules/hex/esqlite.nix @@ -5,5 +5,4 @@ buildHex { version = "0.2.1"; sha256 = "1296fn1lz4lz4zqzn4dwc3flgkh0i6n4sydg501faabfbv8d3wkr"; compilePorts = true; - pluginDeps = [ rebar3-pc ]; }