diff --git a/nixos/doc/manual/release-notes/rl-2411.section.md b/nixos/doc/manual/release-notes/rl-2411.section.md index 2de4cf4d08af2..f71fef49ba500 100644 --- a/nixos/doc/manual/release-notes/rl-2411.section.md +++ b/nixos/doc/manual/release-notes/rl-2411.section.md @@ -35,6 +35,10 @@ Also be aware that if you have set additional options in `services.wstunnel.{clients,servers}..extraArgs`, that those might have been removed or modified upstream. +- `clang-tools_` packages have been moved into `llvmPackages_` (i.e. `clang-tools_18` is now `llvmPackages_18.clang-tools`). + - For convenience, the top-level `clang-tools` attribute remains and is now bound to `llvmPackages.clang-tools`. + - Top-level `clang_tools_` attributes are now aliases; these will be removed in a future release. + - `nginx` package no longer includes `gd` and `geoip` dependencies. For enabling it, override `nginx` package with the optionals `withImageFilter` and `withGeoIP`. - `openssh` and `openssh_hpn` are now compiled without Kerberos 5 / GSSAPI support in an effort to reduce the attack surface of the components for the majority of users. Users needing this support can diff --git a/pkgs/development/compilers/llvm/12/default.nix b/pkgs/development/compilers/llvm/12/default.nix index 0e498aa303565..c7c119a45b8ae 100644 --- a/pkgs/development/compilers/llvm/12/default.nix +++ b/pkgs/development/compilers/llvm/12/default.nix @@ -149,6 +149,9 @@ let # python3 = pkgs.python3; # don't use python-boot # }); + # Wrapper for standalone command line utilities + clang-tools = callPackage ../common/clang-tools { }; + # pick clang appropriate for package set we are targeting clang = /**/ if stdenv.targetPlatform.libc == null then tools.clangNoLibc diff --git a/pkgs/development/compilers/llvm/13/default.nix b/pkgs/development/compilers/llvm/13/default.nix index 22bdc6140ab30..ffbbe1deb0d4e 100644 --- a/pkgs/development/compilers/llvm/13/default.nix +++ b/pkgs/development/compilers/llvm/13/default.nix @@ -174,6 +174,9 @@ in let # python3 = pkgs.python3; # don't use python-boot # }); + # Wrapper for standalone command line utilities + clang-tools = callPackage ../common/clang-tools { }; + # pick clang appropriate for package set we are targeting clang = /**/ if stdenv.targetPlatform.libc == null then tools.clangNoLibc diff --git a/pkgs/development/compilers/llvm/14/default.nix b/pkgs/development/compilers/llvm/14/default.nix index 22fd8223c8f27..06972af065c98 100644 --- a/pkgs/development/compilers/llvm/14/default.nix +++ b/pkgs/development/compilers/llvm/14/default.nix @@ -145,6 +145,9 @@ in let # python3 = pkgs.python3; # don't use python-boot # }); + # Wrapper for standalone command line utilities + clang-tools = callPackage ../common/clang-tools { }; + # pick clang appropriate for package set we are targeting clang = /**/ if stdenv.targetPlatform.libc == null then tools.clangNoLibc diff --git a/pkgs/development/compilers/llvm/15/default.nix b/pkgs/development/compilers/llvm/15/default.nix index b3d2d9c3de48c..e50e35b2c4eb0 100644 --- a/pkgs/development/compilers/llvm/15/default.nix +++ b/pkgs/development/compilers/llvm/15/default.nix @@ -188,6 +188,9 @@ in let python3 = pkgs.python3; # don't use python-boot }); + # Wrapper for standalone command line utilities + clang-tools = callPackage ../common/clang-tools { }; + # pick clang appropriate for package set we are targeting clang = /**/ if stdenv.targetPlatform.libc == null then tools.clangNoLibc diff --git a/pkgs/development/compilers/llvm/16/default.nix b/pkgs/development/compilers/llvm/16/default.nix index 521e1ed92e3ea..80b2424b14cc0 100644 --- a/pkgs/development/compilers/llvm/16/default.nix +++ b/pkgs/development/compilers/llvm/16/default.nix @@ -182,6 +182,9 @@ in let python3 = pkgs.python3; # don't use python-boot }); + # Wrapper for standalone command line utilities + clang-tools = callPackage ../common/clang-tools { }; + # pick clang appropriate for package set we are targeting clang = /**/ if stdenv.targetPlatform.useLLVM or false then tools.clangUseLLVM diff --git a/pkgs/development/compilers/llvm/17/default.nix b/pkgs/development/compilers/llvm/17/default.nix index af0d648c4fd01..84979d24b1971 100644 --- a/pkgs/development/compilers/llvm/17/default.nix +++ b/pkgs/development/compilers/llvm/17/default.nix @@ -176,6 +176,9 @@ in let python3 = pkgs.python3; # don't use python-boot }); + # Wrapper for standalone command line utilities + clang-tools = callPackage ../common/clang-tools { }; + # pick clang appropriate for package set we are targeting clang = /**/ if stdenv.targetPlatform.useLLVM or false then tools.clangUseLLVM diff --git a/pkgs/development/compilers/llvm/18/default.nix b/pkgs/development/compilers/llvm/18/default.nix index 4ef9728708385..878f1e3a8e7e4 100644 --- a/pkgs/development/compilers/llvm/18/default.nix +++ b/pkgs/development/compilers/llvm/18/default.nix @@ -176,6 +176,9 @@ in let python3 = pkgs.python3; # don't use python-boot }); + # Wrapper for standalone command line utilities + clang-tools = callPackage ../common/clang-tools { }; + # pick clang appropriate for package set we are targeting clang = /**/ if stdenv.targetPlatform.useLLVM or false then tools.clangUseLLVM diff --git a/pkgs/development/tools/clang-tools/default.nix b/pkgs/development/compilers/llvm/common/clang-tools/default.nix similarity index 70% rename from pkgs/development/tools/clang-tools/default.nix rename to pkgs/development/compilers/llvm/common/clang-tools/default.nix index ece8f93b57a1f..7ecf0c5c431de 100644 --- a/pkgs/development/tools/clang-tools/default.nix +++ b/pkgs/development/compilers/llvm/common/clang-tools/default.nix @@ -1,17 +1,22 @@ -{ lib, stdenv, llvmPackages, enableLibcxx ? false }: -# enableLibcxx will use the c++ headers from clang instead of gcc. -# This shouldn't have any effect on platforms that use clang as the default compiler already. - -let - unwrapped = llvmPackages.clang-unwrapped; - -in stdenv.mkDerivation { - inherit unwrapped; +{ + lib, + stdenv, + clang-unwrapped, + clang, + libcxxClang, + llvm_meta, + # enableLibcxx will use the c++ headers from clang instead of gcc. + # This shouldn't have any effect on platforms that use clang as the default compiler already. + enableLibcxx ? false, +}: + +stdenv.mkDerivation { + unwrapped = clang-unwrapped; pname = "clang-tools"; - version = lib.getVersion unwrapped; + version = lib.getVersion clang-unwrapped; dontUnpack = true; - clang = if enableLibcxx then llvmPackages.libcxxClang else llvmPackages.clang; + clang = if enableLibcxx then libcxxClang else clang; installPhase = '' runHook preInstall @@ -47,7 +52,7 @@ in stdenv.mkDerivation { runHook postInstall ''; - meta = unwrapped.meta // { + meta = llvm_meta // { description = "Standalone command line tools for C++ development"; maintainers = with lib.maintainers; [ patryk27 ]; }; diff --git a/pkgs/development/tools/clang-tools/wrapper b/pkgs/development/compilers/llvm/common/clang-tools/wrapper similarity index 100% rename from pkgs/development/tools/clang-tools/wrapper rename to pkgs/development/compilers/llvm/common/clang-tools/wrapper diff --git a/pkgs/development/compilers/llvm/git/default.nix b/pkgs/development/compilers/llvm/git/default.nix index 0e3a0eb7c6967..786bd82fa648c 100644 --- a/pkgs/development/compilers/llvm/git/default.nix +++ b/pkgs/development/compilers/llvm/git/default.nix @@ -181,6 +181,9 @@ in let python3 = pkgs.python3; # don't use python-boot }); + # Wrapper for standalone command line utilities + clang-tools = callPackage ../common/clang-tools { }; + # pick clang appropriate for package set we are targeting clang = /**/ if stdenv.targetPlatform.useLLVM or false then tools.clangUseLLVM diff --git a/pkgs/top-level/aliases.nix b/pkgs/top-level/aliases.nix index 95fc867172e55..09179f9fb40ca 100644 --- a/pkgs/top-level/aliases.nix +++ b/pkgs/top-level/aliases.nix @@ -244,7 +244,16 @@ mapAliases ({ clang_10 = throw "clang_10 has been removed from nixpkgs"; # Added 2024-01-26 clang_11 = throw "clang_11 has been removed from nixpkgs"; # Added 2023-01-24 + clang-tools_12 = llvmPackages_12.clang-tools; # Added 2024-04-22 + clang-tools_13 = llvmPackages_13.clang-tools; # Added 2024-04-22 + clang-tools_14 = llvmPackages_14.clang-tools; # Added 2024-04-22 + clang-tools_15 = llvmPackages_15.clang-tools; # Added 2024-04-22 + clang-tools_16 = llvmPackages_16.clang-tools; # Added 2024-04-22 + clang-tools_17 = llvmPackages_17.clang-tools; # Added 2024-04-22 + clang-tools_18 = llvmPackages_18.clang-tools; # Added 2024-04-22 + cq-editor = throw "cq-editor has been removed, as it use a dependency that was disabled since python 3.8 and was last updated in 2021"; # Added 2024-05-13 + ### D ### dagger = throw "'dagger' has been removed from nixpkgs, as the trademark policy of the upstream project is incompatible"; # Added 2023-10-16 diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index f52160e15aeae..5a7a472e1b8b1 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -15177,31 +15177,7 @@ with pkgs; clang_16 = llvmPackages_16.clang; clang_17 = llvmPackages_17.clang; - clang-tools = callPackage ../development/tools/clang-tools { }; - - clang-tools_12 = callPackage ../development/tools/clang-tools { - llvmPackages = llvmPackages_12; - }; - - clang-tools_13 = callPackage ../development/tools/clang-tools { - llvmPackages = llvmPackages_13; - }; - - clang-tools_14 = callPackage ../development/tools/clang-tools { - llvmPackages = llvmPackages_14; - }; - - clang-tools_15 = callPackage ../development/tools/clang-tools { - llvmPackages = llvmPackages_15; - }; - - clang-tools_16 = callPackage ../development/tools/clang-tools { - llvmPackages = llvmPackages_16; - }; - - clang-tools_17 = callPackage ../development/tools/clang-tools { - llvmPackages = llvmPackages_17; - }; + clang-tools = llvmPackages.clang-tools; clang-analyzer = callPackage ../development/tools/analysis/clang-analyzer { llvmPackages = llvmPackages_14; @@ -16276,17 +16252,12 @@ with pkgs; lld_18 = llvmPackages_18.lld; lldb_18 = llvmPackages_18.lldb; llvm_18 = llvmPackages_18.llvm; - - clang-tools_18 = callPackage ../development/tools/clang-tools { - llvmPackages = llvmPackages_18; - }; }) llvmPackages_18 clang_18 lld_18 lldb_18 - llvm_18 - clang-tools_18; + llvm_18; lorri = callPackage ../tools/misc/lorri { inherit (darwin.apple_sdk.frameworks) CoreServices Security;