jugglinglab: 1.2.1 -> 1.6.3

This commit is contained in:
Lucas Hoffmann 2022-07-30 07:38:23 +02:00
parent 71c5816834
commit 06e4c8718f

View file

@ -1,12 +1,12 @@
{ lib, stdenv, fetchFromGitHub, jre, makeWrapper, ant, jdk }:
stdenv.mkDerivation rec {
version = "1.2.1";
version = "1.6.3";
pname = "jugglinglab";
src = fetchFromGitHub {
owner = "jkboyce";
repo = "jugglinglab";
rev = "1908012682d8c39a9b92248a20f285455104c510"; # v1.2.1 does not have a tag on Github
sha256 = "0dvcyjwynvapqbjchrln59vdskrm3w6kh0knxcn4bx61vcz3171z";
rev = "v${version}";
sha256 = "sha256-Gq8V7gLl9IakQi7xaK8TCI/B2+6LlLjoLdcv9zlalIE=";
};
buildInputs = [ jre ];
nativeBuildInputs = [ ant jdk makeWrapper ];
@ -15,14 +15,20 @@ stdenv.mkDerivation rec {
installPhase = ''
mkdir -p "$out/bin"
mkdir -p "$out/lib"
cp bin/JugglingLab.jar $out/lib/
cp bin/*.jar $out/lib/
# copied from the upstream shell wrapper
classpath=$out/lib/JugglingLab.jar:$out/lib/commons-math3-3.6.1.jar:$out/lib/protobuf.jar:$out/lib/com.google.ortools.jar
makeWrapper ${jre}/bin/java $out/bin/jugglinglab \
--add-flags "-jar $out/lib/JugglingLab.jar"
--add-flags "-cp $classpath" \
--add-flags "-Xss2048k -Djava.library.path=ortools-lib" \
--add-flags jugglinglab.JugglingLab
'';
meta = with lib; {
description = "A program to visualize different juggling pattens";
homepage = "https://jugglinglab.org/";
license = licenses.gpl2;
maintainers = with maintainers; [ wnklmnn ];
platforms = platforms.all;