summary refs log tree commit diff
path: root/pkgs/tools
diff options
context:
space:
mode:
authorEelco Dolstra <eelco.dolstra@logicblox.com>2014-11-04 14:30:43 +0100
committerEelco Dolstra <eelco.dolstra@logicblox.com>2014-11-04 14:30:43 +0100
commit7495c61d49208a9fc90b937bca548d9005ff17c8 (patch)
tree5eec5f802d3146b8b1f788aa1275ea1c44a24d31 /pkgs/tools
parented867a50eb89a90db3b1741bf4c0bf0cd4557dba (diff)
parent899d81b37ba6dc26431b82b40300505f19504e03 (diff)
downloadnixpkgs-7495c61d49208a9fc90b937bca548d9005ff17c8.tar
nixpkgs-7495c61d49208a9fc90b937bca548d9005ff17c8.tar.gz
nixpkgs-7495c61d49208a9fc90b937bca548d9005ff17c8.tar.bz2
nixpkgs-7495c61d49208a9fc90b937bca548d9005ff17c8.tar.lz
nixpkgs-7495c61d49208a9fc90b937bca548d9005ff17c8.tar.xz
nixpkgs-7495c61d49208a9fc90b937bca548d9005ff17c8.tar.zst
nixpkgs-7495c61d49208a9fc90b937bca548d9005ff17c8.zip
Merge remote-tracking branch 'origin/darwin-clang-stdenv' into staging
Conflicts:
	pkgs/applications/editors/vim/macvim.nix
