darwin-stdenv: remove python-sphinx and a bunch of other dependencies from the stdenv

This commit is contained in:
Daiderd Jordan 2017-06-01 23:23:56 +02:00
parent b3fb9178e8
commit 9e2aba3572
No known key found for this signature in database
GPG Key ID: D02435D05B810C96
5 changed files with 20 additions and 18 deletions

View File

@ -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/

View File

@ -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"
];

View File

@ -3,7 +3,7 @@
# darwin attributes
, ps
, isBootstrap ? false
, useSharedLibraries ? !stdenv.isCygwin
, useSharedLibraries ? (!isBootstrap && !stdenv.isCygwin)
, useNcurses ? false, ncurses
, useQt4 ? false, qt4
}:

View File

@ -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

View File

@ -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; };
});