From 4793092374fa9615bf3b072e4028e7092f9e8465 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= Date: Mon, 7 Jul 2008 22:02:36 +0000 Subject: [PATCH] GNU Make: Make `nix-log2xml' support optional. One question remains: how to make the option available to the user. `getConfig' is nice but useless as long as `useFromStdenv' prevails. svn path=/nixpkgs/trunk/; revision=12311 --- .../tools/build-managers/gnumake/default.nix | 27 ++++++++++--------- 1 file changed, 15 insertions(+), 12 deletions(-) diff --git a/pkgs/development/tools/build-managers/gnumake/default.nix b/pkgs/development/tools/build-managers/gnumake/default.nix index e4f4ded606b..602a0730e72 100644 --- a/pkgs/development/tools/build-managers/gnumake/default.nix +++ b/pkgs/development/tools/build-managers/gnumake/default.nix @@ -1,4 +1,4 @@ -{stdenv, fetchurl}: +{stdenv, fetchurl, log2xmlSupport ? true}: stdenv.mkDerivation { name = "gnumake-3.81"; @@ -7,15 +7,18 @@ stdenv.mkDerivation { md5 = "354853e0b2da90c527e35aabb8d6f1e6"; }; - patches = [ - # Provide nested log output for subsequent pretty-printing by - # nix-log2xml. - ./log.patch - - # Purity: don't look for library dependencies (of the form - # `-lfoo') in /lib and /usr/lib. It's a stupid feature anyway. - # Likewise, when searching for included Makefiles, don't look in - # /usr/include and friends. - ./impure-dirs.patch - ]; + patches = + (if log2xmlSupport + # Provide nested log output for subsequent pretty-printing by + # nix-log2xml. + then [ ./log.patch ] + else []) + ++ + [ + # Purity: don't look for library dependencies (of the form + # `-lfoo') in /lib and /usr/lib. It's a stupid feature anyway. + # Likewise, when searching for included Makefiles, don't look in + # /usr/include and friends. + ./impure-dirs.patch + ]; }