Skip to content

Commit

Permalink
Merge pull request #191698 from ShamrockLee/clang-tools-python
Browse files Browse the repository at this point in the history
clang-tools: move into llvmPackages
  • Loading branch information
JohnRTitor authored Jun 22, 2024
2 parents 5dad22a + 6575170 commit 6498422
Show file tree
Hide file tree
Showing 13 changed files with 56 additions and 43 deletions.
4 changes: 4 additions & 0 deletions nixos/doc/manual/release-notes/rl-2411.section.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,10 @@
Also be aware that if you have set additional options in `services.wstunnel.{clients,servers}.<name>.extraArgs`,
that those might have been removed or modified upstream.

- `clang-tools_<version>` packages have been moved into `llvmPackages_<version>` (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_<version>` 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
Expand Down
3 changes: 3 additions & 0 deletions pkgs/development/compilers/llvm/12/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 3 additions & 0 deletions pkgs/development/compilers/llvm/13/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 3 additions & 0 deletions pkgs/development/compilers/llvm/14/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 3 additions & 0 deletions pkgs/development/compilers/llvm/15/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 3 additions & 0 deletions pkgs/development/compilers/llvm/16/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 3 additions & 0 deletions pkgs/development/compilers/llvm/17/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 3 additions & 0 deletions pkgs/development/compilers/llvm/18/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -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 ];
};
Expand Down
File renamed without changes.
3 changes: 3 additions & 0 deletions pkgs/development/compilers/llvm/git/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
9 changes: 9 additions & 0 deletions pkgs/top-level/aliases.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
33 changes: 2 additions & 31 deletions pkgs/top-level/all-packages.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit 6498422

Please sign in to comment.