diff --git a/pkgs/development/compilers/llvm/4/clang/default.nix b/pkgs/development/compilers/llvm/4/clang/default.nix index 004893873f56..64dbaa21dd42 100644 --- a/pkgs/development/compilers/llvm/4/clang/default.nix +++ b/pkgs/development/compilers/llvm/4/clang/default.nix @@ -37,7 +37,7 @@ let patches = [ ./purity.patch ]; - postBuild = '' + postBuild = stdenv.lib.optionalString enableManpages '' cmake --build . --target docs-clang-man ''; @@ -49,7 +49,8 @@ let sed -i '1s,^,find_package(Sphinx REQUIRED)\n,' docs/CMakeLists.txt ''; - outputs = [ "out" ] ++ stdenv.lib.optional enableManpages "man" ++ [ "python" ]; + outputs = [ "out" "python" ] + ++ stdenv.lib.optional enableManpages "man"; # Clang expects to find LLVMgold in its own prefix # Clang expects to find sanitizer libraries in its own prefix @@ -68,7 +69,6 @@ let rm $out/bin/c-index-test '' + stdenv.lib.optionalString enableManpages '' - # Manually install clang manpage cp docs/man/*.1 $out/share/man/man1/ diff --git a/pkgs/development/compilers/llvm/4/llvm.nix b/pkgs/development/compilers/llvm/4/llvm.nix index 7d55bc5b4105..98c24495355c 100644 --- a/pkgs/development/compilers/llvm/4/llvm.nix +++ b/pkgs/development/compilers/llvm/4/llvm.nix @@ -40,8 +40,8 @@ in stdenv.mkDerivation rec { ''; outputs = [ "out" ] - ++ stdenv.lib.optional enableManpages "man" - ++ stdenv.lib.optional enableSharedLibraries "lib"; + ++ stdenv.lib.optional enableSharedLibraries "lib" + ++ stdenv.lib.optional enableManpages "man"; nativeBuildInputs = [ perl groff cmake python ] ++ stdenv.lib.optional enableManpages python.pkgs.sphinx; @@ -86,17 +86,19 @@ in stdenv.mkDerivation rec { "-DLLVM_ENABLE_FFI=ON" "-DLLVM_ENABLE_RTTI=ON" "-DCOMPILER_RT_INCLUDE_TESTS=OFF" # FIXME: requires clang source code - ] ++ stdenv.lib.optionals enableManpages [ + ] + ++ stdenv.lib.optional enableSharedLibraries + "-DLLVM_LINK_LLVM_DYLIB=ON" + ++ stdenv.lib.optionals enableManpages [ "-DLLVM_BUILD_DOCS=ON" "-DLLVM_ENABLE_SPHINX=ON" "-DSPHINX_OUTPUT_MAN=ON" "-DSPHINX_OUTPUT_HTML=OFF" "-DSPHINX_WARNINGS_AS_ERRORS=OFF" - ] ++ stdenv.lib.optional enableSharedLibraries [ - "-DLLVM_LINK_LLVM_DYLIB=ON" - ] ++ stdenv.lib.optional (!isDarwin) + ] + ++ stdenv.lib.optional (!isDarwin) "-DLLVM_BINUTILS_INCDIR=${binutils.dev}/include" - ++ stdenv.lib.optionals (isDarwin) [ + ++ stdenv.lib.optionals (isDarwin) [ "-DLLVM_ENABLE_LIBCXX=ON" "-DCAN_TARGET_i386=false" ]; diff --git a/pkgs/development/tools/build-managers/cmake/default.nix b/pkgs/development/tools/build-managers/cmake/default.nix index 00d76fbff9fe..d0a346038352 100644 --- a/pkgs/development/tools/build-managers/cmake/default.nix +++ b/pkgs/development/tools/build-managers/cmake/default.nix @@ -3,7 +3,7 @@ # darwin attributes , ps , isBootstrap ? false -, useSharedLibraries ? !stdenv.isCygwin +, useSharedLibraries ? (!isBootstrap && !stdenv.isCygwin) , useNcurses ? false, ncurses , useQt4 ? false, qt4 }: diff --git a/pkgs/stdenv/darwin/default.nix b/pkgs/stdenv/darwin/default.nix index b9592014b46b..fba5afd4f6ec 100644 --- a/pkgs/stdenv/darwin/default.nix +++ b/pkgs/stdenv/darwin/default.nix @@ -233,11 +233,11 @@ in rec { libcxxabi libcxx ncurses libffi zlib gmp pcre gnugrep coreutils findutils diffutils patchutils; - llvmPackages = let llvmOverride = llvmPackages.llvm.override { inherit libcxxabi; }; - in super.llvmPackages // { - llvm = llvmOverride; - clang-unwrapped = llvmPackages.clang-unwrapped.override { llvm = llvmOverride; }; - }; + llvmPackages = let llvmOverride = llvmPackages.llvm.override { enableManpages = false; inherit libcxxabi; }; in + super.llvmPackages // { + llvm = llvmOverride; + clang-unwrapped = llvmPackages.clang-unwrapped.override { enableManpages = false; llvm = llvmOverride; }; + }; darwin = super.darwin // { inherit (darwin) dyld Libsystem libiconv locale; @@ -313,7 +313,7 @@ in rec { xz.out xz.bin libcxx libcxxabi gmp.out gnumake findutils bzip2.out bzip2.bin llvmPackages.llvm llvmPackages.llvm.lib zlib.out zlib.dev libffi.out coreutils ed diffutils gnutar gzip ncurses.out ncurses.dev ncurses.man gnused bash gawk - gnugrep llvmPackages.clang-unwrapped llvmPackages.clang-unwrapped.man patch pcre.out binutils-raw.out + gnugrep llvmPackages.clang-unwrapped patch pcre.out binutils-raw.out binutils-raw.dev binutils gettext ]) ++ (with pkgs.darwin; [ dyld Libsystem CF cctools ICU libiconv locale diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 7a4864faa6d9..1334cdef5a77 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -5624,7 +5624,7 @@ with pkgs; llvmPackages_4 = callPackage ../development/compilers/llvm/4 ({ inherit (stdenvAdapters) overrideCC; } // stdenv.lib.optionalAttrs stdenv.isDarwin { - cmake = cmake.override { isBootstrap = true; useSharedLibraries = false; }; + cmake = cmake.override { isBootstrap = true; }; libxml2 = libxml2.override { pythonSupport = false; }; python2 = callPackage ../development/interpreters/python/cpython/2.7/boot.nix { inherit (darwin) CF configd; }; });