From 8d03054f77a3fdee0803041df550e3bd3cdc0789 Mon Sep 17 00:00:00 2001 From: William Casarin Date: Tue, 2 May 2017 12:37:10 -0700 Subject: [PATCH] mb2md: init at 3.20 --- pkgs/tools/text/mb2md/default.nix | 38 +++++++++++++++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 ++ 2 files changed, 40 insertions(+) create mode 100644 pkgs/tools/text/mb2md/default.nix diff --git a/pkgs/tools/text/mb2md/default.nix b/pkgs/tools/text/mb2md/default.nix new file mode 100644 index 000000000000..a920cbf39482 --- /dev/null +++ b/pkgs/tools/text/mb2md/default.nix @@ -0,0 +1,38 @@ +{ stdenv, lib, fetchurl, perl, makeWrapper, perlPackages }: + +let + perlDeps = with perlPackages; [ TimeDate ]; +in +stdenv.mkDerivation rec { + version = "3.20"; + name = "mb2md-${version}"; + + src = fetchurl { + url = "http://batleth.sapienti-sat.org/projects/mb2md/mb2md-${version}.pl.gz"; + sha256 = "0bvkky3c90738h3skd2f1b2yy5xzhl25cbh9w2dy97rs86ssjidg"; + }; + + nativeBuildInputs = [ makeWrapper ]; + buildInputs = [ perl ]; + + unpackPhase = '' + sourceRoot=. + gzip -d < $src > mb2md.pl + ''; + + installPhase = '' + install -D $sourceRoot/mb2md.pl $out/bin/mb2md + ''; + + postFixup = '' + wrapProgram $out/bin/mb2md \ + --set PERL5LIB "${lib.makePerlPath perlDeps}" + ''; + + meta = with stdenv.lib; { + description = "mbox to maildir tool"; + license = licenses.publicDomain; + platforms = platforms.all; + maintainers = [ maintainers.jb55 ]; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 531a238c20fa..a9f55ce5da6a 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -2919,6 +2919,8 @@ with pkgs; mawk = callPackage ../tools/text/mawk { }; + mb2md = callPackage ../tools/text/mb2md { }; + mbox = callPackage ../tools/security/mbox { }; mbuffer = callPackage ../tools/misc/mbuffer { };