diff --git a/pkgs/development/compilers/llvm/4/default.nix b/pkgs/development/compilers/llvm/4/default.nix index 75037f6a07db..9651dbb72f4d 100644 --- a/pkgs/development/compilers/llvm/4/default.nix +++ b/pkgs/development/compilers/llvm/4/default.nix @@ -1,5 +1,5 @@ -{ lowPrio, newScope, stdenv, cmake, libstdcxxHook -, libxml2, python2, isl, fetchurl, overrideCC, wrapCCWith +{ lowPrio, newScope, pkgs, stdenv, cmake, libstdcxxHook +, libxml2, python, isl, fetchurl, overrideCC, wrapCCWith , buildLlvmTools # tools, but from the previous stage, for cross , targetLlvmLibraries # libraries, but from the next stage, for cross }: @@ -16,25 +16,28 @@ let compiler-rt_src = fetch "compiler-rt" "0h5lpv1z554szi4r4blbskhwrkd78ir50v3ng8xvk1s86fa7gj53"; clang-tools-extra_src = fetch "clang-tools-extra" "1dhmp7ccfpr42bmvk3kp37ngjpf3a9m5d4kkpsn7d00hzi7fdl9m"; - # Add man output without introducing extra dependencies. - overrideManOutput = drv: - let drv-manpages = drv.override { enableManpages = true; }; in - drv // { man = drv-manpages.out; /*outputs = drv.outputs ++ ["man"];*/ }; - tools = stdenv.lib.makeExtensible (tools: let - callPackage = newScope (tools // { inherit stdenv cmake libxml2 python2 isl release_version version fetch; }); + callPackage = newScope (tools // { inherit stdenv cmake libxml2 python isl release_version version fetch; }); in { - llvm = overrideManOutput (callPackage ./llvm.nix { + llvm = callPackage ./llvm.nix { inherit compiler-rt_src; - }); - clang-unwrapped = overrideManOutput (callPackage ./clang { + }; + clang-unwrapped = callPackage ./clang { inherit clang-tools-extra_src; + }; + + llvm-manpages = lowPrio (tools.llvm.override { + enableManpages = true; + python = pkgs.python; # don't use python-boot + }); + + clang-manpages = lowPrio (tools.clang-unwrapped.override { + enableManpages = true; + python = pkgs.python; # don't use python-boot }); libclang = tools.clang-unwrapped.lib; - llvm-manpages = lowPrio tools.llvm.man; - clang-manpages = lowPrio tools.clang-unwrapped.man; clang = if stdenv.cc.isGNU then tools.libstdcxxClang else tools.libcxxClang; @@ -54,7 +57,7 @@ let }); libraries = stdenv.lib.makeExtensible (libraries: let - callPackage = newScope (libraries // buildLlvmTools // { inherit stdenv cmake libxml2 python2 isl release_version version fetch; }); + callPackage = newScope (libraries // buildLlvmTools // { inherit stdenv cmake libxml2 python isl release_version version fetch; }); in { stdenv = overrideCC stdenv buildLlvmTools.clang; diff --git a/pkgs/development/compilers/llvm/4/llvm.nix b/pkgs/development/compilers/llvm/4/llvm.nix index 514c3a006e38..e474f9a73fe8 100644 --- a/pkgs/development/compilers/llvm/4/llvm.nix +++ b/pkgs/development/compilers/llvm/4/llvm.nix @@ -13,7 +13,7 @@ , compiler-rt_src , debugVersion ? false , enableManpages ? false -, enableSharedLibraries ? true +, enableSharedLibraries ? !enableManpages }: let diff --git a/pkgs/development/compilers/llvm/5/default.nix b/pkgs/development/compilers/llvm/5/default.nix index 00b0083108b5..38d2b0d461d4 100644 --- a/pkgs/development/compilers/llvm/5/default.nix +++ b/pkgs/development/compilers/llvm/5/default.nix @@ -1,5 +1,5 @@ -{ lowPrio, newScope, stdenv, cmake, libstdcxxHook -, libxml2, python2, isl, fetchurl, overrideCC, wrapCCWith +{ lowPrio, newScope, pkgs, stdenv, cmake, libstdcxxHook +, libxml2, python, isl, fetchurl, overrideCC, wrapCCWith , buildLlvmTools # tools, but from the previous stage, for cross , targetLlvmLibraries # libraries, but from the next stage, for cross }: @@ -15,13 +15,8 @@ let clang-tools-extra_src = fetch "clang-tools-extra" "018b3fiwah8f8br5i26qmzh6sjvzchpn358sn8v079m49f2jldm3"; - # Add man output without introducing extra dependencies. - overrideManOutput = drv: - let drv-manpages = drv.override { enableManpages = true; }; in - drv // { man = drv-manpages.out; /*outputs = drv.outputs ++ ["man"];*/ }; - tools = stdenv.lib.makeExtensible (tools: let - callPackage = newScope (tools // { inherit stdenv cmake libxml2 python2 isl release_version version fetch; }); + callPackage = newScope (tools // { inherit stdenv cmake libxml2 python isl release_version version fetch; }); mkExtraBuildCommands = cc: '' rsrc="$out/resource-root" mkdir "$rsrc" @@ -33,15 +28,23 @@ let ''; in { - llvm = overrideManOutput (callPackage ./llvm.nix { }); + llvm = callPackage ./llvm.nix { }; - clang-unwrapped = overrideManOutput (callPackage ./clang { + clang-unwrapped = callPackage ./clang { inherit clang-tools-extra_src; + }; + + llvm-manpages = lowPrio (tools.llvm.override { + enableManpages = true; + python = pkgs.python; # don't use python-boot + }); + + clang-manpages = lowPrio (tools.clang-unwrapped.override { + enableManpages = true; + python = pkgs.python; # don't use python-boot }); libclang = tools.clang-unwrapped.lib; - llvm-manpages = lowPrio tools.llvm.man; - clang-manpages = lowPrio tools.clang-unwrapped.man; clang = if stdenv.cc.isGNU then tools.libstdcxxClang else tools.libcxxClang; @@ -70,7 +73,7 @@ let }); libraries = stdenv.lib.makeExtensible (libraries: let - callPackage = newScope (libraries // buildLlvmTools // { inherit stdenv cmake libxml2 python2 isl release_version version fetch; }); + callPackage = newScope (libraries // buildLlvmTools // { inherit stdenv cmake libxml2 python isl release_version version fetch; }); in { compiler-rt = callPackage ./compiler-rt.nix {}; diff --git a/pkgs/development/compilers/llvm/6/default.nix b/pkgs/development/compilers/llvm/6/default.nix index 141daa88dcff..831e4b65344c 100644 --- a/pkgs/development/compilers/llvm/6/default.nix +++ b/pkgs/development/compilers/llvm/6/default.nix @@ -1,5 +1,5 @@ -{ lowPrio, newScope, stdenv, cmake, libstdcxxHook -, libxml2, python2, isl, fetchurl, overrideCC, wrapCCWith +{ lowPrio, newScope, pkgs, stdenv, cmake, libstdcxxHook +, libxml2, python, isl, fetchurl, overrideCC, wrapCCWith , buildLlvmTools # tools, but from the previous stage, for cross , targetLlvmLibraries # libraries, but from the next stage, for cross }: @@ -15,13 +15,8 @@ let clang-tools-extra_src = fetch "clang-tools-extra" "1w8ml7fyn4vyxmy59n2qm4r1k1kgwgwkaldp6m45fdv4g0kkfbhd"; - # Add man output without introducing extra dependencies. - overrideManOutput = drv: - let drv-manpages = drv.override { enableManpages = true; }; in - drv // { man = drv-manpages.out; /*outputs = drv.outputs ++ ["man"];*/ }; - tools = stdenv.lib.makeExtensible (tools: let - callPackage = newScope (tools // { inherit stdenv cmake libxml2 python2 isl release_version version fetch; }); + callPackage = newScope (tools // { inherit stdenv cmake libxml2 python isl release_version version fetch; }); mkExtraBuildCommands = cc: '' rsrc="$out/resource-root" mkdir "$rsrc" @@ -33,15 +28,23 @@ let ''; in { - llvm = overrideManOutput (callPackage ./llvm.nix { }); + llvm = callPackage ./llvm.nix { }; - clang-unwrapped = overrideManOutput (callPackage ./clang { + clang-unwrapped = callPackage ./clang { inherit clang-tools-extra_src; + }; + + llvm-manpages = lowPrio (tools.llvm.override { + enableManpages = true; + python = pkgs.python; # don't use python-boot + }); + + clang-manpages = lowPrio (tools.clang-unwrapped.override { + enableManpages = true; + python = pkgs.python; # don't use python-boot }); libclang = tools.clang-unwrapped.lib; - llvm-manpages = lowPrio tools.llvm.man; - clang-manpages = lowPrio tools.clang-unwrapped.man; clang = if stdenv.cc.isGNU then tools.libstdcxxClang else tools.libcxxClang; @@ -70,7 +73,7 @@ let }); libraries = stdenv.lib.makeExtensible (libraries: let - callPackage = newScope (libraries // buildLlvmTools // { inherit stdenv cmake libxml2 python2 isl release_version version fetch; }); + callPackage = newScope (libraries // buildLlvmTools // { inherit stdenv cmake libxml2 python isl release_version version fetch; }); in { compiler-rt = callPackage ./compiler-rt.nix {}; diff --git a/pkgs/stdenv/darwin/default.nix b/pkgs/stdenv/darwin/default.nix index b7b3640a9535..22dd700b2dda 100644 --- a/pkgs/stdenv/darwin/default.nix +++ b/pkgs/stdenv/darwin/default.nix @@ -339,15 +339,7 @@ in rec { llvmPackages_5 = super.llvmPackages_5 // (let tools = super.llvmPackages_5.tools.extend (_: super: { - # Build man pages with final stdenv not before - llvm = lib.extendDerivation - true - { inherit (super.llvm) man; } - llvmPackages_5.llvm; - clang-unwrapped = lib.extendDerivation - true - { inherit (super.clang-unwrapped) man; } - llvmPackages_5.clang-unwrapped; + inherit (llvmPackages_5) llvm clang-unwrapped; }); libraries = super.llvmPackages_5.libraries.extend (_: _: { inherit (llvmPackages_5) compiler-rt libcxx libcxxabi; @@ -384,9 +376,8 @@ in rec { initialPath = import ../common-path.nix { inherit pkgs; }; shell = "${pkgs.bash}/bin/bash"; - # Hack to avoid man pages in stdenv, building bootstrap python cc = pkgs.llvmPackages.libcxxClang.override { - cc = builtins.removeAttrs pkgs.llvmPackages.clang-unwrapped [ "man" ]; + cc = pkgs.llvmPackages.clang-unwrapped; }; extraNativeBuildInputs = [];