Unverified Commit ed44dddf authored by Mario Rodas's avatar Mario Rodas Committed by GitHub
Browse files

Merge pull request #196457 from lucc/jugglinglab

jugglinglab: 1.2.1 -> 1.6.3
parents 7cccd8bb 06e4c871
Loading
Loading
Loading
Loading
+11 −5
Original line number Diff line number Diff line
{ 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;