From 46f2b49b443a78b4d686827192aaf79df87a6f1e Mon Sep 17 00:00:00 2001 From: Spencer Baugh Date: Tue, 12 Feb 2019 19:17:05 +0000 Subject: [PATCH] pythonPackages.pkgconfig: use same setupHook as pkgconfig This setupHook is necessary for actually using pkgconfig. Without this setupHook, you need to put both pythonPackages.pkgconfig and pkgconfig into your buildInputs, just to get the setuphook of the latter. Previously, pythonPackages.pkgconfig depended on pkgconfig as a propagatedBuildInput, so this setupHook was propagated down to dependents. That was changed to a regular nativeBuildInput, so now this setupHook change is necessary for packages to only depend on pythonPackages.pkgconfig. A possible alternative is extracting out a common pkgconfigHook package and having both pythonPackages.pkgconfig and pkgconfig depend on that with propagatedBuildInputs. That might be necessary to avoid the buildHook running twice? --- pkgs/development/python-modules/pkgconfig/default.nix | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pkgs/development/python-modules/pkgconfig/default.nix b/pkgs/development/python-modules/pkgconfig/default.nix index 38098b432e45..ab8c2f638b41 100644 --- a/pkgs/development/python-modules/pkgconfig/default.nix +++ b/pkgs/development/python-modules/pkgconfig/default.nix @@ -4,6 +4,8 @@ buildPythonPackage rec { pname = "pkgconfig"; version = "1.4.0"; + setupHook = pkgconfig.setupHook; + src = fetchPypi { inherit pname version; sha256 = "048c3b457da7b6f686b647ab10bf09e2250e4c50acfe6f215398a8b5e6fcdb52";