Merge pull request #293350 from Rookeur/program-init-olvid

olvid: init at 1.5.0
This commit is contained in:
Pol Dellaiera 2024-03-20 08:14:31 +01:00 committed by GitHub
commit 745f35d79d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 117 additions and 0 deletions

View File

@ -16728,6 +16728,15 @@
githubId = 1312525;
name = "Rongcui Dong";
};
rookeur = {
email = "adrien.langou@hotmail.com";
github = "Rookeur";
githubId = 57438432;
name = "Adrien Langou";
keys = [{
fingerprint = "3B8F FC41 0094 2CB4 5A2A 7DF2 5A44 DA8F 9071 91B0";
}];
};
roosemberth = {
email = "roosembert.palacios+nixpkgs@posteo.ch";
matrix = "@roosemberth:orbstheorem.ch";

View File

@ -0,0 +1,108 @@
{ stdenv
, lib
, fetchurl
, zlib
, libXext
, libX11
, libXrender
, libXtst
, libXi
, freetype
, alsa-lib
, jdk21
, openjfx21
, autoPatchelfHook
, makeBinaryWrapper
, wrapGAppsHook
}:
let
repo = "olvid";
javafxModules = [ "swing" "controls" "media" "fxml" "graphics" "base" ];
classpath =
lib.concatMap (mod: [
"${openjfx21}/modules_src/javafx.${mod}/module-info.java"
"${openjfx21}/modules/javafx.${mod}"
"${openjfx21}/modules_libs/javafx.${mod}"
]) javafxModules ++
[ "$out/share/${repo}/*" ];
jvmArgs = [
"-cp" (lib.concatStringsSep ":" classpath)
"-Djpackage.app-version=$version"
"-Dolvid.sqlcipher=true"
"-Dolvid.dev=false"
"-Dolvid.packaged=true"
"-Dolvid.multiuser=false"
"-Dolvid.debug=false"
"-Dolvid.version=$version"
"-Djava.net.useSystemProxies=true"
"-Djava.library.path=$out/lib/"
"-Xss8M"
"-XX:+ShowCodeDetailsInExceptionMessages"
"--add-opens=java.desktop/java.awt=ALL-UNNAMED"
"--add-opens=java.desktop/java.awt.geom=ALL-UNNAMED"
"--add-opens=java.desktop/sun.awt.geom=ALL-UNNAMED"
"--add-opens=java.base/java.util=ALL-UNNAMED"
"--add-opens=java.desktop/javax.swing=ALL-UNNAMED"
"--add-opens=java.desktop/sun.awt.shell=ALL-UNNAMED"
];
in
stdenv.mkDerivation (finalAttrs: {
pname = "olvid";
version = "1.5.0";
dontUnpack = true;
dontWrapGApps = true;
src = fetchurl {
url = "https://static.olvid.io/linux/${repo}-${finalAttrs.version}.tar.gz";
hash = "sha256-iiMc9mM+uUVeS1i1gzXMZaMwSChdz7vNrL9uqJlR8NU=";
};
nativeBuildInputs = [
autoPatchelfHook
makeBinaryWrapper
wrapGAppsHook
];
buildInputs = [
zlib
libXext
libX11
libXrender
libXtst
libXi
freetype
alsa-lib
];
installPhase = ''
runHook preInstall
install -dm755 "$out/share/${repo}"
tar -xf "$src" -C "$out/share/${repo}" --wildcards --strip-components 3 olvid/lib/app/'*.jar'
install -dm755 "$out/lib"
tar -xf "$src" -C "$out/lib" --strip-components 4 olvid/lib/runtime/lib/
install -dm755 "$out/bin"
makeBinaryWrapper ${jdk21}/bin/java $out/bin/${repo} \
"''${gappsWrapperArgs[@]}" \
--add-flags "${lib.concatStringsSep " " jvmArgs} io.olvid.windows.messenger.start_up.Launcher"
runHook postInstall
'';
meta = with lib; {
description = "The secure french messenger";
homepage = "https://www.olvid.io";
license = licenses.agpl3;
mainProgram = "olvid";
maintainers = with maintainers; [ rookeur ];
platforms = platforms.linux;
};
})