diff options
| author | John Ericson <John.Ericson@Obsidian.Systems> | 2024-05-27 15:32:45 -0400 |
|---|---|---|
| committer | John Ericson <John.Ericson@Obsidian.Systems> | 2024-05-27 15:41:42 -0400 |
| commit | 5975ba6be152ee6196dd7e1167ac9cd886d45963 (patch) | |
| tree | 96c1b69893a9eeb489e6b371490560bbbf277b55 | |
| parent | llvmPackages: Clean up in a few ways (diff) | |
| download | nixpkgs-origin/llvm-cleanup.tar.gz | |
clang: build with Ninja for all versionsorigin/llvm-cleanup
Older versions using Make is a relic of old stdenv bootstrap.
| -rw-r--r-- | pkgs/development/compilers/llvm/common/clang/default.nix | 48 |
1 files changed, 20 insertions, 28 deletions
diff --git a/pkgs/development/compilers/llvm/common/clang/default.nix b/pkgs/development/compilers/llvm/common/clang/default.nix index 40e8d41be521..4c5a3cf3ca4d 100644 --- a/pkgs/development/compilers/llvm/common/clang/default.nix +++ b/pkgs/development/compilers/llvm/common/clang/default.nix @@ -44,9 +44,11 @@ stdenv.mkDerivation ( sourceRoot = if lib.versionOlder release_version "13" then null else "${src.name}/${pname}"; nativeBuildInputs = - [ cmake ] - ++ (lib.optional (lib.versionAtLeast release_version "15") ninja) - ++ [ python3 ] + [ + cmake + ninja + python3 + ] ++ lib.optional (lib.versionAtLeast version "18" && enableManpages) python3.pkgs.myst-parser ++ lib.optional enableManpages python3.pkgs.sphinx ++ lib.optional stdenv.hostPlatform.isDarwin fixDarwinDylibNames; @@ -220,35 +222,25 @@ stdenv.mkDerivation ( mainProgram = "clang"; }; } - // lib.optionalAttrs enableManpages ( - { - pname = "clang-manpages"; + // lib.optionalAttrs enableManpages { + pname = "clang-manpages"; - installPhase = '' - mkdir -p $out/share/man/man1 - # Manually install clang manpage - cp docs/man/*.1 $out/share/man/man1/ - ''; + installPhase = '' + mkdir -p $out/share/man/man1 + # Manually install clang manpage + cp docs/man/*.1 $out/share/man/man1/ + ''; - outputs = [ "out" ]; + outputs = [ "out" ]; - doCheck = false; + doCheck = false; - meta = llvm_meta // { - description = "man page for Clang ${version}"; - }; - } - // ( - if lib.versionOlder release_version "15" then - { - buildPhase = '' - make docs-clang-man - ''; - } - else - { ninjaFlags = [ "docs-clang-man" ]; } - ) - ) + meta = llvm_meta // { + description = "man page for Clang ${version}"; + }; + + ninjaFlags = [ "docs-clang-man" ]; + } // (lib.optionalAttrs (clang-tools-extra_src != null) { inherit clang-tools-extra_src; }) // (lib.optionalAttrs (lib.versionOlder release_version "13") { unpackPhase = '' |
