2021-10-04 12:37:57 +00:00
|
|
|
{ lib, stdenv, fetchurl, jdk, runtimeShell }:
|
2021-06-28 23:13:55 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "polylith";
|
2024-07-27 06:49:29 +00:00
|
|
|
version = "0.2.20";
|
2021-06-28 23:13:55 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
url = "https://github.com/polyfy/polylith/releases/download/v${version}/poly-${version}.jar";
|
2024-07-27 06:49:29 +00:00
|
|
|
sha256 = "sha256-c/EFacN8isuxghnxaMn/uqDK1r7w1qn/suV8xbnmvOo=";
|
2021-06-28 23:13:55 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
dontUnpack = true;
|
|
|
|
|
2021-10-04 12:37:57 +00:00
|
|
|
passAsFile = [ "polyWrapper" ];
|
|
|
|
polyWrapper = ''
|
2021-06-28 23:13:55 +00:00
|
|
|
#!${runtimeShell}
|
|
|
|
ARGS=""
|
2021-10-04 12:37:57 +00:00
|
|
|
while [ "$1" != "" ] ; do
|
|
|
|
ARGS="$ARGS $1"
|
2021-06-28 23:13:55 +00:00
|
|
|
shift
|
|
|
|
done
|
2021-10-04 12:37:57 +00:00
|
|
|
exec "${jdk}/bin/java" "-jar" "${src}" $ARGS
|
|
|
|
'';
|
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
runHook preInstall
|
|
|
|
|
|
|
|
mkdir -p $out/bin
|
|
|
|
cp "$polyWrapperPath" $out/bin/poly
|
2021-06-28 23:13:55 +00:00
|
|
|
chmod a+x $out/bin/poly
|
|
|
|
|
|
|
|
runHook postInstall
|
|
|
|
'';
|
|
|
|
|
|
|
|
doInstallCheck = true;
|
|
|
|
installCheckPhase = ''
|
|
|
|
runHook preInstallCheck
|
|
|
|
|
|
|
|
$out/bin/poly help | fgrep -q '${version}'
|
|
|
|
|
|
|
|
runHook postInstallCheck
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with lib; {
|
2024-06-20 14:57:18 +00:00
|
|
|
description = "Tool used to develop Polylith based architectures in Clojure";
|
2024-04-21 15:54:59 +00:00
|
|
|
mainProgram = "poly";
|
2021-06-28 23:13:55 +00:00
|
|
|
homepage = "https://github.com/polyfy/polylith";
|
2022-06-16 17:23:12 +00:00
|
|
|
sourceProvenance = with sourceTypes; [ binaryBytecode ];
|
2021-06-28 23:13:55 +00:00
|
|
|
license = licenses.epl10;
|
2021-10-04 12:37:57 +00:00
|
|
|
maintainers = with maintainers; [ ericdallo jlesquembre ];
|
|
|
|
platforms = jdk.meta.platforms;
|
2021-06-28 23:13:55 +00:00
|
|
|
};
|
|
|
|
}
|