about summary refs log tree commit diff
path: root/nixpkgs/pkgs/tools/text/html2text/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/tools/text/html2text/default.nix')
-rw-r--r--nixpkgs/pkgs/tools/text/html2text/default.nix33
1 files changed, 33 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/tools/text/html2text/default.nix b/nixpkgs/pkgs/tools/text/html2text/default.nix
new file mode 100644
index 000000000000..fff3e44baf69
--- /dev/null
+++ b/nixpkgs/pkgs/tools/text/html2text/default.nix
@@ -0,0 +1,33 @@
+{ lib, stdenv, fetchurl }:
+
+stdenv.mkDerivation rec {
+  pname = "html2text";
+  version = "1.3.2a";
+
+  src = fetchurl {
+    url = "http://www.mbayer.de/html2text/downloads/html2text-${version}.tar.gz";
+    sha256 = "000b39d5d910b867ff7e087177b470a1e26e2819920dcffd5991c33f6d480392";
+  };
+
+  preConfigure = ''
+    substituteInPlace configure \
+        --replace /bin/echo echo \
+        --replace CXX=unknown ':'
+  '';
+
+  # the --prefix has no effect
+  installPhase = ''
+    mkdir -p $out/bin $out/man/man{1,5}
+    cp html2text $out/bin
+    cp html2text.1.gz $out/man/man1
+    cp html2textrc.5.gz $out/man/man5
+  '';
+
+  meta = {
+    description = "Convert HTML to plain text";
+    homepage = "http://www.mbayer.de/html2text/";
+    license = lib.licenses.gpl2Plus;
+    platforms = lib.platforms.unix;
+    maintainers = [ lib.maintainers.eikek ];
+  };
+}