2021-01-11 07:54:33 +00:00
|
|
|
{ lib, stdenv, fetchurl, makeWrapper, unzip, jre, runtimeShell }:
|
2017-08-17 01:48:21 +00:00
|
|
|
|
2021-07-12 10:51:53 +00:00
|
|
|
stdenv.mkDerivation rec {
|
2017-08-17 01:48:21 +00:00
|
|
|
version = "1.9";
|
2021-07-12 10:51:53 +00:00
|
|
|
pname = "msgviewer";
|
|
|
|
uname = "MSGViewer";
|
2017-08-17 01:48:21 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
2021-07-12 10:51:53 +00:00
|
|
|
url = "mirror://sourceforge/msgviewer/${uname}-${version}/${uname}-${version}.zip";
|
2017-08-17 01:48:21 +00:00
|
|
|
sha256 = "0igmr8c0757xsc94xlv2470zv2mz57zaj52dwr9wj8agmj23jbjz";
|
|
|
|
};
|
|
|
|
|
|
|
|
buildCommand = ''
|
|
|
|
dir=$out/lib/msgviewer
|
|
|
|
mkdir -p $out/bin $dir
|
|
|
|
unzip $src -d $dir
|
2021-07-12 10:51:53 +00:00
|
|
|
mv $dir/${uname}-${version}/* $dir
|
|
|
|
rmdir $dir/${uname}-${version}
|
2017-08-17 01:48:21 +00:00
|
|
|
cat <<_EOF > $out/bin/msgviewer
|
2019-02-26 11:45:54 +00:00
|
|
|
#!${runtimeShell} -eu
|
2021-01-15 05:42:41 +00:00
|
|
|
exec ${lib.getBin jre}/bin/java -jar $dir/MSGViewer.jar "\$@"
|
2017-08-18 12:04:09 +00:00
|
|
|
_EOF
|
2017-08-17 01:48:21 +00:00
|
|
|
chmod 755 $out/bin/msgviewer
|
|
|
|
'';
|
|
|
|
|
|
|
|
nativeBuildInputs = [ makeWrapper unzip ];
|
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2017-08-17 01:48:21 +00:00
|
|
|
description = "Viewer for .msg files (MS Outlook)";
|
2020-04-01 01:11:51 +00:00
|
|
|
homepage = "https://www.washington.edu/alpine/";
|
2022-06-02 13:38:41 +00:00
|
|
|
sourceProvenance = with sourceTypes; [ binaryBytecode ];
|
2017-08-17 01:48:21 +00:00
|
|
|
license = licenses.asl20;
|
|
|
|
maintainers = with maintainers; [ peterhoeg ];
|
|
|
|
platforms = platforms.all;
|
|
|
|
};
|
|
|
|
}
|