lib.licenses.asl20-llvm: replace with separate llvm-exception

This essentially reverts 7ce8e7c4cf90492a631e96bcfe70724104914381

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.
This commit is contained in:
nikstur 2025-03-17 12:08:48 +01:00
parent 272717e36b
commit 02843300bb
8 changed files with 30 additions and 14 deletions

View File

@ -140,11 +140,6 @@ lib.mapAttrs mkLicense ({
fullName = "Apache License 2.0";
};
asl20-llvm = {
spdxId = "Apache-2.0 WITH LLVM-exception";
fullName = "Apache License 2.0 with LLVM Exceptions";
};
bitstreamVera = {
spdxId = "Bitstream-Vera";
fullName = "Bitstream Vera Font License";
@ -859,6 +854,11 @@ lib.mapAttrs mkLicense ({
url = "https://opensource.franz.com/preamble.html";
};
llvm-exception = {
spdxId = "LLVM-exception";
fullName = "LLVM Exception"; # LLVM exceptions to the Apache 2.0 License
};
lppl1 = {
spdxId = "LPPL-1.0";
fullName = "LaTeX Project Public License v1.0";

View File

@ -113,7 +113,10 @@ python3Packages.buildPythonApplication rec {
homepage = "https://github.com/Ericsson/codechecker";
changelog = "https://github.com/Ericsson/codechecker/releases/tag/v${version}";
description = "Analyzer tooling, defect database and viewer extension for the Clang Static Analyzer and Clang Tidy";
license = licenses.asl20-llvm;
license = with licenses; [
asl20
llvm-exception
];
maintainers = with maintainers; [
zebreus
felixsinger

View File

@ -44,6 +44,9 @@ llvmPackages.stdenv.mkDerivation rec {
description = "High-performance automatic differentiation of LLVM and MLIR";
maintainers = with lib.maintainers; [ kiranshila ];
platforms = lib.platforms.all;
license = lib.licenses.asl20-llvm;
license = with lib.licenses; [
asl20
llvm-exception
];
};
}

View File

@ -38,7 +38,10 @@ stdenv.mkDerivation (finalAttrs: {
description = "C++ Performance Portability Programming EcoSystem";
homepage = "https://github.com/kokkos/kokkos";
changelog = "https://github.com/kokkos/kokkos/blob/${finalAttrs.src.rev}/CHANGELOG.md";
license = with licenses; [ asl20-llvm ];
license = with licenses; [
asl20
llvm-exception
];
maintainers = with maintainers; [ Madouura ];
platforms = platforms.unix;
broken = stdenv.hostPlatform.isDarwin;

View File

@ -58,7 +58,10 @@ stdenv.mkDerivation rec {
meta = with lib; {
description = "ABI Generic Analysis and Instrumentation Library";
homepage = "https://sourceware.org/libabigail/";
license = licenses.asl20-llvm;
license = with licenses; [
asl20
llvm-exception
];
maintainers = [ ];
platforms = platforms.linux;
};

View File

@ -144,7 +144,10 @@ stdenv.mkDerivation (finalAttrs: {
meta = {
description = "A shading language that makes it easier to build and maintain large shader codebases in a modular and extensible fashion";
homepage = "https://github.com/shader-slang/slang";
license = lib.licenses.asl20-llvm;
license = with lib.licenses; [
asl20
llvm-exception
];
maintainers = with lib.maintainers; [ niklaskorz ];
mainProgram = "slangc";
platforms = lib.platforms.all;

View File

@ -10,9 +10,9 @@
rec {
llvm_meta = {
license = with lib.licenses; [ ncsa ] ++
# Contributions after June 1st, 2024 are only licensed under asl20-llvm:
# https://github.com/llvm/llvm-project/pull/92394
lib.optional (lib.versionAtLeast release_version "19") asl20-llvm;
# Contributions after June 1st, 2024 are only licensed under asl20 and
# llvm-exception: https://github.com/llvm/llvm-project/pull/92394
lib.optionals (lib.versionAtLeast release_version "19") [ asl20 llvm-exception ];
maintainers = lib.teams.llvm.members;
# See llvm/cmake/config-ix.cmake.

View File

@ -72,7 +72,8 @@ stdenv.mkDerivation {
rvolosatovs
];
license = with licenses; [
asl20-llvm
asl20
llvm-exception
mit
];
};