nixpkgs/pkgs/applications/networking/davmail/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

62 lines
1.4 KiB
Nix
Raw Normal View History

2022-06-28 06:04:30 +00:00
{ stdenv
, fetchurl
, lib
, makeWrapper
, unzip
, glib
, gtk2
, gtk3
, jre
, libXtst
, zulu
, preferGtk3 ? true
, preferZulu ? true
}:
2022-06-28 06:04:30 +00:00
let
rev = 3390;
jre' = if preferZulu then zulu else jre;
gtk' = if preferGtk3 then gtk3 else gtk2;
inherit (lib) makeLibraryPath versions;
in
stdenv.mkDerivation rec {
pname = "davmail";
2022-06-28 06:04:30 +00:00
version = "6.0.1";
src = fetchurl {
2022-06-28 06:04:30 +00:00
url = "mirror://sourceforge/${pname}/${version}/${pname}-${version}-${toString rev}.zip";
sha256 = "1i1z1kdglccg7pyidlfbagdhgs0wqvybl8dwxcpglh2hkvi0dba0";
};
2022-06-28 06:04:30 +00:00
postPatch = ''
sed -i -e '/^JAVA_OPTS/d' davmail
'';
2018-08-24 17:04:37 +00:00
sourceRoot = ".";
nativeBuildInputs = [ makeWrapper unzip ];
installPhase = ''
2021-05-13 20:23:15 +00:00
runHook preInstall
2022-06-28 06:04:30 +00:00
mkdir -p $out/share/davmail
2018-08-24 17:04:37 +00:00
cp -vR ./* $out/share/davmail
makeWrapper $out/share/davmail/davmail $out/bin/davmail \
2022-06-28 06:04:30 +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-13 20:23:15 +00:00
runHook postInstall
'';
meta = with lib; {
description = "A Java application which presents a Microsoft Exchange server as local CALDAV, IMAP and SMTP servers";
2022-06-28 06:04:30 +00:00
homepage = "http://davmail.sourceforge.net/";
2021-05-13 20:23:15 +00:00
license = licenses.gpl2Plus;
2022-06-28 06:04:30 +00:00
maintainers = with maintainers; [ peterhoeg ];
platforms = platforms.all;
};
}