Author: simons
Date: Sun Jul 24 19:15:03 2011
New Revision: 27917
URL: https://svn.nixos.org/websvn/nix/?rev=27917&sc=1

Log:
tree: blind attempt to fix the build on Darwin

Modified:
   nixpkgs/trunk/pkgs/tools/system/tree/default.nix

Modified: nixpkgs/trunk/pkgs/tools/system/tree/default.nix
==============================================================================
--- nixpkgs/trunk/pkgs/tools/system/tree/default.nix    Sun Jul 24 09:57:06 
2011        (r27916)
+++ nixpkgs/trunk/pkgs/tools/system/tree/default.nix    Sun Jul 24 19:15:03 
2011        (r27917)
@@ -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 @@
     makeFlagsArray=(
       prefix=$out
       MANDIR=$out/share/man/man1
+      ${systemFlags}
     )
   '';
 
_______________________________________________
nix-commits mailing list
[email protected]
http://mail.cs.uu.nl/mailman/listinfo/nix-commits

Reply via email to