Diffstat (limited to 'pkgs/tools')
-rw-r--r--pkgs/tools/archivers/sharutils/default.nix6
-rw-r--r--pkgs/tools/compression/bzip2/default.nix2
-rw-r--r--pkgs/tools/misc/getopt/default.nix3
-rw-r--r--pkgs/tools/networking/isync/default.nix2
-rw-r--r--pkgs/tools/networking/strongswan/default.nix2
-rw-r--r--pkgs/tools/package-management/nix/default.nix3
-rw-r--r--pkgs/tools/package-management/nix/unstable.nix5
-rw-r--r--pkgs/tools/security/gnupg/clang.patch13
-rw-r--r--pkgs/tools/security/gnupg/default.nix1
-rw-r--r--pkgs/tools/system/tree/default.nix1
-rw-r--r--pkgs/tools/text/sgml/opensp/default.nix7
-rw-r--r--pkgs/tools/typesetting/tex/tetex/clang.patch13
-rw-r--r--pkgs/tools/typesetting/tex/tetex/default.nix2
-rw-r--r--pkgs/tools/typesetting/tex/tex4ht/default.nix2
-rw-r--r--pkgs/tools/typesetting/tex/texlive/default.nix1
15 files changed, 51 insertions, 12 deletions
diff --git a/pkgs/tools/archivers/sharutils/default.nix b/pkgs/tools/archivers/sharutils/default.nix
index f19564e4ad9..281a148a5ca 100644
--- a/pkgs/tools/archivers/sharutils/default.nix
+++ b/pkgs/tools/archivers/sharutils/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchurl, gettext }:
+{ stdenv, fetchurl, gettext, coreutils }:
 
 stdenv.mkDerivation rec {
   name = "sharutils-4.11.1";
@@ -12,11 +12,11 @@ stdenv.mkDerivation rec {
     ''
        # Fix for building on Glibc 2.16.  Won't be needed once the
        # gnulib in sharutils is updated.
-       sed -i '/gets is a security hole/d' lib/stdio.in.h
+       sed -i ${stdenv.lib.optionalString (stdenv.isBSD && stdenv.gcc.nativeTools) "''"} '/gets is a security hole/d' lib/stdio.in.h
     '';
 
   # GNU Gettext is needed on non-GNU platforms.
-  buildInputs = [ gettext ];
+  buildInputs = [ gettext coreutils ];
 
   doCheck = true;
 
diff --git a/pkgs/tools/compression/bzip2/default.nix b/pkgs/tools/compression/bzip2/default.nix
index 55fca6ca3cb..256f574c2e0 100644
--- a/pkgs/tools/compression/bzip2/default.nix
+++ b/pkgs/tools/compression/bzip2/default.nix
@@ -26,6 +26,8 @@ stdenv.mkDerivation {
   sharedLibrary =
     !stdenv.isDarwin && !(stdenv ? isDietLibC) && !(stdenv ? isStatic) && stdenv.system != "i686-cygwin" && !linkStatic;
 
+  patchPhase = stdenv.lib.optionalString stdenv.isDarwin "substituteInPlace Makefile --replace 'CC=gcc' 'CC=clang'";
+
   preConfigure = "substituteInPlace Makefile --replace '$(PREFIX)/man' '$(PREFIX)/share/man'";
 
   makeFlags = if linkStatic then "LDFLAGS=-static" else "";
diff --git a/pkgs/tools/misc/getopt/default.nix b/pkgs/tools/misc/getopt/default.nix
index d181388f6c7..ed4cde69eda 100644
--- a/pkgs/tools/misc/getopt/default.nix
+++ b/pkgs/tools/misc/getopt/default.nix
@@ -7,4 +7,7 @@ stdenv.mkDerivation {
     url = http://tarballs.nixos.org/getopt-1.1.4.tar.gz;
     sha256 = "1arvjfzw6p310zbgv629w5hkyslrj44imf3r3s2r4ry2jfcks221";
   };
+  preBuild = ''
+    export buildFlags=CC="$CC" # for darwin
+  '';
 }
diff --git a/pkgs/tools/networking/isync/default.nix b/pkgs/tools/networking/isync/default.nix
index 2d3ffb2cb0a..021f470af24 100644
--- a/pkgs/tools/networking/isync/default.nix
+++ b/pkgs/tools/networking/isync/default.nix
@@ -16,6 +16,6 @@ stdenv.mkDerivation rec {
     license = [ "GPLv2+" ];
 
     maintainers = with stdenv.lib.maintainers; [ the-kenny viric ];
-    platforms = stdenv.lib.platforms.linux;
+    platforms = stdenv.lib.platforms.unix;
   };
 }
diff --git a/pkgs/tools/networking/strongswan/default.nix b/pkgs/tools/networking/strongswan/default.nix
index 391fd883364..16997ac8e3d 100644
--- a/pkgs/tools/networking/strongswan/default.nix
+++ b/pkgs/tools/networking/strongswan/default.nix
@@ -19,6 +19,6 @@ stdenv.mkDerivation rec {
     description = "OpenSource IPsec-based VPN Solution";
     homepage = https://www.strongswan.org;
     license = stdenv.lib.licenses.gpl2Plus;
-    inherit (stdenv.gcc.clang.meta) platforms;
+    inherit (stdenv.gcc.gcc.meta) platforms;
   };
 }
