2022-07-14 12:49:19 +00:00
|
|
|
{ stdenv
|
|
|
|
, fetchurl
|
|
|
|
, lib
|
|
|
|
, makeWrapper
|
|
|
|
, unzip
|
|
|
|
, glib
|
|
|
|
, gtk2
|
|
|
|
, gtk3
|
|
|
|
, jre
|
|
|
|
, libXtst
|
|
|
|
, zulu
|
|
|
|
, preferGtk3 ? true
|
|
|
|
, preferZulu ? true
|
|
|
|
}:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2022-07-14 12:49:19 +00:00
|
|
|
let
|
2023-05-24 13:37:59 +00:00
|
|
|
rev = 3423;
|
2022-07-14 12:49:19 +00:00
|
|
|
jre' = if preferZulu then zulu else jre;
|
|
|
|
gtk' = if preferGtk3 then gtk3 else gtk2;
|
|
|
|
|
|
|
|
inherit (lib) makeLibraryPath versions;
|
|
|
|
|
|
|
|
in
|
2020-04-24 23:36:52 +00:00
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "davmail";
|
2023-05-24 13:37:59 +00:00
|
|
|
version = "6.1.0";
|
2022-07-14 12:49:19 +00:00
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
src = fetchurl {
|
2022-07-14 12:49:19 +00:00
|
|
|
url = "mirror://sourceforge/${pname}/${version}/${pname}-${version}-${toString rev}.zip";
|
2023-05-24 13:37:59 +00:00
|
|
|
sha256 = "sha256-/JsJFtGalNuOz21eeCPR/LvLueMtQAR7VSKN8SpnPvA=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2022-07-14 12:49:19 +00:00
|
|
|
postPatch = ''
|
|
|
|
sed -i -e '/^JAVA_OPTS/d' davmail
|
|
|
|
'';
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
sourceRoot = ".";
|
|
|
|
|
|
|
|
nativeBuildInputs = [ makeWrapper unzip ];
|
|
|
|
|
|
|
|
installPhase = ''
|
2021-05-20 23:08:51 +00:00
|
|
|
runHook preInstall
|
2022-07-14 12:49:19 +00:00
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
mkdir -p $out/share/davmail
|
|
|
|
cp -vR ./* $out/share/davmail
|
|
|
|
makeWrapper $out/share/davmail/davmail $out/bin/davmail \
|
2022-07-14 12:49:19 +00:00
|
|
|
--set-default JAVA_OPTS "-Xmx512M -Dsun.net.inetaddr.ttl=60 -Djdk.gtk.version=${lib.versions.major gtk'.version}" \
|
|
|
|
--prefix PATH : ${jre'}/bin \
|
|
|
|
--prefix LD_LIBRARY_PATH : ${lib.makeLibraryPath [ glib gtk' libXtst ]}
|
|
|
|
|
2021-05-20 23:08:51 +00:00
|
|
|
runHook postInstall
|
2020-04-24 23:36:52 +00:00
|
|
|
'';
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "A Java application which presents a Microsoft Exchange server as local CALDAV, IMAP and SMTP servers";
|
2023-02-02 18:25:31 +00:00
|
|
|
homepage = "https://davmail.sourceforge.net/";
|
2021-05-20 23:08:51 +00:00
|
|
|
license = licenses.gpl2Plus;
|
2022-07-14 12:49:19 +00:00
|
|
|
maintainers = with maintainers; [ peterhoeg ];
|
|
|
|
platforms = platforms.all;
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|