diff --git a/pkgs/tools/text/discount/default.nix b/pkgs/tools/text/discount/default.nix new file mode 100644 index 00000000000..7b902202a4c --- /dev/null +++ b/pkgs/tools/text/discount/default.nix @@ -0,0 +1,18 @@ +{stdenv, fetchurl}: +stdenv.mkDerivation rec { + version = "2.1.6"; + name = "discount-${version}"; + + src = fetchurl { + url = "http://www.pell.portland.or.us/~orc/Code/discount/discount-${version}.tar.bz2"; + sha256 = "15h726m5yalq15hkxxfw4bxwd6wkwkan5q7s80pgi1z32ygb4avh"; + }; + patches = ./fix-configure-path.patch; + configureScript = "./configure.sh"; + + meta = with stdenv.lib; { + description = "Implementation of Markdown markup language in C"; + homepage = "http://www.pell.portland.or.us/~orc/Code/discount/"; + license = licenses.bsd3; + }; +} diff --git a/pkgs/tools/text/discount/fix-configure-path.patch b/pkgs/tools/text/discount/fix-configure-path.patch new file mode 100644 index 00000000000..045b369b4b6 --- /dev/null +++ b/pkgs/tools/text/discount/fix-configure-path.patch @@ -0,0 +1,12 @@ +diff -rupN discount-2.1.6-original/configure.inc discount-2.1.6/configure.inc +--- discount-2.1.6-original/configure.inc 2014-10-10 15:34:24.158325345 +0100 ++++ discount-2.1.6/configure.inc 2014-10-10 15:34:33.553325321 +0100 +@@ -32,7 +32,7 @@ + # this preamble code is executed when this file is sourced and it picks + # interesting things off the command line. + # +-ac_default_path="/sbin:/usr/sbin:/bin:/usr/bin:/usr/local/bin:/usr/X11R6/bin" ++ac_default_path=$PATH + + ac_standard="--src=DIR where the source lives (.) + --prefix=DIR where to install the final product (/usr/local) diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 21381e7ac95..9aad7efdf55 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -665,6 +665,8 @@ let direnv = callPackage ../tools/misc/direnv { }; + discount = callPackage ../tools/text/discount { }; + ditaa = callPackage ../tools/graphics/ditaa { }; dlx = callPackage ../misc/emulators/dlx { };