Skip to content

Commit 0284330

Browse files
committedMar 17, 2025
lib.licenses.asl20-llvm: replace with separate llvm-exception
This essentially reverts 7ce8e7c asl20-llvm does not produce a valid SPDX ID, it produces a valid SPDX Expression. However, this is not what the spdxId field promises. This is relevant because we cannot produce valid SBOMs (e.g. CycloneDX) using this field as the schemas for these SBOMs check that the IDs are valid. This change leaves us with consistently valid SPDX IDs at the cost of slightly less convenience.
1 parent 272717e commit 0284330

File tree

8 files changed

+30
-14
lines changed

8 files changed

+30
-14
lines changed
 

‎lib/licenses.nix

+5-5
Original file line numberDiff line numberDiff line change
@@ -140,11 +140,6 @@ lib.mapAttrs mkLicense ({
140140
fullName = "Apache License 2.0";
141141
};
142142

143-
asl20-llvm = {
144-
spdxId = "Apache-2.0 WITH LLVM-exception";
145-
fullName = "Apache License 2.0 with LLVM Exceptions";
146-
};
147-
148143
bitstreamVera = {
149144
spdxId = "Bitstream-Vera";
150145
fullName = "Bitstream Vera Font License";
@@ -859,6 +854,11 @@ lib.mapAttrs mkLicense ({
859854
url = "https://opensource.franz.com/preamble.html";
860855
};
861856

857+
llvm-exception = {
858+
spdxId = "LLVM-exception";
859+
fullName = "LLVM Exception"; # LLVM exceptions to the Apache 2.0 License
860+
};
861+
862862
lppl1 = {
863863
spdxId = "LPPL-1.0";
864864
fullName = "LaTeX Project Public License v1.0";

‎pkgs/by-name/co/codechecker/package.nix

+4-1
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,10 @@ python3Packages.buildPythonApplication rec {
113113
homepage = "https://github.com/Ericsson/codechecker";
114114
changelog = "https://github.com/Ericsson/codechecker/releases/tag/v${version}";
115115
description = "Analyzer tooling, defect database and viewer extension for the Clang Static Analyzer and Clang Tidy";
116-
license = licenses.asl20-llvm;
116+
license = with licenses; [
117+
asl20
118+
llvm-exception
119+
];
117120
maintainers = with maintainers; [
118121
zebreus
119122
felixsinger

‎pkgs/by-name/en/enzyme/package.nix

+4-1
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,9 @@ llvmPackages.stdenv.mkDerivation rec {
4444
description = "High-performance automatic differentiation of LLVM and MLIR";
4545
maintainers = with lib.maintainers; [ kiranshila ];
4646
platforms = lib.platforms.all;
47-
license = lib.licenses.asl20-llvm;
47+
license = with lib.licenses; [
48+
asl20
49+
llvm-exception
50+
];
4851
};
4952
}

‎pkgs/by-name/ko/kokkos/package.nix

+4-1
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,10 @@ stdenv.mkDerivation (finalAttrs: {
3838
description = "C++ Performance Portability Programming EcoSystem";
3939
homepage = "https://github.com/kokkos/kokkos";
4040
changelog = "https://github.com/kokkos/kokkos/blob/${finalAttrs.src.rev}/CHANGELOG.md";
41-
license = with licenses; [ asl20-llvm ];
41+
license = with licenses; [
42+
asl20
43+
llvm-exception
44+
];
4245
maintainers = with maintainers; [ Madouura ];
4346
platforms = platforms.unix;
4447
broken = stdenv.hostPlatform.isDarwin;

‎pkgs/by-name/li/libabigail/package.nix

+4-1
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,10 @@ stdenv.mkDerivation rec {
5858
meta = with lib; {
5959
description = "ABI Generic Analysis and Instrumentation Library";
6060
homepage = "https://sourceware.org/libabigail/";
61-
license = licenses.asl20-llvm;
61+
license = with licenses; [
62+
asl20
63+
llvm-exception
64+
];
6265
maintainers = [ ];
6366
platforms = platforms.linux;
6467
};

‎pkgs/by-name/sh/shader-slang/package.nix

+4-1
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,10 @@ stdenv.mkDerivation (finalAttrs: {
144144
meta = {
145145
description = "A shading language that makes it easier to build and maintain large shader codebases in a modular and extensible fashion";
146146
homepage = "https://github.com/shader-slang/slang";
147-
license = lib.licenses.asl20-llvm;
147+
license = with lib.licenses; [
148+
asl20
149+
llvm-exception
150+
];
148151
maintainers = with lib.maintainers; [ niklaskorz ];
149152
mainProgram = "slangc";
150153
platforms = lib.platforms.all;

‎pkgs/development/compilers/llvm/common/common-let.nix

+3-3
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@
1010
rec {
1111
llvm_meta = {
1212
license = with lib.licenses; [ ncsa ] ++
13-
# Contributions after June 1st, 2024 are only licensed under asl20-llvm:
14-
# https://github.com/llvm/llvm-project/pull/92394
15-
lib.optional (lib.versionAtLeast release_version "19") asl20-llvm;
13+
# Contributions after June 1st, 2024 are only licensed under asl20 and
14+
# llvm-exception: https://github.com/llvm/llvm-project/pull/92394
15+
lib.optionals (lib.versionAtLeast release_version "19") [ asl20 llvm-exception ];
1616
maintainers = lib.teams.llvm.members;
1717

1818
# See llvm/cmake/config-ix.cmake.

‎pkgs/development/libraries/wasilibc/default.nix

+2-1
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,8 @@ stdenv.mkDerivation {
7272
rvolosatovs
7373
];
7474
license = with licenses; [
75-
asl20-llvm
75+
asl20
76+
llvm-exception
7677
mit
7778
];
7879
};

0 commit comments

Comments
 (0)
Failed to load comments.