From bc73cd0f7e6451d2e9893517d89d9325a8e0c163 Mon Sep 17 00:00:00 2001 From: Michael Raskin <7c6f434c@mail.ru> Date: Mon, 18 Oct 2010 09:43:17 +0000 Subject: [PATCH] Add ripmime - MIME attachment extractor tool svn path=/nixpkgs/trunk/; revision=24337 --- pkgs/tools/networking/ripmime/default.nix | 51 +++++++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 + 2 files changed, 53 insertions(+) create mode 100644 pkgs/tools/networking/ripmime/default.nix diff --git a/pkgs/tools/networking/ripmime/default.nix b/pkgs/tools/networking/ripmime/default.nix new file mode 100644 index 000000000000..895b2c4be4fd --- /dev/null +++ b/pkgs/tools/networking/ripmime/default.nix @@ -0,0 +1,51 @@ +x@{builderDefsPackage + + , ...}: +builderDefsPackage +(a : +let + helperArgNames = ["stdenv" "fetchurl" "builderDefsPackage"] ++ + []; + + buildInputs = map (n: builtins.getAttr n x) + (builtins.attrNames (builtins.removeAttrs x helperArgNames)); + sourceInfo = rec { + baseName="ripmime"; + version="1.4.0.9"; + name="${baseName}-${version}"; + url="http://www.pldaniels.com/${baseName}/${name}.tar.gz"; + hash="15c48n8n8qavdigw5qycnwp6gys9dv3mgk18ylf5hd4491nnnrhz"; + }; +in +rec { + src = a.fetchurl { + url = sourceInfo.url; + sha256 = sourceInfo.hash; + }; + + inherit (sourceInfo) name version; + inherit buildInputs; + + /* doConfigure should be removed if not needed */ + phaseNames = ["fixTarget" "doMakeInstall"]; + fixTarget = a.fullDepEntry ('' + sed -i Makefile -e "s@LOCATION=.*@LOCATION=$out@" + ensureDir "$out/bin" "$out/man/man1" + '') ["doUnpack" "minInit" "defEnsureDir"]; + + meta = { + description = "Attachment extractor for MIME messages"; + maintainers = with a.lib.maintainers; + [ + raskin + ]; + platforms = with a.lib.platforms; + linux; + }; + passthru = { + updateInfo = { + downloadPage = "http://www.pldaniels.com/ripmime/"; + }; + }; +}) x + diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 75697e98436c..2b7229592037 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -1096,6 +1096,8 @@ let python=python; }; */ + ripmime = callPackage ../tools/networking/ripmime {}; + rsnapshot = callPackage ../tools/backup/rsnapshot { # For the `logger' command, we can use either `utillinux' or