diff --git a/pkgs/tools/package-management/nix/default.nix b/pkgs/tools/package-management/nix/default.nix
index 6631214f39a..55f5b0aedc9 100644
--- a/pkgs/tools/package-management/nix/default.nix
+++ b/pkgs/tools/package-management/nix/default.nix
@@ -66,6 +66,9 @@ stdenv.mkDerivation rec {
   enableParallelBuilding = true;
 
   meta = {
+    # due to builder args bug; see
+    # https://github.com/NixOS/nix/commit/b224ac15201c57b40ea855f5a98b1bd166c1c7f6
+    broken = stdenv.isDarwin;
     description = "Powerful package manager that makes package management reliable and reproducible";
     longDescription = ''
       Nix is a powerful package manager for Linux and other Unix systems that
diff --git a/pkgs/tools/package-management/nix/unstable.nix b/pkgs/tools/package-management/nix/unstable.nix
index 23ecf9ac6e0..e3126fd40a3 100644
--- a/pkgs/tools/package-management/nix/unstable.nix
+++ b/pkgs/tools/package-management/nix/unstable.nix
@@ -1,5 +1,5 @@
 { stdenv, fetchurl, perl, curl, bzip2, sqlite, openssl ? null
-, pkgconfig, boehmgc, perlPackages
+, pkgconfig, boehmgc, perlPackages, bash
 , storeDir ? "/nix/store"
 , stateDir ? "/nix/var"
 }:
@@ -24,6 +24,7 @@ stdenv.mkDerivation rec {
   postUnpack =
     '' export CPATH="${bzip2}/include"
        export LIBRARY_PATH="${bzip2}/lib"
+       export CXXFLAGS="-O3 -Wno-error=reserved-user-defined-literal"
     '';
 
   configureFlags =
@@ -34,7 +35,7 @@ stdenv.mkDerivation rec {
       --with-www-curl=${perlPackages.WWWCurl}/${perl.libPrefix}
       --disable-init-state
       --enable-gc
-      CFLAGS=-O3 CXXFLAGS=-O3
+      CFLAGS=-O3
     '';
 
   makeFlags = "profiledir=$(out)/etc/profile.d";
diff --git a/pkgs/tools/security/gnupg/clang.patch b/pkgs/tools/security/gnupg/clang.patch
new file mode 100644
index 00000000000..842785e5c93
--- /dev/null
+++ b/pkgs/tools/security/gnupg/clang.patch
@@ -0,0 +1,13 @@
+diff --git a/gl/stdint_.h b/gl/stdint_.h
+index bc27595..303e81a 100644
+--- a/gl/stdint_.h
++++ b/gl/stdint_.h
+@@ -62,7 +62,7 @@
+      int{8,16,32,64}_t, uint{8,16,32,64}_t and __BIT_TYPES_DEFINED__.
+      <inttypes.h> also defines intptr_t and uintptr_t.  */
+ # define _GL_JUST_INCLUDE_ABSOLUTE_INTTYPES_H
+-# include <inttypes.h>
++// # include <inttypes.h>
+ # undef _GL_JUST_INCLUDE_ABSOLUTE_INTTYPES_H
+ #elif @HAVE_SYS_INTTYPES_H@
+   /* Solaris 7 <sys/inttypes.h> has the types except the *_fast*_t types, and
diff --git a/pkgs/tools/security/gnupg/default.nix b/pkgs/tools/security/gnupg/default.nix
index 45a25d7e242..58a7cb7e34c 100644
--- a/pkgs/tools/security/gnupg/default.nix
+++ b/pkgs/tools/security/gnupg/default.nix
@@ -20,6 +20,7 @@ stdenv.mkDerivation rec {
 
   patchPhase = ''
     find tests -type f | xargs sed -e 's@/bin/pwd@${coreutils}&@g' -i
+    patch gl/stdint_.h < ${./clang.patch}
   '';
 
   configureFlags =
diff --git a/pkgs/tools/system/tree/default.nix b/pkgs/tools/system/tree/default.nix
index e108589aaef..eca8882643d 100644
--- a/pkgs/tools/system/tree/default.nix
+++ b/pkgs/tools/system/tree/default.nix
@@ -37,6 +37,7 @@ stdenv.mkDerivation {
       prefix=$out
       MANDIR=$out/share/man/man1
       ${systemFlags}
+      CC="$CC"
     )
   '';
 
diff --git a/pkgs/tools/text/sgml/opensp/default.nix b/pkgs/tools/text/sgml/opensp/default.nix
index 23ce8ccc5a8..4b807718baa 100644
--- a/pkgs/tools/text/sgml/opensp/default.nix
+++ b/pkgs/tools/text/sgml/opensp/default.nix
@@ -1,4 +1,4 @@
-{stdenv, fetchurl, xmlto, docbook_xml_dtd_412, libxslt, docbook_xsl}:
+{ lib, stdenv, fetchurl, xmlto, docbook_xml_dtd_412, libxslt, docbook_xsl }:
 
 stdenv.mkDerivation {
   name = "opensp-1.5.2";
@@ -13,6 +13,10 @@ stdenv.mkDerivation {
       docsrc/*.xml
   '';
 
+  configureFlags = lib.optional stdenv.isDarwin [
+    "--with-libintl-prefix=/usr"
+    "--with-libiconv-prefix=/usr"
+  ];
 
   setupHook = ./setup-hook.sh;
 
@@ -22,7 +26,6 @@ stdenv.mkDerivation {
     sed -i -e 's/name="idm.*"//g' $out/share/doc/OpenSP/releasenotes.html
     '';
 
-
   buildInputs = [ xmlto docbook_xml_dtd_412 libxslt docbook_xsl ];
 
   meta = {
diff --git a/pkgs/tools/typesetting/tex/tetex/clang.patch b/pkgs/tools/typesetting/tex/tetex/clang.patch
new file mode 100644
index 00000000000..50d83f62443
--- /dev/null
+++ b/pkgs/tools/typesetting/tex/tetex/clang.patch
@@ -0,0 +1,13 @@
+diff --git a/texk/ps2pkm/type1.c b/texk/ps2pkm/type1.c
+index 027bf1f..4dcbad0 100644
+--- a/texk/ps2pkm/type1.c
++++ b/texk/ps2pkm/type1.c
+@@ -800,7 +800,7 @@ static void PSFakePush(Num)
+ static DOUBLE PSFakePop ()
+ {
+   if (PSFakeTop >= 0) return(PSFakeStack[PSFakeTop--]);
+-  else Error0("PSFakePop : Stack empty\n");
++  else { CC; IfTrace0(TRUE, "PSFakePop : Stack empty\n"); errflag = TRUE; return 0; }
+   /*NOTREACHED*/
+ }
+  
diff --git a/pkgs/tools/typesetting/tex/tetex/default.nix b/pkgs/tools/typesetting/tex/tetex/default.nix
index 5cd3228aced..173571eda23 100644
--- a/pkgs/tools/typesetting/tex/tetex/default.nix
+++ b/pkgs/tools/typesetting/tex/tetex/default.nix
@@ -20,7 +20,7 @@ stdenv.mkDerivation {
     sed -i 57d texk/kpathsea/c-std.h
   '';
 
-  patches = [ ./environment.patch ./getline.patch ];
+  patches = [ ./environment.patch ./getline.patch ./clang.patch ];
 
   setupHook = ./setup-hook.sh;
 
diff --git a/pkgs/tools/typesetting/tex/tex4ht/default.nix b/pkgs/tools/typesetting/tex/tex4ht/default.nix
index 69d02a275b3..93d33439084 100644
--- a/pkgs/tools/typesetting/tex/tex4ht/default.nix
+++ b/pkgs/tools/typesetting/tex/tex4ht/default.nix
@@ -14,7 +14,7 @@ stdenv.mkDerivation rec {
     cd src
     for f in tex4ht t4ht htcmd ; do
       # -DENVFILE="$out/share/texmf-nix/tex4ht/base/unix/tex4ht.env"
-      gcc -o $f $f.c -I${tetex}/include -L${tetex}/lib  -DHAVE_DIRENT_H -DHAVE_DIRENT_H -DKPATHSEA -lkpathsea
+      $CC -o $f $f.c -I${tetex}/include -L${tetex}/lib  -DHAVE_DIRENT_H -DHAVE_DIRENT_H -DKPATHSEA -lkpathsea
     done
     cd -
   '';
diff --git a/pkgs/tools/typesetting/tex/texlive/default.nix b/pkgs/tools/typesetting/tex/texlive/default.nix
index dc821fe6660..7179c353861 100644
--- a/pkgs/tools/typesetting/tex/texlive/default.nix
+++ b/pkgs/tools/typesetting/tex/texlive/default.nix
@@ -22,7 +22,6 @@ rec {
   setupHook = ./setup-hook.sh;
 
   doMainBuild = fullDepEntry ( stdenv.lib.optionalString stdenv.isDarwin ''
-    export MACOSX_DEPLOYMENT_TARGET=10.9
     export DYLD_LIBRARY_PATH="${poppler}/lib"
   '' + ''
     mkdir -p $out