1{
2 lib,
3 stdenv,
4 fetchurl,
5 m4,
6 perl,
7 texinfo,
8}:
9
10# Note: this package is used for bootstrapping fetchurl, and thus
11# cannot use fetchpatch! All mutable patches (generated by GitHub or
12# cgit) that are needed here should be included directly in Nixpkgs as
13# files.
14
15stdenv.mkDerivation rec {
16 pname = "autoconf";
17 version = "2.72";
18 outputs = [
19 "out"
20 "doc"
21 ];
22
23 src = fetchurl {
24 url = "mirror://gnu/autoconf/autoconf-${version}.tar.xz";
25 hash = "sha256-uohcExlXjWyU1G6bDc60AUyq/iSQ5Deg28o/JwoiP1o=";
26 };
27
28 strictDeps = true;
29 nativeBuildInputs = [
30 m4
31 perl
32 texinfo
33 ];
34 buildInputs = [ m4 ];
35 postBuild = "
36 make html
37 ";
38
39 postInstall = "
40 make install-html
41 ";
42
43 # Work around a known issue in Cygwin. See
44 # http://thread.gmane.org/gmane.comp.sysutils.autoconf.bugs/6822 for
45 # details.
46 # There are many test failures on `i386-pc-solaris2.11'.
47 doCheck = ((!stdenv.hostPlatform.isCygwin) && (!stdenv.hostPlatform.isSunOS));
48
49 # Don't fixup "#! /bin/sh" in Autoconf, otherwise it will use the
50 # "fixed" path in generated files!
51 dontPatchShebangs = true;
52
53 enableParallelBuilding = true;
54
55 # Make the Autotest test suite run in parallel.
56 preCheck = ''
57 export TESTSUITEFLAGS="-j$NIX_BUILD_CORES"
58 '';
59
60 meta = {
61 homepage = "https://www.gnu.org/software/autoconf/";
62 description = "Part of the GNU Build System";
63
64 longDescription = ''
65 GNU Autoconf is an extensible package of M4 macros that produce
66 shell scripts to automatically configure software source code
67 packages. These scripts can adapt the packages to many kinds of
68 UNIX-like systems without manual user intervention. Autoconf
69 creates a configuration script for a package from a template
70 file that lists the operating system features that the package
71 can use, in the form of M4 macro calls.
72 '';
73
74 license = lib.licenses.gpl3Plus;
75
76 platforms = lib.platforms.all;
77 };
78}