2021-01-15 22:18:51 +00:00
|
|
|
{ lib, stdenv, fetchFromGitHub, jre, makeWrapper, ant, jdk }:
|
2020-05-29 06:06:01 +00:00
|
|
|
stdenv.mkDerivation rec {
|
2022-12-02 08:20:57 +00:00
|
|
|
version = "1.6.3";
|
2021-12-06 16:07:01 +00:00
|
|
|
pname = "jugglinglab";
|
2020-05-29 06:06:01 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "jkboyce";
|
|
|
|
repo = "jugglinglab";
|
2022-12-02 08:20:57 +00:00
|
|
|
rev = "v${version}";
|
|
|
|
sha256 = "sha256-Gq8V7gLl9IakQi7xaK8TCI/B2+6LlLjoLdcv9zlalIE=";
|
2020-05-29 06:06:01 +00:00
|
|
|
};
|
|
|
|
buildInputs = [ jre ];
|
|
|
|
nativeBuildInputs = [ ant jdk makeWrapper ];
|
|
|
|
buildPhase = "ant";
|
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
mkdir -p "$out/bin"
|
|
|
|
mkdir -p "$out/lib"
|
2022-12-02 08:20:57 +00:00
|
|
|
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
|
2020-05-29 06:06:01 +00:00
|
|
|
|
|
|
|
makeWrapper ${jre}/bin/java $out/bin/jugglinglab \
|
2022-12-02 08:20:57 +00:00
|
|
|
--add-flags "-cp $classpath" \
|
|
|
|
--add-flags "-Xss2048k -Djava.library.path=ortools-lib" \
|
|
|
|
--add-flags jugglinglab.JugglingLab
|
2020-05-29 06:06:01 +00:00
|
|
|
'';
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-05-29 06:06:01 +00:00
|
|
|
description = "A program to visualize different juggling pattens";
|
2022-12-02 08:20:57 +00:00
|
|
|
homepage = "https://jugglinglab.org/";
|
2020-05-29 06:06:01 +00:00
|
|
|
license = licenses.gpl2;
|
|
|
|
maintainers = with maintainers; [ wnklmnn ];
|
|
|
|
platforms = platforms.all;
|
2024-01-02 11:29:13 +00:00
|
|
|
mainProgram = "jugglinglab";
|
2020-05-29 06:06:01 +00:00
|
|
|
};
|
2020-11-09 15:59:12 +00:00
|
|
|
}
|