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 {
|
stdenv.mkDerivation rec {
|
||||||
pname = "polylith";
|
pname = "polylith";
|
||||||
version = "0.1.0-alpha9";
|
version = "0.2.12-alpha";
|
||||||
|
|
||||||
src = fetchurl {
|
src = fetchurl {
|
||||||
url = "https://github.com/polyfy/polylith/releases/download/v${version}/poly-${version}.jar";
|
url = "https://github.com/polyfy/polylith/releases/download/v${version}/poly-${version}.jar";
|
||||||
sha256 = "0mjn0fibj7z8wihk5frhyd5ai2bmzm909701sphjs7j9lgg0gc4k";
|
sha256 = "1zsasyrrssj7kmvgfr63fa5hslw9gnlbp9bh05g72bfgzi99n8kg";
|
||||||
};
|
};
|
||||||
|
|
||||||
dontUnpack = true;
|
dontUnpack = true;
|
||||||
|
|
||||||
|
passAsFile = [ "polyWrapper" ];
|
||||||
|
polyWrapper = ''
|
||||||
|
#!${runtimeShell}
|
||||||
|
ARGS=""
|
||||||
|
while [ "$1" != "" ] ; do
|
||||||
|
ARGS="$ARGS $1"
|
||||||
|
shift
|
||||||
|
done
|
||||||
|
exec "${jdk}/bin/java" "-jar" "${src}" $ARGS
|
||||||
|
'';
|
||||||
|
|
||||||
installPhase = ''
|
installPhase = ''
|
||||||
runHook preInstall
|
runHook preInstall
|
||||||
|
|
||||||
mkdir -p $out/bin
|
mkdir -p $out/bin
|
||||||
|
cp "$polyWrapperPath" $out/bin/poly
|
||||||
cat > "$out/bin/poly" <<EOF
|
|
||||||
#!${runtimeShell}
|
|
||||||
ARGS=""
|
|
||||||
while [ "\$1" != "" ] ; do
|
|
||||||
ARGS="\$ARGS \$1"
|
|
||||||
shift
|
|
||||||
done
|
|
||||||
exec "${jre}/bin/java" "-jar" "${src}" \$ARGS
|
|
||||||
EOF
|
|
||||||
chmod a+x $out/bin/poly
|
chmod a+x $out/bin/poly
|
||||||
|
|
||||||
runHook postInstall
|
runHook postInstall
|
||||||
|
@ -43,7 +45,7 @@ stdenv.mkDerivation rec {
|
||||||
description = "A tool used to develop Polylith based architectures in Clojure";
|
description = "A tool used to develop Polylith based architectures in Clojure";
|
||||||
homepage = "https://github.com/polyfy/polylith";
|
homepage = "https://github.com/polyfy/polylith";
|
||||||
license = licenses.epl10;
|
license = licenses.epl10;
|
||||||
maintainers = [ maintainers.ericdallo ];
|
maintainers = with maintainers; [ ericdallo jlesquembre ];
|
||||||
platforms = jre.meta.platforms;
|
platforms = jdk.meta.platforms;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue