From e0e42141d9ea6fdb840e27fa416241c186a196b6 Mon Sep 17 00:00:00 2001 From: Peter Simons Date: Sun, 24 Jul 2011 19:15:03 +0000 Subject: [PATCH] tree: blind attempt to fix the build on Darwin svn path=/nixpkgs/trunk/; revision=27917 --- pkgs/tools/system/tree/default.nix | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/pkgs/tools/system/tree/default.nix b/pkgs/tools/system/tree/default.nix index 77c075c89bba..14057ba393e3 100644 --- a/pkgs/tools/system/tree/default.nix +++ b/pkgs/tools/system/tree/default.nix @@ -2,6 +2,17 @@ let version = "1.6.0"; + + # These settings are found in the Makefile, but there seems to be no + # way to select one ore the other setting other than editing the file + # manually, so we have to duplicate the know how here. + systemFlags = + if stdenv.isDarwin then '' + CFLAGS="-O2 -Wall -fomit-frame-pointer -no-cpp-precomp" + LDFLAGS= + OBJS+=strverscmp.o + '' else + ""; in stdenv.mkDerivation { name = "tree-${version}"; @@ -15,6 +26,7 @@ stdenv.mkDerivation { makeFlagsArray=( prefix=$out MANDIR=$out/share/man/man1 + ${systemFlags} ) '';