polylith: 0.1.0-alpha9 -> 0.2.12-alpha
Use jdk instead of jre (jre is an alias for jdk since java9) Split installPhase to make it more readable
This commit is contained in:
parent
8a2ec31e22
commit
063fde8848
1 changed files with 17 additions and 15 deletions
|
@ -1,30 +1,32 @@
|
|||
{ lib, stdenv, fetchurl, jre, runtimeShell }:
|
||||
{ lib, stdenv, fetchurl, jdk, runtimeShell }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "polylith";
|
||||
version = "0.1.0-alpha9";
|
||||
version = "0.2.12-alpha";
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://github.com/polyfy/polylith/releases/download/v${version}/poly-${version}.jar";
|
||||
sha256 = "0mjn0fibj7z8wihk5frhyd5ai2bmzm909701sphjs7j9lgg0gc4k";
|
||||
sha256 = "1zsasyrrssj7kmvgfr63fa5hslw9gnlbp9bh05g72bfgzi99n8kg";
|
||||
};
|
||||
|
||||
dontUnpack = true;
|
||||
|
||||
passAsFile = [ "polyWrapper" ];
|
||||
polyWrapper = ''
|
||||
#!${runtimeShell}
|
||||
ARGS=""
|
||||
while [ "$1" != "" ] ; do
|
||||
ARGS="$ARGS $1"
|
||||
shift
|
||||
done
|
||||
exec "${jdk}/bin/java" "-jar" "${src}" $ARGS
|
||||
'';
|
||||
|
||||
installPhase = ''
|
||||
runHook preInstall
|
||||
|
||||
mkdir -p $out/bin
|
||||
|
||||
cat > "$out/bin/poly" <<EOF
|
||||
#!${runtimeShell}
|
||||
ARGS=""
|
||||
while [ "\$1" != "" ] ; do
|
||||
ARGS="\$ARGS \$1"
|
||||
shift
|
||||
done
|
||||
exec "${jre}/bin/java" "-jar" "${src}" \$ARGS
|
||||
EOF
|
||||
cp "$polyWrapperPath" $out/bin/poly
|
||||
chmod a+x $out/bin/poly
|
||||
|
||||
runHook postInstall
|
||||
|
@ -43,7 +45,7 @@ stdenv.mkDerivation rec {
|
|||
description = "A tool used to develop Polylith based architectures in Clojure";
|
||||
homepage = "https://github.com/polyfy/polylith";
|
||||
license = licenses.epl10;
|
||||
maintainers = [ maintainers.ericdallo ];
|
||||
platforms = jre.meta.platforms;
|
||||
maintainers = with maintainers; [ ericdallo jlesquembre ];
|
||||
platforms = jdk.meta.platforms;
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue