lol
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

suitable clang stdenv

+415 -71
+3 -3
pkgs/applications/editors/vim/default.nix
··· 3 3 stdenv.mkDerivation rec { 4 4 name = "vim-${version}"; 5 5 6 - version = "7.4.335"; 6 + version = "7.4.410"; 7 7 8 8 src = fetchhg { 9 9 url = "https://vim.googlecode.com/hg/"; 10 - rev = "v7-4-335"; 11 - sha256 = "0qnpzfcbi6fhz82pj68l4vrnigca1akq2ksrxz6krwlfhns6jhhj"; 10 + rev = "v7-4-410"; 11 + sha256 = "145llhj6gq2bh9b7p8xkxc388krrximq80b87f3cn4w4d4k9fhqp"; 12 12 }; 13 13 14 14 enableParallelBuilding = true;
+2 -3
pkgs/applications/editors/vim/macvim.nix
··· 1 - { stdenv, stdenvAdapters, gccApple, fetchFromGitHub, ncurses, gettext, 1 + { stdenv, stdenvAdapters, fetchFromGitHub, ncurses, gettext, 2 2 pkgconfig, cscope, python, ruby, tcl, perl, luajit 3 3 }: 4 4 5 - let inherit (stdenvAdapters.overrideGCC stdenv gccApple) mkDerivation; 6 - in mkDerivation rec { 5 + stdenv.mkDerivation rec { 7 6 name = "macvim-${version}"; 8 7 9 8 version = "7.4.355";
+7 -6
pkgs/applications/version-management/subversion/default.nix
··· 15 15 assert pythonBindings -> swig != null && python != null; 16 16 assert javahlBindings -> jdk != null && perl != null; 17 17 18 - stdenv.mkDerivation rec { 18 + stdenv.mkDerivation (rec { 19 19 20 20 version = "1.8.10"; 21 21 ··· 73 73 74 74 enableParallelBuilding = true; 75 75 76 - # Hack to build on Mac OS X. The system header files use C99-style 77 - # comments, but Subversion passes -std=c90. 78 - NIX_CFLAGS_COMPILE = "-std=c99"; 79 - 80 76 meta = { 81 77 description = "A version control system intended to be a compelling replacement for CVS in the open source community"; 82 78 homepage = http://subversion.apache.org/; 83 79 maintainers = with stdenv.lib.maintainers; [ eelco lovek323 ]; 84 80 hydraPlatforms = stdenv.lib.platforms.linux ++ stdenv.lib.platforms.darwin; 85 81 }; 86 - } 82 + } // stdenv.lib.optionalAttrs stdenv.isDarwin { 83 + CXX = "clang++"; 84 + CC = "clang"; 85 + CPP = "clang -E"; 86 + CXXCPP = "clang++ -E"; 87 + })
+5
pkgs/build-support/cabal/default.nix
··· 214 214 configureFlags+=" --ghc-option=-j$NIX_BUILD_CORES" 215 215 ''} 216 216 217 + ${optionalString self.stdenv.isDarwin '' 218 + configureFlags+=" --with-gcc=clang" 219 + ''} 220 + 217 221 echo "configure flags: $extraConfigureFlags $configureFlags" 218 222 ./Setup configure --verbose --prefix="$out" --libdir='$prefix/lib/$compiler' \ 219 223 --libsubdir='$pkgid' $extraConfigureFlags $configureFlags 2>&1 \ ··· 236 240 237 241 export GHC_PACKAGE_PATH=$(${ghc.GHCPackages}) 238 242 test -n "$noHaddock" || ./Setup haddock --html --hoogle \ 243 + --ghc-options=-optP-P \ 239 244 ${optionalString self.hyperlinkSource "--hyperlink-source"} 240 245 241 246 eval "$postBuild"
+28 -12
pkgs/build-support/clang-wrapper/builder.sh
··· 28 28 fi 29 29 30 30 if test -n "$nativeTools"; then 31 - clangPath="$nativePrefix/bin" 31 + if [ -n "$isDarwin" ]; then 32 + clangPath="$clang/bin" 33 + else 34 + clangPath="$nativePrefix/bin" 35 + fi 32 36 ldPath="$nativePrefix/bin" 33 37 else 34 - basePath=`echo $gcc/lib/*/*/*` 35 - # Need libgcc until the llvm compiler-rt library is complete 36 - clangLDFlags="$clangLDFlags -L$basePath" 37 - if test -e "$gcc/lib64"; then 38 - clangLDFlags="$clangLDFlags -L$gcc/lib64" 39 - else 40 - clangLDFlags="$clangLDFlags -L$gcc/lib" 38 + clangLDFlags="" 39 + if test -d "$gcc/lib"; then 40 + basePath=`echo $gcc/lib/*/*/*` 41 + # Need libgcc until the llvm compiler-rt library is complete 42 + clangLDFlags="$clangLDFlags -L$basePath" 43 + if test -e "$gcc/lib64"; then 44 + clangLDFlags="$clangLDFlags -L$gcc/lib64" 45 + else 46 + clangLDFlags="$clangLDFlags -L$gcc/lib" 47 + fi 41 48 fi 42 49 43 - clangLDFlags="$clangLDFlags -L$clang/lib" 44 - echo "$clangLDFlags" > $out/nix-support/clang-ldflags 50 + if test -d "$clang/lib"; then 51 + clangLDFlags="$clangLDFlags -L$clang/lib" 52 + fi 53 + 54 + if [ -n "$clangLDFlags" ]; then 55 + echo "$clangLDFlags" > $out/nix-support/clang-ldflags 56 + fi 45 57 46 58 # Need files like crtbegin.o from gcc 47 59 # It's unclear if these will ever be provided by an LLVM project ··· 49 61 50 62 clangCFlags="$clangCFlags -isystem$clang/lib/clang/$clangVersion/include" 51 63 echo "$clangCFlags" > $out/nix-support/clang-cflags 52 - 53 - clangPath="$clang/bin" 64 + 54 65 ldPath="$binutils/bin" 66 + clangPath="$clang/bin" 55 67 fi 56 68 57 69 ··· 125 137 doSubstitute "$addFlags" "$out/nix-support/add-flags.sh" 126 138 127 139 doSubstitute "$setupHook" "$out/nix-support/setup-hook" 140 + cat >> "$out/nix-support/setup-hook" << EOF 141 + export CC=clang 142 + export CXX=clang++ 143 + EOF 128 144 129 145 cp -p $utils $out/nix-support/utils.sh 130 146
+2
pkgs/build-support/clang-wrapper/default.nix
··· 26 26 (if name != "" then name else clangName + "-wrapper") + 27 27 (if clang != null && clangVersion != "" then "-" + clangVersion else ""); 28 28 29 + isDarwin = stdenv.isDarwin; 30 + 29 31 builder = ./builder.sh; 30 32 setupHook = ./setup-hook.sh; 31 33 clangWrapper = ./clang-wrapper.sh;
+1
pkgs/development/compilers/gcc/4.2-apple64/default.nix
··· 4 4 , gmp ? null, mpfr ? null, bison ? null, flex ? null 5 5 }: 6 6 7 + assert false; 7 8 assert stdenv.isDarwin; 8 9 assert langF77 -> gmp != null; 9 10
+2 -1
pkgs/development/compilers/ghc/7.4.2-binary.nix
··· 62 62 '' else ""); 63 63 64 64 configurePhase = '' 65 - ./configure --prefix=$out --with-gmp-libraries=${gmp}/lib --with-gmp-includes=${gmp}/include 65 + ./configure --prefix=$out --with-gmp-libraries=${gmp}/lib --with-gmp-includes=${gmp}/include \ 66 + --with-clang 66 67 ''; 67 68 68 69 # Stripping combined with patchelf breaks the executables (they die
+93
pkgs/development/compilers/ghc/7.8.3-binary.nix
··· 1 + {stdenv, fetchurl, perl, ncurses, gmp}: 2 + 3 + stdenv.mkDerivation rec { 4 + version = "7.8.3"; 5 + 6 + name = "ghc-${version}-binary"; 7 + 8 + src = 9 + if stdenv.system == "i686-linux" then 10 + fetchurl { 11 + url = "http://haskell.org/ghc/dist/${version}/ghc-${version}-i386-unknown-linux.tar.bz2"; 12 + sha256 = "0gny7knhss0w0d9r6jm1gghrcb8kqjvj94bb7hxf9syrk4fxlcxi"; 13 + } 14 + else if stdenv.system == "x86_64-linux" then 15 + fetchurl { 16 + url = "http://haskell.org/ghc/dist/${version}/ghc-${version}-x86_64-unknown-linux.tar.bz2"; 17 + sha256 = "043jabd0lh6n1zlqhysngbpvlsdznsa2mmsj08jyqgahw9sjb5ns"; 18 + } 19 + else if stdenv.system == "i686-darwin" then 20 + fetchurl { 21 + url = "http://haskell.org/ghc/dist/${version}/ghc-${version}-i386-apple-darwin.tar.bz2"; 22 + sha256 = "1vrbs3pzki37hzym1f1nh07lrqh066z3ypvm81fwlikfsvk4djc0"; 23 + } 24 + else if stdenv.system == "x86_64-darwin" then 25 + fetchurl { 26 + url = "http://haskell.org/ghc/dist/${version}/ghc-${version}-x86_64-apple-darwin.tar.bz2"; 27 + sha256 = "1ja0cq5xyjcvjpvjmm4nzhkpmwfs2kjlldbc48lxcs9rmqi7rnay"; 28 + } 29 + else throw "cannot bootstrap GHC on this platform"; 30 + 31 + buildInputs = [perl]; 32 + 33 + postUnpack = 34 + # Strip is harmful, see also below. It's important that this happens 35 + # first. The GHC Cabal build system makes use of strip by default and 36 + # has hardcoded paths to /usr/bin/strip in many places. We replace 37 + # those below, making them point to our dummy script. 38 + '' 39 + mkdir "$TMP/bin" 40 + for i in strip; do 41 + echo '#! ${stdenv.shell}' > "$TMP/bin/$i" 42 + chmod +x "$TMP/bin/$i" 43 + done 44 + PATH="$TMP/bin:$PATH" 45 + '' + 46 + # We have to patch the GMP paths for the integer-gmp package. 47 + '' 48 + find . -name integer-gmp.buildinfo \ 49 + -exec sed -i "s@extra-lib-dirs: @extra-lib-dirs: ${gmp}/lib@" {} \; 50 + '' + 51 + # On Linux, use patchelf to modify the executables so that they can 52 + # find editline/gmp. 53 + (if stdenv.isLinux then '' 54 + find . -type f -perm +100 \ 55 + -exec patchelf --interpreter "$(cat $NIX_GCC/nix-support/dynamic-linker)" \ 56 + --set-rpath "${ncurses}/lib:${gmp}/lib" {} \; 57 + sed -i "s|/usr/bin/perl|perl\x00 |" ghc-${version}/ghc/stage2/build/tmp/ghc-stage2 58 + sed -i "s|/usr/bin/gcc|gcc\x00 |" ghc-${version}/ghc/stage2/build/tmp/ghc-stage2 59 + for prog in ld ar gcc strip ranlib; do 60 + find . -name "setup-config" -exec sed -i "s@/usr/bin/$prog@$(type -p $prog)@g" {} \; 61 + done 62 + '' else ""); 63 + 64 + configurePhase = '' 65 + ./configure --prefix=$out --with-gmp-libraries=${gmp}/lib \ 66 + --with-gmp-includes=${gmp}/include 67 + ''; 68 + 69 + # Stripping combined with patchelf breaks the executables (they die 70 + # with a segfault or the kernel even refuses the execve). (NIXPKGS-85) 71 + dontStrip = true; 72 + 73 + # No building is necessary, but calling make without flags ironically 74 + # calls install-strip ... 75 + buildPhase = "true"; 76 + 77 + postInstall = 78 + '' 79 + # Sanity check, can ghc create executables? 80 + cd $TMP 81 + mkdir test-ghc; cd test-ghc 82 + cat > main.hs << EOF 83 + module Main where 84 + main = putStrLn "yes" 85 + EOF 86 + $out/bin/ghc --make main.hs 87 + echo compilation ok 88 + [ $(./main) == "yes" ] 89 + ''; 90 + 91 + meta.license = stdenv.lib.licenses.bsd3; 92 + meta.platforms = ["x86_64-linux" "i686-linux" "i686-darwin" "x86_64-darwin"]; 93 + }
-2
pkgs/development/compilers/ghc/7.8.3.nix
··· 26 26 export NIX_LDFLAGS="$NIX_LDFLAGS -rpath $out/lib/ghc-${version}" 27 27 ''; 28 28 29 - configureFlags = "--with-gcc=${stdenv.gcc}/bin/gcc"; 30 - 31 29 # required, because otherwise all symbols from HSffi.o are stripped, and 32 30 # that in turn causes GHCi to abort 33 31 stripDebugFlags = [ "-S" "--keep-file-symbols" ];
+4
pkgs/development/compilers/llvm/3.3/clang.nix
··· 1 1 { stdenv, fetchurl, perl, groff, llvm, cmake, libxml2, python }: 2 2 3 + # be sure not to rebuild clang on darwin; some packages request it specifically 4 + # we need to fix those 5 + assert stdenv.isDarwin -> stdenv.gcc.nativeTools; 6 + 3 7 let 4 8 version = "3.3"; 5 9 gccReal = if (stdenv.gcc.gcc or null) == null then stdenv.gcc else stdenv.gcc.gcc;
+14
pkgs/development/interpreters/guile/clang.patch
··· 1 + diff --git a/lib/stdint.in.h b/lib/stdint.in.h 2 + index 889bca7..15d39b0 100644 3 + --- a/lib/stdint.in.h 4 + +++ b/lib/stdint.in.h 5 + @@ -74,7 +74,8 @@ 6 + in <inttypes.h> would reinclude us, skipping our contents because 7 + _@GUARD_PREFIX@_STDINT_H is defined. 8 + The include_next requires a split double-inclusion guard. */ 9 + -# @INCLUDE_NEXT@ @NEXT_STDINT_H@ 10 + +# include <inttypes.h> 11 + +// # @INCLUDE_NEXT@ @NEXT_STDINT_H@ 12 + #endif 13 + 14 + #if ! defined _@GUARD_PREFIX@_STDINT_H && ! defined _GL_JUST_INCLUDE_SYSTEM_STDINT_H
+3 -3
pkgs/development/interpreters/guile/default.nix
··· 7 7 else stdenv.mkDerivation) 8 8 9 9 (rec { 10 - name = "guile-2.0.9"; 10 + name = "guile-2.0.11"; 11 11 12 12 src = fetchurl { 13 13 url = "mirror://gnu/guile/${name}.tar.xz"; 14 - sha256 = "0nw9y8vjyz4r61v06p9msks5lm58pd91irmzg4k487vmv743h2pp"; 14 + sha256 = "1qh3j7308qvsjgwf7h94yqgckpbgz2k3yqdkzsyhqcafvfka9l5f"; 15 15 }; 16 16 17 17 nativeBuildInputs = [ makeWrapper gawk pkgconfig ]; ··· 29 29 30 30 enableParallelBuilding = true; 31 31 32 - patches = [ ./disable-gc-sensitive-tests.patch ./eai_system.patch ] ++ 32 + patches = [ ./disable-gc-sensitive-tests.patch ./eai_system.patch ./clang.patch ] ++ 33 33 (stdenv.lib.optional (coverageAnalysis != null) ./gcov-file-name.patch); 34 34 35 35 # Explicitly link against libgcc_s, to work around the infamous
+1 -1
pkgs/development/interpreters/lua-5/5.1.nix
··· 29 29 configurePhase = 30 30 if stdenv.isDarwin 31 31 then '' 32 - makeFlagsArray=( INSTALL_TOP=$out INSTALL_MAN=$out/share/man/man1 PLAT=macosx CFLAGS="-DLUA_USE_LINUX -fno-common -O2" LDFLAGS="" ) 32 + makeFlagsArray=( INSTALL_TOP=$out INSTALL_MAN=$out/share/man/man1 PLAT=macosx CFLAGS="-DLUA_USE_LINUX -fno-common -O2" LDFLAGS="" CC=clang ) 33 33 installFlagsArray=( TO_BIN="lua luac" TO_LIB="liblua.5.1.5.dylib" INSTALL_DATA='cp -d' ) 34 34 '' else '' 35 35 makeFlagsArray=( INSTALL_TOP=$out INSTALL_MAN=$out/share/man/man1 PLAT=linux CFLAGS="-DLUA_USE_LINUX -O2 -fPIC" LDFLAGS="-fPIC" )
-1
pkgs/development/interpreters/perl/5.16/default.nix
··· 32 32 # Miniperl needs -lm. perl needs -lrt. 33 33 configureFlags = 34 34 [ "-de" 35 - "-Dcc=gcc" 36 35 "-Uinstallusrbinperl" 37 36 "-Dinstallstyle=lib/perl5" 38 37 "-Duseshrplib"
+2
pkgs/development/interpreters/ruby/ruby-19.nix
··· 49 49 50 50 installFlags = stdenv.lib.optionalString docSupport "install-doc"; 51 51 52 + CFLAGS = stdenv.lib.optionalString stdenv.isDarwin "-mmacosx-version-min=10.7"; 53 + 52 54 postInstall = '' 53 55 # Bundler tries to create this directory 54 56 mkdir -pv $out/${passthru.gemPath}
+18
pkgs/development/libraries/aspell/clang.patch
··· 1 + --- interfaces/cc/aspell.h 2013-10-13 20:29:33.000000000 +0200 2 + +++ interfaces/cc/aspell.h 2013-10-13 20:30:01.000000000 +0200 3 + @@ -237,6 +237,7 @@ 4 + /******************************** errors ********************************/ 5 + 6 + 7 + +#ifndef __cplusplus 8 + extern const struct AspellErrorInfo * const aerror_other; 9 + extern const struct AspellErrorInfo * const aerror_operation_not_supported; 10 + extern const struct AspellErrorInfo * const aerror_cant_copy; 11 + @@ -322,6 +323,7 @@ 12 + extern const struct AspellErrorInfo * const aerror_bad_magic; 13 + extern const struct AspellErrorInfo * const aerror_expression; 14 + extern const struct AspellErrorInfo * const aerror_invalid_expression; 15 + +#endif 16 + 17 + 18 + /******************************* speller *******************************/
+4
pkgs/development/libraries/aspell/default.nix
··· 8 8 sha256 = "1qgn5psfyhbrnap275xjfrzppf5a83fb67gpql0kfqv37al869gm"; 9 9 }; 10 10 11 + patchPhase = '' 12 + patch interfaces/cc/aspell.h < ${./clang.patch} 13 + ''; 14 + 11 15 buildInputs = [ perl ]; 12 16 13 17 doCheck = true;
+4
pkgs/development/libraries/db/generic.nix
··· 18 18 19 19 patches = extraPatches; 20 20 21 + patchPhase = '' 22 + patch src/dbinc/atomic.h < ${./osx.patch} 23 + ''; 24 + 21 25 configureFlags = [ 22 26 (if cxxSupport then "--enable-cxx" else "--disable-cxx") 23 27 (if compat185 then "--enable-compat185" else "--disable-compat185")
+20
pkgs/development/libraries/db/osx.patch
··· 1 + --- src/dbinc/atomic.h 2013-03-12 14:07:22.000000000 -0400 2 + +++ src/dbinc/atomic.h.change 2013-03-12 14:06:35.000000000 -0400 3 + @@ -144,7 +144,7 @@ 4 + #define atomic_inc(env, p) __atomic_inc(p) 5 + #define atomic_dec(env, p) __atomic_dec(p) 6 + #define atomic_compare_exchange(env, p, o, n) \ 7 + - __atomic_compare_exchange((p), (o), (n)) 8 + + __atomic_compare_exchange_db((p), (o), (n)) 9 + static inline int __atomic_inc(db_atomic_t *p) 10 + { 11 + int temp; 12 + @@ -176,7 +176,7 @@ 13 + * http://gcc.gnu.org/onlinedocs/gcc-4.1.0/gcc/Atomic-Builtins.html 14 + * which configure could be changed to use. 15 + */ 16 + -static inline int __atomic_compare_exchange( 17 + +static inline int __atomic_compare_exchange_db( 18 + db_atomic_t *p, atomic_value_t oldval, atomic_value_t newval) 19 + { 20 + atomic_value_t was;
+3
pkgs/development/libraries/gmp/5.1.x.nix
··· 16 16 # Build a "fat binary", with routines for several sub-architectures 17 17 # (x86), except on Solaris where some tests crash with "Memory fault". 18 18 # See <http://hydra.nixos.org/build/2760931>, for instance. 19 + # 20 + # no darwin because gmp uses ASM that clang doesn't like 19 21 optional (!stdenv.isSunOS) "--enable-fat" 20 22 ++ (if cxx then [ "--enable-cxx" ] 21 23 else [ "--disable-cxx" ]) 22 24 ++ optional (cxx && stdenv.isDarwin) "CPPFLAGS=-fexceptions" 25 + ++ optional stdenv.isDarwin "ABI=64 CC=clang" 23 26 ++ optional stdenv.is64bit "--with-pic" 24 27 ; 25 28
+1 -1
pkgs/development/libraries/libedit/default.nix
··· 12 12 NROFF = "${groff}/bin/nroff"; 13 13 14 14 postInstall = '' 15 - sed -i s/-lncurses/-lncursesw/g $out/lib/pkgconfig/libedit.pc 15 + sed -i ${stdenv.lib.optionalString (stdenv.isDarwin && stdenv.gcc.nativeTools) "''"} s/-lncurses/-lncursesw/g $out/lib/pkgconfig/libedit.pc 16 16 ''; 17 17 18 18 # taken from gentoo http://sources.gentoo.org/cgi-bin/viewvc.cgi/gentoo-x86/dev-libs/libedit/files/
+1 -1
pkgs/development/libraries/libffi/default.nix
··· 22 22 23 23 postInstall = 24 24 # Install headers in the right place. 25 - '' ln -s${if stdenv.isFreeBSD then "" else "r"}v "$out/lib/"libffi*/include "$out/include" 25 + '' ln -s${if stdenv.isBSD then "" else "r"}v "$out/lib/"libffi*/include "$out/include" 26 26 ''; 27 27 28 28 meta = {
+2
pkgs/development/libraries/libgcrypt/default.nix
··· 10 10 11 11 propagatedBuildInputs = [ libgpgerror ]; 12 12 13 + configureFlags = stdenv.lib.optional stdenv.isDarwin "--disable-asm"; 14 + 13 15 doCheck = stdenv.system != "i686-linux"; # "basic" test fails after stdenv+glibc-2.18 14 16 15 17 # For some reason the tests don't find `libgpg-error.so'.
+14
pkgs/development/libraries/libunistring/clang.patch
··· 1 + diff --git a/lib/stdint.in.h b/lib/stdint.in.h 2 + index 997e406..e0827f5 100644 3 + --- a/lib/stdint.in.h 4 + +++ b/lib/stdint.in.h 5 + @@ -53,7 +53,8 @@ 6 + in <inttypes.h> would reinclude us, skipping our contents because 7 + _GL_STDINT_H is defined. 8 + The include_next requires a split double-inclusion guard. */ 9 + -# @INCLUDE_NEXT@ @NEXT_STDINT_H@ 10 + +# include <inttypes.h> 11 + +// # @INCLUDE_NEXT@ @NEXT_STDINT_H@ 12 + #endif 13 + 14 + #if ! defined _GL_STDINT_H && ! defined _GL_JUST_INCLUDE_SYSTEM_STDINT_H
+2
pkgs/development/libraries/libunistring/default.nix
··· 8 8 sha256 = "18q620269xzpw39dwvr9zpilnl2dkw5z5kz3mxaadnpv4k3kw3b1"; 9 9 }; 10 10 11 + patches = stdenv.lib.optional stdenv.isDarwin [ ./clang.patch ]; 12 + 11 13 propagatedBuildInputs = 12 14 stdenv.lib.optional ((! (stdenv ? glibc)) 13 15 || (stdenv ? cross &&
+1 -1
pkgs/development/libraries/mesa-darwin/default.nix
··· 1 - { stdenv, stdenvAdapters, gccApple, fetchurl, pkgconfig, intltool, flex, bison 1 + { stdenv, stdenvAdapters, fetchurl, pkgconfig, intltool, flex, bison 2 2 , python, libxml2Python, file, expat, makedepend, xorg, llvm, libffi, libvdpau 3 3 , enableTextureFloats ? false # Texture floats are patented, see docs/patents.txt 4 4 , enableExtraFeatures ? false # not maintained
+42
pkgs/development/libraries/ncurses/clang.patch
··· 1 + diff -ruNp ncurses-5.8.orig/c++/cursesf.h ncurses-5.8/c++/cursesf.h 2 + --- ncurses-5.8.orig/c++/cursesf.h 2005-08-13 21:08:24.000000000 +0300 3 + +++ ncurses-5.8/c++/cursesf.h 2011-04-03 18:29:29.000000000 +0300 4 + @@ -681,7 +681,7 @@ public: 5 + const T* p_UserData = STATIC_CAST(T*)(0), 6 + bool with_frame=FALSE, 7 + bool autoDelete_Fields=FALSE) 8 + - : NCursesForm (Fields, with_frame, autoDelete_Fields) { 9 + + : NCursesForm (&Fields, with_frame, autoDelete_Fields) { 10 + if (form) 11 + set_user (const_cast<void *>(p_UserData)); 12 + }; 13 + @@ -694,7 +694,7 @@ public: 14 + const T* p_UserData = STATIC_CAST(T*)(0), 15 + bool with_frame=FALSE, 16 + bool autoDelete_Fields=FALSE) 17 + - : NCursesForm (Fields, nlines, ncols, begin_y, begin_x, 18 + + : NCursesForm (&Fields, nlines, ncols, begin_y, begin_x, 19 + with_frame, autoDelete_Fields) { 20 + if (form) 21 + set_user (const_cast<void *>(p_UserData)); 22 + diff -ruNp ncurses-5.8.orig/c++/cursesm.h ncurses-5.8/c++/cursesm.h 23 + --- ncurses-5.8.orig/c++/cursesm.h 2005-08-13 21:10:36.000000000 +0300 24 + +++ ncurses-5.8/c++/cursesm.h 2011-04-03 18:31:42.000000000 +0300 25 + @@ -639,7 +639,7 @@ public: 26 + const T* p_UserData = STATIC_CAST(T*)(0), 27 + bool with_frame=FALSE, 28 + bool autoDelete_Items=FALSE) 29 + - : NCursesMenu (Items, with_frame, autoDelete_Items) { 30 + + : NCursesMenu (&Items, with_frame, autoDelete_Items) { 31 + if (menu) 32 + set_user (const_cast<void *>(p_UserData)); 33 + }; 34 + @@ -651,7 +651,7 @@ public: 35 + int begin_x = 0, 36 + const T* p_UserData = STATIC_CAST(T*)(0), 37 + bool with_frame=FALSE) 38 + - : NCursesMenu (Items, nlines, ncols, begin_y, begin_x, with_frame) { 39 + + : NCursesMenu (&Items, nlines, ncols, begin_y, begin_x, with_frame) { 40 + if (menu) 41 + set_user (const_cast<void *>(p_UserData)); 42 + };
+1 -3
pkgs/development/libraries/ncurses/default.nix
··· 18 18 sha256 = "0fsn7xis81za62afan0vvm38bvgzg5wfmv1m86flqcj0nj7jjilh"; 19 19 }; 20 20 21 - patches = [ ./patch-ac ]; 21 + patches = [ ./patch-ac ./clang.patch ]; 22 22 23 23 configureFlags = '' 24 24 --with-shared --without-debug --enable-pc-files --enable-symlinks ··· 35 35 export configureFlags="$configureFlags --includedir=$out/include" 36 36 export PKG_CONFIG_LIBDIR="$out/lib/pkgconfig" 37 37 mkdir -p "$PKG_CONFIG_LIBDIR" 38 - '' + lib.optionalString stdenv.isDarwin '' 39 - substituteInPlace configure --replace -no-cpp-precomp "" 40 38 ''; 41 39 42 40 selfNativeBuildInput = true;
+13
pkgs/development/libraries/readline/clang.patch
··· 1 + diff --git a/support/shobj-conf b/support/shobj-conf 2 + index 5a63e80..4b2a741 100644 3 + --- support/shobj-conf 4 + +++ support/shobj-conf 5 + @@ -189,7 +189,7 @@ darwin*|macosx*) 6 + darwin[789]*|darwin10*) SHOBJ_LDFLAGS='' 7 + SHLIB_XLDFLAGS='-dynamiclib -arch_only `/usr/bin/arch` -install_name $(libdir)/$@ -current_version $(SHLIB_MAJOR)$(SHLIB_MINOR) -compatibility_version $(SHLIB_MAJOR) -v' 8 + ;; 9 + - *) SHOBJ_LDFLAGS='-dynamic' 10 + + *) SHOBJ_LDFLAGS='-dynamiclib' 11 + SHLIB_XLDFLAGS='-arch_only `/usr/bin/arch` -install_name $(libdir)/$@ -current_version $(SHLIB_MAJOR)$(SHLIB_MINOR) -compatibility_version $(SHLIB_MAJOR) -v' 12 + ;; 13 + esac
+5
pkgs/development/libraries/readline/readline6.nix
··· 10 10 11 11 propagatedBuildInputs = [ncurses]; 12 12 13 + preConfigure = '' 14 + export CC=clang 15 + ''; 16 + 13 17 patchFlags = "-p0"; 14 18 patches = 15 19 [ ./link-against-ncurses.patch 16 20 ./no-arch_only.patch 21 + ./clang.patch 17 22 ] 18 23 ++ 19 24 (let
+5 -1
pkgs/development/libraries/serf/default.nix
··· 18 18 19 19 buildPhase = '' 20 20 scons PREFIX="$out" OPENSSL="${openssl}" ZLIB="${zlib}" APR="$(echo "${apr}"/bin/*-config)" \ 21 - APU="$(echo "${aprutil}"/bin/*-config)" GSSAPI="${krb5}" CC="${stdenv.gcc}/bin/gcc" 21 + APU="$(echo "${aprutil}"/bin/*-config)" GSSAPI="${krb5}" CC="${ 22 + if stdenv.isDarwin then "clang" else "${stdenv.gcc}/bin/gcc" 23 + }" 22 24 ''; 25 + 26 + NIX_CFLAGS_COMPILE = stdenv.lib.optionalString stdenv.isDarwin "-L/usr/lib"; 23 27 24 28 installPhase = '' 25 29 scons install
+3 -1
pkgs/development/libraries/zlib/default.nix
··· 15 15 16 16 configureFlags = if static then "" else "--shared"; 17 17 18 - preConfigure = '' 18 + preConfigure = stdenv.lib.optionalString stdenv.isDarwin '' 19 + export CC=clang 20 + '' + '' 19 21 if test -n "$crossConfig"; then 20 22 export CC=$crossConfig-gcc 21 23 configureFlags=${if static then "" else "--shared"}
+4
pkgs/development/tools/misc/distcc/masq.nix
··· 3 3 stdenv.mkDerivation { 4 4 name = "distcc-masq-${gccRaw.name}"; 5 5 6 + meta = { 7 + platforms = stdenv.lib.platforms.linux; 8 + }; 9 + 6 10 phases = [ "installPhase" ]; 7 11 installPhase = '' 8 12 mkdir -p $out/bin
+1 -1
pkgs/servers/http/nginx/default.nix
··· 105 105 ++ optional (elem stdenv.system (with platforms; linux ++ freebsd)) "--with-file-aio"; 106 106 107 107 108 - additionalFlags = optionalString stdenv.isDarwin "-Wno-error=deprecated-declarations"; 108 + additionalFlags = optionalString stdenv.isDarwin "-Wno-error=deprecated-declarations -Wno-error=conditional-uninitialized"; 109 109 110 110 preConfigure = '' 111 111 export NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE -I${libxml2}/include/libxml2 $additionalFlags"
+1
pkgs/servers/x11/xorg/overrides.nix
··· 75 75 # Remove useless DocBook XML files. 76 76 rm -rf $out/share/doc 77 77 ''; 78 + CPP = stdenv.lib.optionalString stdenv.isDarwin "clang -E -"; 78 79 }; 79 80 80 81 libXfont = attrs: attrs // {
+47
pkgs/stdenv/darwin/default.nix
··· 1 + { stdenv, pkgs, config }: 2 + 3 + import ../generic rec { 4 + inherit config; 5 + 6 + preHook = 7 + '' 8 + export NIX_ENFORCE_PURITY= 9 + export NIX_IGNORE_LD_THROUGH_GCC=1 10 + export NIX_DONT_SET_RPATH=1 11 + export NIX_NO_SELF_RPATH=1 12 + dontFixLibtool=1 13 + stripAllFlags=" " # the Darwin "strip" command doesn't know "-s" 14 + xargsFlags=" " 15 + export MACOSX_DEPLOYMENT_TARGET=10.6 16 + export SDKROOT=$(/usr/bin/xcrun --show-sdk-path 2> /dev/null || true) 17 + export NIX_CFLAGS_COMPILE+=" --sysroot=/var/empty -idirafter $SDKROOT/usr/include -F$SDKROOT/System/Library/Frameworks -Wno-multichar -Wno-deprecated-declarations" 18 + export NIX_LDFLAGS_AFTER+=" -L$SDKROOT/usr/lib" 19 + ''; 20 + 21 + initialPath = (import ../common-path.nix) {pkgs = pkgs;}; 22 + 23 + system = stdenv.system; 24 + 25 + gcc = import ../../build-support/clang-wrapper { 26 + nativeTools = false; 27 + nativePrefix = stdenv.lib.optionalString stdenv.isSunOS "/usr"; 28 + nativeLibc = true; 29 + inherit stdenv; 30 + binutils = import ../../build-support/native-darwin-cctools-wrapper {inherit stdenv;}; 31 + clang = pkgs.clang_34; 32 + coreutils = pkgs.coreutils; 33 + shell = pkgs.bash + "/bin/sh"; 34 + }; 35 + 36 + shell = pkgs.bash + "/bin/sh"; 37 + 38 + fetchurlBoot = stdenv.fetchurlBoot; 39 + 40 + overrides = pkgs_: { 41 + inherit gcc; 42 + inherit (gcc) binutils; 43 + inherit (pkgs) 44 + gzip bzip2 xz bash coreutils diffutils findutils gawk 45 + gnumake gnused gnutar gnugrep gnupatch perl; 46 + }; 47 + }
+7 -1
pkgs/stdenv/default.nix
··· 33 33 pkgs = stdenvNativePkgs; 34 34 }; 35 35 36 + stdenvDarwin = import ./darwin { 37 + inherit config; 38 + stdenv = stdenvNative; 39 + pkgs = stdenvNativePkgs; 40 + }; 41 + 36 42 37 43 # Linux standard environment. 38 44 stdenvLinux = (import ./linux { inherit system allPackages platform config;}).stdenvLinux; ··· 47 53 if system == "armv7l-linux" then stdenvLinux else 48 54 if system == "mips64el-linux" then stdenvLinux else 49 55 if system == "powerpc-linux" then /* stdenvLinux */ stdenvNative else 50 - if system == "x86_64-darwin" then stdenvNix else 56 + if system == "x86_64-darwin" then stdenvDarwin else 51 57 if system == "x86_64-solaris" then stdenvNix else 52 58 stdenvNative; 53 59 }
+2 -1
pkgs/stdenv/generic/default.nix
··· 163 163 isBSD = system == "i686-freebsd" 164 164 || system == "x86_64-freebsd" 165 165 || system == "i686-openbsd" 166 - || system == "x86_64-openbsd"; 166 + || system == "x86_64-openbsd" 167 + || system == "x86_64-darwin"; 167 168 isi686 = system == "i686-linux" 168 169 || system == "i686-gnu" 169 170 || system == "i686-freebsd"
+3 -3
pkgs/tools/archivers/sharutils/default.nix
··· 1 - { stdenv, fetchurl, gettext }: 1 + { stdenv, fetchurl, gettext, coreutils }: 2 2 3 3 stdenv.mkDerivation rec { 4 4 name = "sharutils-4.11.1"; ··· 12 12 '' 13 13 # Fix for building on Glibc 2.16. Won't be needed once the 14 14 # gnulib in sharutils is updated. 15 - sed -i '/gets is a security hole/d' lib/stdio.in.h 15 + sed -i ${stdenv.lib.optionalString (stdenv.isBSD && stdenv.gcc.nativeTools) "''"} '/gets is a security hole/d' lib/stdio.in.h 16 16 ''; 17 17 18 18 # GNU Gettext is needed on non-GNU platforms. 19 - buildInputs = [ gettext ]; 19 + buildInputs = [ gettext coreutils ]; 20 20 21 21 doCheck = true; 22 22
+2
pkgs/tools/misc/getopt/default.nix
··· 7 7 url = http://tarballs.nixos.org/getopt-1.1.4.tar.gz; 8 8 md5 = "02188ca68da27c4175d6e9f3da732101"; 9 9 }; 10 + 11 + buildFlags = stdenv.lib.optional stdenv.isDarwin [ "CC=clang" ]; 10 12 }
+13
pkgs/tools/security/gnupg/clang.patch
··· 1 + diff --git a/gl/stdint_.h b/gl/stdint_.h 2 + index bc27595..303e81a 100644 3 + --- a/gl/stdint_.h 4 + +++ b/gl/stdint_.h 5 + @@ -62,7 +62,7 @@ 6 + int{8,16,32,64}_t, uint{8,16,32,64}_t and __BIT_TYPES_DEFINED__. 7 + <inttypes.h> also defines intptr_t and uintptr_t. */ 8 + # define _GL_JUST_INCLUDE_ABSOLUTE_INTTYPES_H 9 + -# include <inttypes.h> 10 + +// # include <inttypes.h> 11 + # undef _GL_JUST_INCLUDE_ABSOLUTE_INTTYPES_H 12 + #elif @HAVE_SYS_INTTYPES_H@ 13 + /* Solaris 7 <sys/inttypes.h> has the types except the *_fast*_t types, and
+1
pkgs/tools/security/gnupg/default.nix
··· 31 31 patchPhase = '' 32 32 find tests -type f | xargs sed -e 's@/bin/pwd@${coreutils}&@g' -i 33 33 find . -name pcsc-wrapper.c | xargs sed -i 's/typedef unsinged int pcsc_dword_t/typedef unsigned int pcsc_dword_t/' 34 + patch gl/stdint_.h < ${./clang.patch} 34 35 ''; 35 36 36 37 checkPhase="GNUPGHOME=`pwd` ./agent/gpg-agent --daemon make check";
+1
pkgs/tools/system/tree/default.nix
··· 37 37 prefix=$out 38 38 MANDIR=$out/share/man/man1 39 39 ${systemFlags} 40 + CC=clang 40 41 ) 41 42 ''; 42 43
+13
pkgs/tools/typesetting/tex/tetex/clang.patch
··· 1 + diff --git a/texk/ps2pkm/type1.c b/texk/ps2pkm/type1.c 2 + index 027bf1f..4dcbad0 100644 3 + --- a/texk/ps2pkm/type1.c 4 + +++ b/texk/ps2pkm/type1.c 5 + @@ -800,7 +800,7 @@ static void PSFakePush(Num) 6 + static DOUBLE PSFakePop () 7 + { 8 + if (PSFakeTop >= 0) return(PSFakeStack[PSFakeTop--]); 9 + - else Error0("PSFakePop : Stack empty\n"); 10 + + else { CC; IfTrace0(TRUE, "PSFakePop : Stack empty\n"); errflag = TRUE; return 0; } 11 + /*NOTREACHED*/ 12 + } 13 +
+1 -1
pkgs/tools/typesetting/tex/tetex/default.nix
··· 20 20 sed -i 57d texk/kpathsea/c-std.h 21 21 ''; 22 22 23 - patches = [ ./environment.patch ./getline.patch ]; 23 + patches = [ ./environment.patch ./getline.patch ./clang.patch ]; 24 24 25 25 setupHook = ./setup-hook.sh; 26 26
+10 -23
pkgs/top-level/all-packages.nix
··· 231 231 else 232 232 defaultStdenv; 233 233 234 - stdenvApple = stdenvAdapters.overrideGCC allStdenvs.stdenvNative gccApple; 235 - 236 234 forceNativeDrv = drv : if crossSystem == null then drv else 237 235 (drv // { crossDrv = drv.nativeDrv; }); 238 236 ··· 2686 2684 }; 2687 2685 2688 2686 clangUnwrapped = llvm: pkg: callPackage pkg { 2689 - stdenv = if stdenv.isDarwin then stdenvApple else stdenv; 2690 - inherit llvm; 2687 + inherit stdenv llvm; 2691 2688 }; 2692 2689 2693 2690 clangSelf = clangWrapSelf llvmPackagesSelf.clang; ··· 2704 2701 }; 2705 2702 2706 2703 #Use this instead of stdenv to build with clang 2707 - clangStdenv = lowPrio (stdenvAdapters.overrideGCC stdenv clang); 2704 + clangStdenv = if stdenv.isDarwin then stdenv else lowPrio (stdenvAdapters.overrideGCC stdenv clang); 2708 2705 libcxxStdenv = stdenvAdapters.overrideGCC stdenv (clangWrapSelf llvmPackages.clang); 2709 2706 2710 2707 clean = callPackage ../development/compilers/clean { }; ··· 2911 2908 then gnu.libpthreadCross 2912 2909 else null; 2913 2910 })); 2914 - 2915 - gccApple = 2916 - assert stdenv.isDarwin; 2917 - wrapGCC (makeOverridable (import ../development/compilers/gcc/4.2-apple64) { 2918 - inherit fetchurl noSysDirs; 2919 - profiledCompiler = true; 2920 - # Since it fails to build with GCC 4.6, build it with the "native" 2921 - # Apple-GCC. 2922 - stdenv = allStdenvs.stdenvNative; 2923 - }); 2924 2911 2925 2912 gfortran = gfortran48; 2926 2913 ··· 3216 3203 llvm_34 = llvmPackages_34.llvm; 3217 3204 llvm_33 = llvm_v ../development/compilers/llvm/3.3/llvm.nix; 3218 3205 3219 - llvm_v = path: callPackage path { 3220 - stdenv = if stdenv.isDarwin then stdenvApple else stdenv; 3221 - }; 3206 + llvm_v = path: callPackage path { }; 3222 3207 3223 3208 llvmPackages = if !stdenv.isDarwin then llvmPackages_34 else llvmPackages_34 // { 3224 3209 # until someone solves build problems with _34 ··· 3956 3941 bam = callPackage ../development/tools/build-managers/bam {}; 3957 3942 3958 3943 binutils = if stdenv.isDarwin 3959 - then stdenv.gcc.binutils 3944 + then import ../build-support/native-darwin-cctools-wrapper {inherit stdenv;} 3960 3945 else callPackage ../development/tools/misc/binutils { 3961 3946 inherit noSysDirs; 3962 3947 }; ··· 4097 4082 wrapGCC (distcc.links extraConfig)) {}; 4098 4083 distccStdenv = lowPrio (overrideGCC stdenv distccWrapper); 4099 4084 4100 - distccMasquerade = callPackage ../development/tools/misc/distcc/masq.nix { 4101 - gccRaw = gcc.gcc; 4102 - binutils = binutils; 4103 - }; 4085 + distccMasquerade = if stdenv.isDarwin 4086 + then null 4087 + else callPackage ../development/tools/misc/distcc/masq.nix { 4088 + gccRaw = gcc.gcc; 4089 + binutils = binutils; 4090 + }; 4104 4091 4105 4092 docutils = builderDefsPackage (import ../development/tools/documentation/docutils) { 4106 4093 inherit python pil makeWrapper;
+3 -1
pkgs/top-level/haskell-defaults.nix
··· 204 204 gmp = pkgs.gmp4; 205 205 }); 206 206 207 + ghc783Binary = lowPrio (callPackage ../development/compilers/ghc/7.8.3-binary.nix {}); 208 + 207 209 ghc6101BinaryDarwin = if stdenv.isDarwin then ghc704Binary else ghc6101Binary; 208 210 ghc6121BinaryDarwin = if stdenv.isDarwin then ghc704Binary else ghc6121Binary; 209 211 ··· 224 226 225 227 packages_ghc783 = 226 228 packages { ghcPath = ../development/compilers/ghc/7.8.3.nix; 227 - ghcBinary = ghc742Binary; 229 + ghcBinary = ghc783Binary; 228 230 prefFun = ghc783Prefs; 229 231 }; 230 232