diff options
author | Joel Taylor <me@joelt.io> | 2014-08-17 13:17:13 -0700 |
---|---|---|
committer | Joel Taylor <me@joelt.io> | 2014-09-09 13:54:24 -0700 |
commit | 3e8344d334d42824ac3061a919ac15b19a1bf21d (patch) | |
tree | 5ecad4218357caec8ddc27d5df150a5734db0281 /pkgs/tools | |
parent | e3fd4499ef296f4769cf4e9e91f1ccfd16325b0f (diff) | |
download | nixlib-3e8344d334d42824ac3061a919ac15b19a1bf21d.tar nixlib-3e8344d334d42824ac3061a919ac15b19a1bf21d.tar.gz nixlib-3e8344d334d42824ac3061a919ac15b19a1bf21d.tar.bz2 nixlib-3e8344d334d42824ac3061a919ac15b19a1bf21d.tar.lz nixlib-3e8344d334d42824ac3061a919ac15b19a1bf21d.tar.xz nixlib-3e8344d334d42824ac3061a919ac15b19a1bf21d.tar.zst nixlib-3e8344d334d42824ac3061a919ac15b19a1bf21d.zip |
suitable clang stdenv
Diffstat (limited to 'pkgs/tools')
-rw-r--r-- | pkgs/tools/archivers/sharutils/default.nix | 6 | ||||
-rw-r--r-- | pkgs/tools/misc/getopt/default.nix | 2 | ||||
-rw-r--r-- | pkgs/tools/security/gnupg/clang.patch | 13 | ||||
-rw-r--r-- | pkgs/tools/security/gnupg/default.nix | 1 | ||||
-rw-r--r-- | pkgs/tools/system/tree/default.nix | 1 | ||||
-rw-r--r-- | pkgs/tools/typesetting/tex/tetex/clang.patch | 13 | ||||
-rw-r--r-- | pkgs/tools/typesetting/tex/tetex/default.nix | 2 |
7 files changed, 34 insertions, 4 deletions
diff --git a/pkgs/tools/archivers/sharutils/default.nix b/pkgs/tools/archivers/sharutils/default.nix index f19564e4ad91..281a148a5ca4 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/misc/getopt/default.nix b/pkgs/tools/misc/getopt/default.nix index 41bc2ffc99df..84d15a187471 100644 --- a/pkgs/tools/misc/getopt/default.nix +++ b/pkgs/tools/misc/getopt/default.nix @@ -7,4 +7,6 @@ stdenv.mkDerivation { url = http://tarballs.nixos.org/getopt-1.1.4.tar.gz; md5 = "02188ca68da27c4175d6e9f3da732101"; }; + + buildFlags = stdenv.lib.optional stdenv.isDarwin [ "CC=clang" ]; } diff --git a/pkgs/tools/security/gnupg/clang.patch b/pkgs/tools/security/gnupg/clang.patch new file mode 100644 index 000000000000..842785e5c932 --- /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 64e2be90d30d..e00985b16ed5 100644 --- a/pkgs/tools/security/gnupg/default.nix +++ b/pkgs/tools/security/gnupg/default.nix @@ -31,6 +31,7 @@ stdenv.mkDerivation rec { patchPhase = '' find tests -type f | xargs sed -e 's@/bin/pwd@${coreutils}&@g' -i find . -name pcsc-wrapper.c | xargs sed -i 's/typedef unsinged int pcsc_dword_t/typedef unsigned int pcsc_dword_t/' + patch gl/stdint_.h < ${./clang.patch} ''; checkPhase="GNUPGHOME=`pwd` ./agent/gpg-agent --daemon make check"; diff --git a/pkgs/tools/system/tree/default.nix b/pkgs/tools/system/tree/default.nix index e108589aaefe..51de5998069f 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=clang ) ''; diff --git a/pkgs/tools/typesetting/tex/tetex/clang.patch b/pkgs/tools/typesetting/tex/tetex/clang.patch new file mode 100644 index 000000000000..50d83f624437 --- /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 5cd3228aced3..173571eda23c 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; |