cljstyle: refactor to finalAttrs style

authored by philiptaron.tngl.sh and committed by Benjamin Sparks 85238bcc c6180d04

+14 -20
+14 -20
pkgs/by-name/cl/cljstyle/package.nix
··· 3 buildGraalvmNativeImage, 4 fetchMavenArtifact, 5 fetchurl, 6 - graalvmPackages, 7 versionCheckHook, 8 }: 9 10 - let 11 pname = "cljstyle"; 12 version = "0.17.642"; 13 14 - # must be on classpath to build native image 15 - graal-build-time = fetchMavenArtifact { 16 - repos = [ "https://repo.clojars.org/" ]; 17 - groupId = "com.github.clj-easy"; 18 - artifactId = "graal-build-time"; 19 - version = "1.0.5"; 20 - hash = "sha256-M6/U27a5n/QGuUzGmo8KphVnNa2K+LFajP5coZiFXoY="; 21 - }; 22 - in 23 - buildGraalvmNativeImage { 24 - inherit pname version; 25 - 26 src = fetchurl { 27 - url = "https://github.com/greglook/${pname}/releases/download/${version}/${pname}-${version}.jar"; 28 hash = "sha256-AkCuTZeDXbNBuwPZEMhYGF/oOGIKq5zVDwL8xwnj+mE="; 29 }; 30 31 - graalvmDrv = graalvmPackages.graalvm-ce; 32 - 33 extraNativeImageBuildArgs = [ 34 "-H:+ReportExceptionStackTraces" 35 "--no-fallback" 36 - "-cp ${graal-build-time.passthru.jar}" 37 ]; 38 39 doInstallCheck = true; 40 nativeInstallCheckInputs = [ versionCheckHook ]; 41 versionCheckProgramArg = [ "version" ]; 42 43 meta = { 44 description = "Tool for formatting Clojure code"; 45 homepage = "https://github.com/greglook/cljstyle"; 46 sourceProvenance = with lib.sourceTypes; [ binaryBytecode ]; 47 license = lib.licenses.epl10; 48 - changelog = "https://github.com/greglook/cljstyle/blob/${version}/CHANGELOG.md"; 49 maintainers = with lib.maintainers; [ psyclyx ]; 50 mainProgram = "cljstyle"; 51 }; 52 - }
··· 3 buildGraalvmNativeImage, 4 fetchMavenArtifact, 5 fetchurl, 6 versionCheckHook, 7 }: 8 9 + buildGraalvmNativeImage (finalAttrs: { 10 pname = "cljstyle"; 11 version = "0.17.642"; 12 13 src = fetchurl { 14 + url = "https://github.com/greglook/cljstyle/releases/download/${finalAttrs.version}/cljstyle-${finalAttrs.version}.jar"; 15 hash = "sha256-AkCuTZeDXbNBuwPZEMhYGF/oOGIKq5zVDwL8xwnj+mE="; 16 }; 17 18 extraNativeImageBuildArgs = [ 19 "-H:+ReportExceptionStackTraces" 20 "--no-fallback" 21 + "-cp ${finalAttrs.finalPackage.passthru.graal-build-time.passthru.jar}" 22 ]; 23 24 doInstallCheck = true; 25 nativeInstallCheckInputs = [ versionCheckHook ]; 26 versionCheckProgramArg = [ "version" ]; 27 28 + # must be on classpath to build native image 29 + passthru.graal-build-time = fetchMavenArtifact { 30 + repos = [ "https://repo.clojars.org/" ]; 31 + groupId = "com.github.clj-easy"; 32 + artifactId = "graal-build-time"; 33 + version = "1.0.5"; 34 + hash = "sha256-M6/U27a5n/QGuUzGmo8KphVnNa2K+LFajP5coZiFXoY="; 35 + }; 36 + 37 meta = { 38 description = "Tool for formatting Clojure code"; 39 homepage = "https://github.com/greglook/cljstyle"; 40 sourceProvenance = with lib.sourceTypes; [ binaryBytecode ]; 41 license = lib.licenses.epl10; 42 + changelog = "https://github.com/greglook/cljstyle/blob/${finalAttrs.version}/CHANGELOG.md"; 43 maintainers = with lib.maintainers; [ psyclyx ]; 44 mainProgram = "cljstyle"; 45 }; 46 + })