From b6c7526d3a950a206868fc611730ff3f4e498b71 Mon Sep 17 00:00:00 2001 From: grnnja Date: Mon, 28 Feb 2022 17:07:39 -0800 Subject: [PATCH] jflap: init at 7.1 --- .../science/programming/jflap/default.nix | 32 +++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 ++ 2 files changed, 34 insertions(+) create mode 100644 pkgs/applications/science/programming/jflap/default.nix diff --git a/pkgs/applications/science/programming/jflap/default.nix b/pkgs/applications/science/programming/jflap/default.nix new file mode 100644 index 000000000000..9a7922ba1205 --- /dev/null +++ b/pkgs/applications/science/programming/jflap/default.nix @@ -0,0 +1,32 @@ +{ lib, stdenv, fetchurl, jre, makeWrapper }: + +stdenv.mkDerivation rec { + pname = "jflap"; + version = "7.1"; + + src = fetchurl { + url = "https://www.jflap.org/jflaptmp/july27-18/JFLAP7.1.jar"; + sha256 = "oiwJXdxWsYFj6Ovu7xZbOgTLVw8160a5YQUWbgbJlAY="; + }; + + nativeBuildInputs = [ makeWrapper ]; + + dontUnpack = true; + dontBuild = true; + + installPhase = '' + runHook preInstall + mkdir -p $out/share/java + cp -s $src $out/share/java/jflap.jar + makeWrapper ${jre}/bin/java $out/bin/jflap --add-flags "-jar $out/share/java/jflap.jar" + runHook postInstall + ''; + + meta = with lib; { + description = "GUI tool for experimenting with formal languages topics"; + homepage = "https://www.jflap.org/"; + license = licenses.unfree; + maintainers = [ maintainers.grnnja ]; + platforms = platforms.all; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index a29312d19b3d..3fa45b4530a8 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -32324,6 +32324,8 @@ with pkgs; groove = callPackage ../applications/science/programming/groove { }; + jflap = callPackage ../applications/science/programming/jflap { }; + plm = callPackage ../applications/science/programming/plm { }; ### SCIENCE/LOGIC