From eb1360bd663b1c9d2cbf7f2a124c8c2c359e49ce Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Tue, 17 Jan 2012 16:34:10 +0000 Subject: hwloc: Make it easy to disable optional dependencies; fix cross-builds. svn path=/nixpkgs/trunk/; revision=31606 --- pkgs/development/libraries/hwloc/default.nix | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'pkgs/development/libraries/hwloc/default.nix') diff --git a/pkgs/development/libraries/hwloc/default.nix b/pkgs/development/libraries/hwloc/default.nix index 303f2750d82a..09de2e702e13 100644 --- a/pkgs/development/libraries/hwloc/default.nix +++ b/pkgs/development/libraries/hwloc/default.nix @@ -9,7 +9,12 @@ stdenv.mkDerivation rec { }; # XXX: libX11 is not directly needed, but needed as a propagated dep of Cairo. - buildInputs = [ pkgconfig cairo expat ncurses libX11 ]; + buildNativeInputs = [ pkgconfig ]; + + # Filter out `null' inputs. This allows users to `.override' the + # derivation and set optional dependencies to `null'. + buildInputs = stdenv.lib.filter (x: x != null) + [ cairo expat ncurses libX11 ]; doCheck = true; -- cgit 1.4.1