zoxide: 0.9.6 -> 0.9.7 (#380745)
[NixPkgs.git] / pkgs / by-name / jf / jflap / package.nix
blob90f32b821fa529268376935a1aaf7d5c74eda0fa
2   lib,
3   stdenvNoCC,
4   fetchurl,
5   jre8,
6   makeWrapper,
7   makeDesktopItem,
8   copyDesktopItems,
9 }:
11 stdenvNoCC.mkDerivation rec {
12   pname = "jflap";
13   version = "7.1";
15   src = fetchurl {
16     url = "https://www.jflap.org/jflaptmp/july27-18/JFLAP${version}.jar";
17     sha256 = "oiwJXdxWsYFj6Ovu7xZbOgTLVw8160a5YQUWbgbJlAY=";
18   };
20   nativeBuildInputs = [
21     makeWrapper
22     copyDesktopItems
23   ];
25   buildInputs = [
26     jre8
27   ];
29   dontUnpack = true;
31   desktopItems = [
32     (makeDesktopItem {
33       name = "jflap";
34       desktopName = "jflap";
35       genericName = "Formal language application";
36       exec = "jflap";
37       icon = fetchurl {
38         url = "https://www.jflap.org/jflapLogo2.jpg";
39         sha256 = "sha256-IiworHI+GT6Fm6B0E+FXnKe+hN8nZYPrxHGZFAcsWDw=";
40       };
41       comment = meta.description;
42       categories = [
43         "Development"
44         "Education"
45         "ComputerScience"
46         "DataVisualization"
47         "Engineering"
48         "Java"
49       ];
50     })
51   ];
53   installPhase = ''
54     runHook preInstall
55     mkdir -p $out/share/java
56     cp -s $src $out/share/java/jflap.jar
57     makeWrapper ${jre8}/bin/java $out/bin/jflap \
58       --prefix _JAVA_OPTIONS : "-Dawt.useSystemAAFontSettings=on" \
59       --add-flags "-jar $out/share/java/jflap.jar"
60     runHook postInstall
61   '';
63   meta = with lib; {
64     description = "GUI tool for experimenting with formal languages topics";
65     homepage = "https://www.jflap.org/";
66     license = licenses.unfree;
67     sourceProvenance = with sourceTypes; [ binaryBytecode ];
68     maintainers = with maintainers; [
69       grnnja
70       yuu
71     ];
72     platforms = jre8.meta.platforms;
73   };