From 7a1735a70503c03f9e71e1f3be54bcd7dda16d3d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= Date: Tue, 1 Jul 2008 19:50:34 +0000 Subject: [PATCH] Add GNU M4 1.4.11, with test suite and all. Can't replace 1.4.9 right now since it's part of stdenv. svn path=/nixpkgs/trunk/; revision=12238 --- pkgs/development/tools/misc/gnum4/1.4.11.nix | 42 +++++++++++++++++++ .../tools/misc/gnum4/SIGPIPE.patch | 15 +++++++ pkgs/top-level/all-packages.nix | 4 ++ 3 files changed, 61 insertions(+) create mode 100644 pkgs/development/tools/misc/gnum4/1.4.11.nix create mode 100644 pkgs/development/tools/misc/gnum4/SIGPIPE.patch diff --git a/pkgs/development/tools/misc/gnum4/1.4.11.nix b/pkgs/development/tools/misc/gnum4/1.4.11.nix new file mode 100644 index 000000000000..bafa7f11a447 --- /dev/null +++ b/pkgs/development/tools/misc/gnum4/1.4.11.nix @@ -0,0 +1,42 @@ +{stdenv, fetchurl}: + +stdenv.mkDerivation rec { + name = "m4-1.4.11"; + src = fetchurl { + url = "mirror://gnu/m4/${name}.tar.bz2"; + sha256 = "1bcakymxddxykg5vbll3d9xq17m5sa3r6cprf1k27x5k4mjnhz0b"; + }; + + patches = [ ./SIGPIPE.patch ]; + + # XXX: Work around Gnulib bug. See: + # http://thread.gmane.org/gmane.comp.gnu.m4.bugs/2478 . + configureFlags="gl_cv_func_strtod_works=no"; + + doCheck = true; + + meta = { + homepage = http://www.gnu.org/software/m4/; + description = "GNU M4, a macro processor"; + + longDescription = '' + GNU M4 is an implementation of the traditional Unix macro + processor. It is mostly SVR4 compatible although it has some + extensions (for example, handling more than 9 positional + parameters to macros). GNU M4 also has built-in functions for + including files, running shell commands, doing arithmetic, etc. + + GNU M4 is a macro processor in the sense that it copies its + input to the output expanding macros as it goes. Macros are + either builtin or user-defined and can take any number of + arguments. Besides just doing macro expansion, m4 has builtin + functions for including named files, running UNIX commands, + doing integer arithmetic, manipulating text in various ways, + recursion etc... m4 can be used either as a front-end to a + compiler or as a macro processor in its own right. + ''; + + license = "GPLv3+"; + }; + +} diff --git a/pkgs/development/tools/misc/gnum4/SIGPIPE.patch b/pkgs/development/tools/misc/gnum4/SIGPIPE.patch new file mode 100644 index 000000000000..cd7d8910bc32 --- /dev/null +++ b/pkgs/development/tools/misc/gnum4/SIGPIPE.patch @@ -0,0 +1,15 @@ +Make the `126.diversions' test work when run in the Nix daemon. +See http://thread.gmane.org/gmane.comp.gnu.m4.bugs/2552/focus=2555 for details. + +index 02e0f6d..3cd6951 100644 +--- a/doc/m4.texinfo ++++ b/doc/m4.texinfo +@@ -4714,7 +4714,7 @@ ifdef(`__unix__', , + ')m4exit(`77')')dnl + changequote(`[', `]')dnl + syscmd([echo 'divert(1)hi +-format(%1000000d, 1)' | m4 | sed 1q])dnl ++format(%1000000d, 1)' | ]__program__[ | sed -n 1p])dnl + @result{}hi + sysval + @result{}0 diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index b56e9df03775..6337c7c988ab 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -2084,6 +2084,10 @@ let pkgs = rec { inherit fetchurl stdenv; }; + gnum4_1411 = import ../development/tools/misc/gnum4/1.4.11.nix { + inherit fetchurl stdenv; + }; + gnumake = useFromStdenv "gnumake" (import ../development/tools/build-managers/gnumake { inherit fetchurl stdenv;