chromium,chromedriver: 129.0.6668.91 -> 129.0.6668.100
[NixPkgs.git] / pkgs / by-name / ol / olvid / package.nix
blob1d8ba41adb3c2269d454b510514d8e53095f100b
1 { stdenv
2 , lib
3 , fetchurl
4 , zlib
5 , libXext
6 , libX11
7 , libXrender
8 , libXtst
9 , libXi
10 , freetype
11 , alsa-lib
12 , jdk21
13 , openjfx21
14 , autoPatchelfHook
15 , makeBinaryWrapper
16 , wrapGAppsHook3
19 let
20   repo = "olvid";
22   javafxModules = [ "swing" "controls" "media" "fxml" "graphics" "base" ];
24   classpath =
25     lib.concatMap (mod: [
26       "${openjfx21}/modules_src/javafx.${mod}/module-info.java"
27       "${openjfx21}/modules/javafx.${mod}"
28       "${openjfx21}/modules_libs/javafx.${mod}"
29     ]) javafxModules ++
30     [ "$out/share/${repo}/*" ];
32   jvmArgs = [
33     "-cp" (lib.concatStringsSep ":" classpath)
34     "-Djpackage.app-version=$version"
35     "-Dolvid.sqlcipher=true"
36     "-Dolvid.dev=false"
37     "-Dolvid.packaged=true"
38     "-Dolvid.multiuser=false"
39     "-Dolvid.debug=false"
40     "-Dolvid.version=$version"
41     "-Djava.net.useSystemProxies=true"
42     "-Djava.library.path=$out/lib/"
43     "-Xss8M"
44     "-XX:+ShowCodeDetailsInExceptionMessages"
45     "--add-opens=java.desktop/java.awt=ALL-UNNAMED"
46     "--add-opens=java.desktop/java.awt.geom=ALL-UNNAMED"
47     "--add-opens=java.desktop/sun.awt.geom=ALL-UNNAMED"
48     "--add-opens=java.base/java.util=ALL-UNNAMED"
49     "--add-opens=java.desktop/javax.swing=ALL-UNNAMED"
50     "--add-opens=java.desktop/sun.awt.shell=ALL-UNNAMED"
51   ];
54 stdenv.mkDerivation (finalAttrs: {
55   pname = "olvid";
56   version = "1.6.2";
58   dontUnpack = true;
59   dontWrapGApps = true;
61   src = fetchurl {
62     url = "https://static.olvid.io/linux/${repo}-${finalAttrs.version}.tar.gz";
63     hash = "sha256-Cej8ei+Dh6yn7ZRZ1DE9ay/KWWLLALhaQ5gNpBw8vDs=";
64   };
66   nativeBuildInputs = [
67     autoPatchelfHook
68     makeBinaryWrapper
69     wrapGAppsHook3
70   ];
72   buildInputs = [
73     zlib
74     libXext
75     libX11
76     libXrender
77     libXtst
78     libXi
79     freetype
80     alsa-lib
81   ];
83   installPhase = ''
84     runHook preInstall
86     install -dm755 "$out/share/${repo}"
87     tar -xf "$src" -C "$out/share/${repo}" --wildcards --strip-components 3 olvid/lib/app/'*.jar'
89     install -dm755 "$out/lib"
90     tar -xf "$src" -C "$out/lib" --strip-components 4 olvid/lib/runtime/lib/
92     install -dm755 "$out/bin"
93     makeBinaryWrapper ${jdk21}/bin/java $out/bin/${repo} \
94       "''${gappsWrapperArgs[@]}" \
95       --add-flags "${lib.concatStringsSep " " jvmArgs} io.olvid.windows.messenger.start_up.Launcher"
97     runHook postInstall
98   '';
100   meta = with lib; {
101     description = "Secure french messenger";
102     homepage = "https://www.olvid.io";
103     license = licenses.agpl3Only;
104     mainProgram = "olvid";
105     maintainers = with maintainers; [ rookeur ];
106     platforms = platforms.linux;
107   };