nixpkgs/pkgs/development/tools/clj-kondo/default.nix
2024-03-14 04:21:36 +00:00

35 lines
1.0 KiB
Nix

{ lib, buildGraalvmNativeImage, graalvmCEPackages, removeReferencesTo, fetchurl
}:
buildGraalvmNativeImage rec {
pname = "clj-kondo";
version = "2024.03.13";
src = fetchurl {
url =
"https://github.com/clj-kondo/${pname}/releases/download/v${version}/${pname}-${version}-standalone.jar";
sha256 = "sha256-4V0YtGRbSzebxGYkoyCJEA4e1vtYWNbIHyXOlTfvGTU=";
};
graalvmDrv = graalvmCEPackages.graalvm-ce;
nativeBuildInputs = [ removeReferencesTo ];
extraNativeImageBuildArgs =
[ "-H:+ReportExceptionStackTraces" "--no-fallback" ];
postInstall = ''
remove-references-to -t ${graalvmDrv} $out/bin/${pname}
'';
meta = with lib; {
description = "A linter for Clojure code that sparks joy";
homepage = "https://github.com/clj-kondo/clj-kondo";
sourceProvenance = with sourceTypes; [ binaryBytecode ];
license = licenses.epl10;
changelog =
"https://github.com/clj-kondo/clj-kondo/blob/v${version}/CHANGELOG.md";
maintainers = with maintainers; [ jlesquembre bandresen ];
};
}