ripasso-cursive: cosmetic changes (#361736)
[NixPkgs.git] / pkgs / by-name / po / polyglot / package.nix
bloba6105e3ac8dc53f572d969afbd5142a761ef7c8f
2   lib,
3   fetchFromGitHub,
4   jre,
5   makeWrapper,
6   maven,
7   libGL,
8   xdg-utils,
9   zip,
10   zlib,
12 maven.buildMavenPackage rec {
13   pname = "polyglot";
14   version = "3.5.1";
16   src = fetchFromGitHub {
17     owner = "DraqueT";
18     repo = "PolyGlot";
19     rev = version;
20     hash = "sha256-E7wLhohOpWGzXe1zEO9a8aFIVT7/34Wr0dsRzpuf+eY=";
21   };
23   preBuild = ''
24     echo "${version}" > assets/assets/org/DarisaDesigns/version
25     cd docs
26     zip -r ../assets/assets/org/DarisaDesigns/readme *
27     cd ../packaging_files/example_lexicons
28     zip -r ../../assets/assets/org/DarisaDesigns/exlex *
29     cd ../..
30   '';
32   mvnHash = "sha256-T7es44oNI9EXnpJd/DvYTb4LaJvR3rIdlhD4s/+Bfks=";
33   mvnParameters = "-DskipTests";
35   nativeBuildInputs = [
36     makeWrapper
37     zip
38   ];
39   runtimeDeps = [
40     xdg-utils
41     zlib
42   ];
43   installPhase = ''
44     runHook preInstall
46     mkdir -p $out/bin $out/share/PolyGlotLinA
47     install -Dm644 --target-directory=$out/share/PolyGlotLinA target/PolyGlotLinA-${version}-jar-with-dependencies.jar
49     makeWrapper ${jre}/bin/java $out/bin/PolyGlot \
50       --add-flags "-Djpackage.app-version=${version}" \
51       --add-flags "-jar $out/share/PolyGlotLinA/PolyGlotLinA-${version}-jar-with-dependencies.jar" \
52       --prefix LD_LIBRARY_PATH : "${lib.makeLibraryPath [ libGL ]}"
54     runHook postInstall
55   '';
57   meta = {
58     description = "Conlang construction toolkit";
59     homepage = "https://draquet.github.io/PolyGlot/readme.html";
60     changelog = "https://github.com/DraqueT/PolyGlot/releases/tag/${version}";
61     license = lib.licenses.mit;
62     maintainers = with lib.maintainers; [ noodlez1232 ];
63     platforms = lib.platforms.linux;
64     mainProgram = "PolyGlot";
65   };