nixpkgs/pkgs/applications/networking/mailreaders/msgviewer/default.nix

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

37 lines
1.0 KiB
Nix
Raw Normal View History

{ lib, stdenv, fetchurl, makeWrapper, unzip, jre, runtimeShell }:
2017-08-17 01:48:21 +00:00
stdenv.mkDerivation rec {
2017-08-17 01:48:21 +00:00
version = "1.9";
pname = "msgviewer";
uname = "MSGViewer";
2017-08-17 01:48:21 +00:00
src = fetchurl {
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
mv $dir/${uname}-${version}/* $dir
rmdir $dir/${uname}-${version}
2017-08-17 01:48:21 +00:00
cat <<_EOF > $out/bin/msgviewer
#!${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 ];
meta = with lib; {
2017-08-17 01:48:21 +00:00
description = "Viewer for .msg files (MS Outlook)";
homepage = "https://www.washington.edu/alpine/";
sourceProvenance = with sourceTypes; [ binaryBytecode ];
2017-08-17 01:48:21 +00:00
license = licenses.asl20;
maintainers = with maintainers; [ peterhoeg ];
platforms = platforms.all;
};
}