diff options
Diffstat (limited to 'pkgs/development/compilers/llvm/9/clang/default.nix')
-rw-r--r-- | pkgs/development/compilers/llvm/9/clang/default.nix | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/pkgs/development/compilers/llvm/9/clang/default.nix b/pkgs/development/compilers/llvm/9/clang/default.nix index b880d843d5983..87b29163f43e3 100644 --- a/pkgs/development/compilers/llvm/9/clang/default.nix +++ b/pkgs/development/compilers/llvm/9/clang/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetch, cmake, libxml2, llvm, version, clang-tools-extra_src, python3, lld +{ lib, stdenv, fetch, cmake, libxml2, llvm, version, clang-tools-extra_src, python3, lld , fixDarwinDylibNames , enableManpages ? false , enablePolly ? false # TODO: get this info from llvm (passthru?) @@ -20,8 +20,8 @@ let ''; nativeBuildInputs = [ cmake python3 ] - ++ stdenv.lib.optional enableManpages python3.pkgs.sphinx - ++ stdenv.lib.optional stdenv.hostPlatform.isDarwin fixDarwinDylibNames; + ++ lib.optional enableManpages python3.pkgs.sphinx + ++ lib.optional stdenv.hostPlatform.isDarwin fixDarwinDylibNames; buildInputs = [ libxml2 llvm lld ]; @@ -29,13 +29,13 @@ let "-DCMAKE_CXX_FLAGS=-std=c++11" "-DCLANGD_BUILD_XPC=OFF" "-DLLVM_ENABLE_RTTI=ON" - ] ++ stdenv.lib.optionals enableManpages [ + ] ++ lib.optionals enableManpages [ "-DCLANG_INCLUDE_DOCS=ON" "-DLLVM_ENABLE_SPHINX=ON" "-DSPHINX_OUTPUT_MAN=ON" "-DSPHINX_OUTPUT_HTML=OFF" "-DSPHINX_WARNINGS_AS_ERRORS=OFF" - ] ++ stdenv.lib.optionals enablePolly [ + ] ++ lib.optionals enablePolly [ "-DWITH_POLLY=ON" "-DLINK_POLLY_INTO_TOOLS=ON" ]; @@ -55,9 +55,9 @@ let # Patch for standalone doc building sed -i '1s,^,find_package(Sphinx REQUIRED)\n,' docs/CMakeLists.txt - '' + stdenv.lib.optionalString stdenv.hostPlatform.isMusl '' + '' + lib.optionalString stdenv.hostPlatform.isMusl '' sed -i -e 's/lgcc_s/lgcc_eh/' lib/Driver/ToolChains/*.cpp - '' + stdenv.lib.optionalString stdenv.hostPlatform.isDarwin '' + '' + lib.optionalString stdenv.hostPlatform.isDarwin '' substituteInPlace tools/extra/clangd/CMakeLists.txt \ --replace "NOT HAVE_CXX_ATOMICS64_WITHOUT_LIB" FALSE ''; @@ -96,10 +96,10 @@ let meta = { description = "A c, c++, objective-c, and objective-c++ frontend for the llvm compiler"; homepage = "https://llvm.org/"; - license = stdenv.lib.licenses.ncsa; - platforms = stdenv.lib.platforms.all; + license = lib.licenses.ncsa; + platforms = lib.platforms.all; }; - } // stdenv.lib.optionalAttrs enableManpages { + } // lib.optionalAttrs enableManpages { pname = "clang-manpages"; buildPhase = '' |