at 23.11-beta 1.2 kB view raw
1{ lib, stdenv, fetchurl, jdk, runtimeShell }: 2 3stdenv.mkDerivation rec { 4 pname = "polylith"; 5 version = "0.2.15-alpha"; 6 7 src = fetchurl { 8 url = "https://github.com/polyfy/polylith/releases/download/v${version}/poly-${version}.jar"; 9 sha256 = "sha256-RAFxOwQykERpW+KEjTQDJN+XRv3JudREyBOk99A/qV8="; 10 }; 11 12 dontUnpack = true; 13 14 passAsFile = [ "polyWrapper" ]; 15 polyWrapper = '' 16 #!${runtimeShell} 17 ARGS="" 18 while [ "$1" != "" ] ; do 19 ARGS="$ARGS $1" 20 shift 21 done 22 exec "${jdk}/bin/java" "-jar" "${src}" $ARGS 23 ''; 24 25 installPhase = '' 26 runHook preInstall 27 28 mkdir -p $out/bin 29 cp "$polyWrapperPath" $out/bin/poly 30 chmod a+x $out/bin/poly 31 32 runHook postInstall 33 ''; 34 35 doInstallCheck = true; 36 installCheckPhase = '' 37 runHook preInstallCheck 38 39 $out/bin/poly help | fgrep -q '${version}' 40 41 runHook postInstallCheck 42 ''; 43 44 meta = with lib; { 45 description = "A tool used to develop Polylith based architectures in Clojure"; 46 homepage = "https://github.com/polyfy/polylith"; 47 sourceProvenance = with sourceTypes; [ binaryBytecode ]; 48 license = licenses.epl10; 49 maintainers = with maintainers; [ ericdallo jlesquembre ]; 50 platforms = jdk.meta.platforms; 51 }; 52}