nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix
at python-updates 62 lines 1.3 kB view raw
1{ 2 lib, 3 stdenv, 4 fetchurl, 5 jdk, 6 runtimeShell, 7}: 8 9stdenv.mkDerivation rec { 10 pname = "polylith"; 11 version = "0.3.32"; 12 13 src = fetchurl { 14 url = "https://github.com/polyfy/polylith/releases/download/v${version}/poly-${version}.jar"; 15 sha256 = "sha256-bfF7YXGA6StGF1jZor/TZQ6tNU28Z8kcaiPdkmjljx4="; 16 }; 17 18 dontUnpack = true; 19 20 passAsFile = [ "polyWrapper" ]; 21 polyWrapper = '' 22 #!${runtimeShell} 23 ARGS="" 24 while [ "$1" != "" ] ; do 25 ARGS="$ARGS $1" 26 shift 27 done 28 exec "${jdk}/bin/java" "-jar" "${src}" $ARGS 29 ''; 30 31 installPhase = '' 32 runHook preInstall 33 34 mkdir -p $out/bin 35 cp "$polyWrapperPath" $out/bin/poly 36 chmod a+x $out/bin/poly 37 38 runHook postInstall 39 ''; 40 41 doInstallCheck = true; 42 installCheckPhase = '' 43 runHook preInstallCheck 44 45 $out/bin/poly help | fgrep -q '${version}' 46 47 runHook postInstallCheck 48 ''; 49 50 meta = { 51 description = "Tool used to develop Polylith based architectures in Clojure"; 52 mainProgram = "poly"; 53 homepage = "https://github.com/polyfy/polylith"; 54 sourceProvenance = with lib.sourceTypes; [ binaryBytecode ]; 55 license = lib.licenses.epl10; 56 maintainers = with lib.maintainers; [ 57 ericdallo 58 jlesquembre 59 ]; 60 platforms = jdk.meta.platforms; 61 }; 62}