haskellPackages.llvm-ffi: 20.0 -> 21.0
We keep using LLVM 20, though, since LLVM 21 is still just a release candidate on our branch and llvm-ffi doesn't yet supported a released LLVM 21, just the git version. We can use the older version by passing a specific cabal flag. The evaluation warning reminding us to upgrade now also checks whether LLVM is a release candidate before triggering.
This commit is contained in:
@@ -37,8 +37,6 @@ default-package-overrides:
|
||||
- hsc3 < 0.21
|
||||
# 2024-12-31: last version that's compatible with GHC < 9.9
|
||||
- htree < 0.2.0.0
|
||||
# 2025-07-10: use latest released version of LLVM
|
||||
- llvm-ffi == 20.*
|
||||
# 2025-06-11: last version that supports pandoc == 3.6.* which is prescribed by LTS 23
|
||||
- pandoc-crossref < 0.3.20
|
||||
# keep-sorted end
|
||||
|
||||
@@ -508,19 +508,24 @@ builtins.intersectAttrs super {
|
||||
# LLVM input that llvm-ffi declares.
|
||||
llvm-ffi =
|
||||
let
|
||||
matchingLlvmVersion = lib.strings.toInt (lib.versions.major super.llvm-ffi.version);
|
||||
nextLlvmVersion = matchingLlvmVersion + 1;
|
||||
chosenLlvmVersion = 20;
|
||||
nextLlvmAttr = "llvmPackages_${toString (chosenLlvmVersion + 1)}";
|
||||
shouldUpgrade =
|
||||
pkgs ? ${nextLlvmAttr} && (lib.strings.match ".+rc.+" pkgs.${nextLlvmAttr}.llvm.version) == null;
|
||||
in
|
||||
lib.warnIf (pkgs ? "llvmPackages_${toString nextLlvmVersion}")
|
||||
# This package can be updated by changing the version constraint in
|
||||
# configuration-hackage2nix/main.yaml and regenerating the haskellPackages set.
|
||||
"haskellPackages.llvm-ffi: LLVM ${toString nextLlvmVersion} is available in Nixpkgs, consider updating."
|
||||
addBuildDepends
|
||||
lib.warnIf shouldUpgrade
|
||||
"haskellPackages.llvm-ffi: ${nextLlvmAttr} is available in Nixpkgs, consider updating."
|
||||
lib.pipe
|
||||
super.llvm-ffi
|
||||
[
|
||||
pkgs."llvmPackages_${toString matchingLlvmVersion}".llvm.lib
|
||||
pkgs."llvmPackages_${toString matchingLlvmVersion}".llvm.dev
|
||||
]
|
||||
super.llvm-ffi;
|
||||
# ATTN: There is no matching flag for the latest supported LLVM version,
|
||||
# so you may need to remove this when updating chosenLlvmVersion
|
||||
(enableCabalFlag "LLVM${toString chosenLlvmVersion}00")
|
||||
(addBuildDepends [
|
||||
pkgs."llvmPackages_${toString chosenLlvmVersion}".llvm.lib
|
||||
pkgs."llvmPackages_${toString chosenLlvmVersion}".llvm.dev
|
||||
])
|
||||
];
|
||||
|
||||
# Needs help finding LLVM.
|
||||
spaceprobe = addBuildTool self.buildHaskellPackages.llvmPackages.llvm super.spaceprobe;
|
||||
|
||||
@@ -425715,30 +425715,6 @@ self: {
|
||||
) { };
|
||||
|
||||
"llvm-ffi" = callPackage (
|
||||
{
|
||||
mkDerivation,
|
||||
base,
|
||||
enumset,
|
||||
LLVM,
|
||||
}:
|
||||
mkDerivation {
|
||||
pname = "llvm-ffi";
|
||||
version = "20.0";
|
||||
sha256 = "1vd9rzqq9fcml9zgrxrvplcgxd925xyy7ixprcxb8j4vc0a8hgzc";
|
||||
isLibrary = true;
|
||||
isExecutable = true;
|
||||
libraryHaskellDepends = [
|
||||
base
|
||||
enumset
|
||||
];
|
||||
librarySystemDepends = [ LLVM ];
|
||||
description = "FFI bindings to the LLVM compiler toolkit";
|
||||
license = lib.licenses.bsd3;
|
||||
maintainers = [ lib.maintainers.thielema ];
|
||||
}
|
||||
) { LLVM = null; };
|
||||
|
||||
"llvm-ffi_21_0" = callPackage (
|
||||
{
|
||||
mkDerivation,
|
||||
base,
|
||||
@@ -425758,7 +425734,6 @@ self: {
|
||||
librarySystemDepends = [ LLVM-21git ];
|
||||
description = "FFI bindings to the LLVM compiler toolkit";
|
||||
license = lib.licenses.bsd3;
|
||||
hydraPlatforms = lib.platforms.none;
|
||||
maintainers = [ lib.maintainers.thielema ];
|
||||
}
|
||||
) { LLVM-21git = null; };
|
||||
|
||||
Reference in New Issue
Block a user