2019-06-16 19:59:06 +00:00
|
|
|
{ stdenv, fetchurl, makeWrapper, perlPackages }:
|
2017-05-02 19:37:10 +00:00
|
|
|
|
|
|
|
let
|
|
|
|
perlDeps = with perlPackages; [ TimeDate ];
|
|
|
|
in
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
version = "3.20";
|
2019-08-15 12:41:18 +00:00
|
|
|
pname = "mb2md";
|
2017-05-02 19:37:10 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
url = "http://batleth.sapienti-sat.org/projects/mb2md/mb2md-${version}.pl.gz";
|
|
|
|
sha256 = "0bvkky3c90738h3skd2f1b2yy5xzhl25cbh9w2dy97rs86ssjidg";
|
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [ makeWrapper ];
|
2018-12-15 03:50:31 +00:00
|
|
|
buildInputs = [ perlPackages.perl ];
|
2017-05-02 19:37:10 +00:00
|
|
|
|
|
|
|
unpackPhase = ''
|
|
|
|
sourceRoot=.
|
|
|
|
gzip -d < $src > mb2md.pl
|
|
|
|
'';
|
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
install -D $sourceRoot/mb2md.pl $out/bin/mb2md
|
|
|
|
'';
|
|
|
|
|
|
|
|
postFixup = ''
|
|
|
|
wrapProgram $out/bin/mb2md \
|
2018-12-15 03:50:31 +00:00
|
|
|
--set PERL5LIB "${perlPackages.makePerlPath perlDeps}"
|
2017-05-02 19:37:10 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
|
|
|
description = "mbox to maildir tool";
|
|
|
|
license = licenses.publicDomain;
|
|
|
|
platforms = platforms.all;
|
|
|
|
maintainers = [ maintainers.jb55 ];
|
|
|
|
};
|
|
|
|
}
|