mirror of
https://github.com/NixOS/nixpkgs.git
synced 2026-08-25 17:55:21 +00:00
clj-kondo: fix startup crash with GraalVM >= 25.1
GraalVM 25.1 removed @AutomaticFeature discovery, so the bundled graal-build-time feature stopped running. Register it explicitly; drop when clj-kondo/clj-kondo#2949 ships. Add versionCheckHook so a binary that cannot start fails the build. Assisted-by: Claude Code (claude-fable-5)
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
lib,
|
||||
buildGraalvmNativeImage,
|
||||
fetchurl,
|
||||
versionCheckHook,
|
||||
}:
|
||||
|
||||
buildGraalvmNativeImage (finalAttrs: {
|
||||
@@ -16,8 +17,16 @@ buildGraalvmNativeImage (finalAttrs: {
|
||||
extraNativeImageBuildArgs = [
|
||||
"-H:+ReportExceptionStackTraces"
|
||||
"--no-fallback"
|
||||
# GraalVM >= 25.1 removed @AutomaticFeature discovery, so the bundled
|
||||
# graal-build-time feature no longer runs and the binary crashes at
|
||||
# startup. Register it explicitly. Remove once a release carrying
|
||||
# https://github.com/clj-kondo/clj-kondo/pull/2949 is packaged.
|
||||
"--features=InitAtBuildTimeFeature"
|
||||
];
|
||||
|
||||
doInstallCheck = true;
|
||||
nativeInstallCheckInputs = [ versionCheckHook ];
|
||||
|
||||
meta = {
|
||||
description = "Linter for Clojure code that sparks joy";
|
||||
homepage = "https://github.com/clj-kondo/clj-kondo";
|
||||
|
||||
Reference in New Issue
Block a user