2022-07-14 12:49:19 +00:00
|
|
|
{ stdenv
|
|
|
|
, fetchurl
|
|
|
|
, lib
|
|
|
|
, makeWrapper
|
|
|
|
, unzip
|
|
|
|
, glib
|
|
|
|
, gtk2
|
|
|
|
, gtk3
|
|
|
|
, jre
|
|
|
|
, libXtst
|
2024-01-02 11:29:13 +00:00
|
|
|
, coreutils
|
|
|
|
, gnugrep
|
2022-07-14 12:49:19 +00:00
|
|
|
, zulu
|
|
|
|
, preferGtk3 ? true
|
|
|
|
, preferZulu ? true
|
|
|
|
}:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2022-07-14 12:49:19 +00:00
|
|
|
let
|
2024-06-20 14:57:18 +00:00
|
|
|
rev = 3546;
|
2022-07-14 12:49:19 +00:00
|
|
|
jre' = if preferZulu then zulu else jre;
|
|
|
|
gtk' = if preferGtk3 then gtk3 else gtk2;
|
|
|
|
in
|
2020-04-24 23:36:52 +00:00
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "davmail";
|
2024-06-20 14:57:18 +00:00
|
|
|
version = "6.2.2";
|
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";
|
2024-06-20 14:57:18 +00:00
|
|
|
hash = "sha256-45paGy6SfUFXK6vY8L4tHFYiio1/5ah9vTyGImdgwHI=";
|
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}" \
|
2024-01-02 11:29:13 +00:00
|
|
|
--prefix PATH : ${lib.makeBinPath [ jre' coreutils gnugrep ]} \
|
2022-07-14 12:49:19 +00:00
|
|
|
--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; {
|
2024-06-20 14:57:18 +00:00
|
|
|
description = "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;
|
2023-08-04 22:07:22 +00:00
|
|
|
mainProgram = "davmail";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|