diff options
Diffstat (limited to 'nixpkgs/pkgs/applications/science/engineering/jflap/default.nix')
-rw-r--r-- | nixpkgs/pkgs/applications/science/engineering/jflap/default.nix | 70 |
1 files changed, 70 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/applications/science/engineering/jflap/default.nix b/nixpkgs/pkgs/applications/science/engineering/jflap/default.nix new file mode 100644 index 000000000000..0559f8922787 --- /dev/null +++ b/nixpkgs/pkgs/applications/science/engineering/jflap/default.nix @@ -0,0 +1,70 @@ +{ lib +, stdenvNoCC +, fetchurl +, jre8 +, makeWrapper +, makeDesktopItem +, copyDesktopItems +}: + +stdenvNoCC.mkDerivation rec { + pname = "jflap"; + version = "7.1"; + + src = fetchurl { + url = "https://www.jflap.org/jflaptmp/july27-18/JFLAP${version}.jar"; + sha256 = "oiwJXdxWsYFj6Ovu7xZbOgTLVw8160a5YQUWbgbJlAY="; + }; + + nativeBuildInputs = [ + makeWrapper + copyDesktopItems + ]; + + buildInputs = [ + jre8 + ]; + + dontUnpack = true; + + desktopItems = [ + (makeDesktopItem { + name = "jflap"; + desktopName = "jflap"; + genericName = "Formal language application"; + exec = "jflap"; + icon = fetchurl { + url = "https://www.jflap.org/jflapLogo2.jpg"; + sha256 = "sha256-IiworHI+GT6Fm6B0E+FXnKe+hN8nZYPrxHGZFAcsWDw="; + }; + comment = meta.description; + categories = [ + "Development" + "Education" + "ComputerScience" + "DataVisualization" + "Engineering" + "Java" + ]; + }) + ]; + + installPhase = '' + runHook preInstall + mkdir -p $out/share/java + cp -s $src $out/share/java/jflap.jar + makeWrapper ${jre8}/bin/java $out/bin/jflap \ + --prefix _JAVA_OPTIONS : "-Dawt.useSystemAAFontSettings=on" \ + --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; + sourceProvenance = with sourceTypes; [ binaryBytecode ]; + maintainers = with maintainers; [ grnnja yuu ]; + platforms = jre8.meta.platforms; + }; +} |