* The stdenv setup script now defines a generic builder that allows

builders for typical Autoconf-style to be much shorten, e.g.,

    . $stdenv/setup
    genericBuild

  The generic builder does lots of stuff automatically:

  - Unpacks source archives specified by $src or $srcs (it knows about
    gzip, bzip2, tar, zip, and unpacked source trees).
  - Determines the source tree.
  - Applies patches specified by $patches.
  - Fixes libtool not to search for libraries in /lib etc.
  - Runs `configure'.
  - Runs `make'.
  - Runs `make install'.
  - Strips debug information from static libraries.
  - Writes nested log information (in the format accepted by
    `log2xml').

  There are also lots of hooks and variables to customise the generic
  builder.  See `stdenv/generic/docs.txt'.

* Adapted the base packages (i.e., the ones used by stdenv) to use the
  generic builder.

* We now use `curl' instead of `wget' to download files in `fetchurl'.

* Neither `curl' nor `wget' are part of stdenv.  We shouldn't
  encourage people to download stuff in builders (impure!).

* Updated some packages.

* `buildinputs' is now `buildInputs' (but the old name also works).

* `findInputs' in the setup script now prevents inputs from being
  processed multiple times (which could happen, e.g., if an input was
  a propagated input of several other inputs; this caused the size
  variables like $PATH to blow up exponentially in the worst case).

* Patched GNU Make to write nested log information in the format
  accepted by `log2xml'.  Also, prior to writing the build command,
  Make now writes a line `building X' to indicate what is being
  built.  This is unfortunately often obscured by the gigantic tool
  invocations in many Makefiles.  The actual build commands are marked
  `unimportant' so that they don't clutter pages generated by
  `log2html'.


svn path=/nixpkgs/trunk/; revision=845
This commit is contained in:
Eelco Dolstra
2004-03-19 16:53:04 +00:00
parent 0fd59fd7a4
commit 5941f66f0e
59 changed files with 891 additions and 376 deletions
+3 -9
View File
@@ -1,9 +1,3 @@
#! /bin/sh
. $stdenv/setup || exit 1
tar xvfz $src || exit 1
cd tar-* || exit 1
./configure --prefix=$out || exit 1
make || exit 1
make install || exit 1
#! /bin/sh -e
. $stdenv/setup
genericBuild
+4 -2
View File
@@ -1,4 +1,6 @@
{stdenv, fetchurl}: derivation {
{stdenv, fetchurl}:
derivation {
name = "gnutar-1.13.25";
system = stdenv.system;
builder = ./builder.sh;
@@ -6,5 +8,5 @@
url = ftp://alpha.gnu.org/gnu/tar/tar-1.13.25.tar.gz;
md5 = "6ef8c906e81eee441f8335652670ac4a";
};
stdenv = stdenv;
inherit stdenv;
}
+14 -6
View File
@@ -1,8 +1,16 @@
#! /bin/sh
#! /bin/sh -e
. $stdenv/setup || exit 1
. $stdenv/setup
tar xvfz $src || exit 1
cd unzip-* || exit 1
make -f unix/Makefile generic || exit 1
make -f unix/Makefile prefix=$out install || exit 1
builder() {
make -f unix/Makefile generic
}
installer() {
make -f unix/Makefile prefix=$out install
}
buildPhase=builder
installPhase=installer
genericBuild
+4 -2
View File
@@ -1,4 +1,6 @@
{stdenv, fetchurl}: derivation {
{stdenv, fetchurl}:
derivation {
name = "unzip-5.50";
system = stdenv.system;
builder = ./builder.sh;
@@ -6,5 +8,5 @@
url = ftp://ftp.info-zip.org/pub/infozip/src/unzip550.tar.gz;
md5 = "798592d62e37f92571184236947122ed";
};
stdenv = stdenv;
inherit stdenv;
}
+4 -8
View File
@@ -1,8 +1,4 @@
#! /bin/sh
. $stdenv/setup || exit 1
tar xvfz $src || exit 1
cd bzip2-* || exit 1
make || exit 1
make install PREFIX=$out || exit 1
#! /bin/sh -e
. $stdenv/setup
installFlags="PREFIX=$out"
genericBuild
+4 -2
View File
@@ -1,4 +1,6 @@
{stdenv, fetchurl}: derivation {
{stdenv, fetchurl}:
derivation {
name = "bzip2-1.0.2";
system = stdenv.system;
builder = ./builder.sh;
@@ -6,5 +8,5 @@
url = ftp://sources.redhat.com/pub/bzip2/v102/bzip2-1.0.2.tar.gz;
md5 = "ee76864958d568677f03db8afad92beb";
};
stdenv = stdenv;
inherit stdenv;
}
+3 -9
View File
@@ -1,9 +1,3 @@
#! /bin/sh
. $stdenv/setup || exit 1
tar xvfz $src || exit 1
cd gzip-* || exit 1
./configure --prefix=$out || exit 1
make || exit 1
make install || exit 1
#! /bin/sh -e
. $stdenv/setup
genericBuild
+4 -2
View File
@@ -1,4 +1,6 @@
{stdenv, fetchurl}: derivation {
{stdenv, fetchurl}:
derivation {
name = "gzip-1.3.3";
system = stdenv.system;
builder = ./builder.sh;
@@ -6,5 +8,5 @@
url = http://www.gzip.org/gzip-1.3.3.tar.gz;
md5 = "52eaf713673507d21f7abefee98ba662";
};
stdenv = stdenv;
inherit stdenv;
}
+7 -7
View File
@@ -1,10 +1,10 @@
#! /bin/sh
#! /bin/sh -e
buildinputs="$x11 $libpng $libjpeg $expat $freetype"
. $stdenv/setup || exit 1
. $stdenv/setup
tar xvfz $src || exit 1
cd graphviz-* || exit 1
./configure --prefix=$out || exit 1
make || exit 1
make install || exit 1
if test -z "$x11"; then
configureFlags="$configureFlags --without-x"
fi
genericBuild
+3 -9
View File
@@ -1,9 +1,3 @@
#! /bin/sh
. $stdenv/setup || exit 1
tar xvfj $src || exit 1
cd coreutils-* || exit 1
./configure --prefix=$out || exit 1
make || exit 1
make install || exit 1
#! /bin/sh -e
. $stdenv/setup
genericBuild
+4 -2
View File
@@ -1,4 +1,6 @@
{stdenv, fetchurl}: derivation {
{stdenv, fetchurl}:
derivation {
name = "coreutils-5.0";
system = stdenv.system;
builder = ./builder.sh;
@@ -6,5 +8,5 @@
url = ftp://ftp.nluug.nl/pub/gnu/coreutils/coreutils-5.0.tar.bz2;
md5 = "94e5558ee2a65723d4840bfde2d323f0";
};
stdenv = stdenv;
inherit stdenv;
}
+3 -9
View File
@@ -1,9 +1,3 @@
#! /bin/sh
. $stdenv/setup || exit 1
tar xvfz $src || exit 1
cd findutils-* || exit 1
./configure --prefix=$out || exit 1
make || exit 1
make install || exit 1
#! /bin/sh -e
. $stdenv/setup
genericBuild
+4 -2
View File
@@ -1,4 +1,6 @@
{stdenv, fetchurl}: derivation {
{stdenv, fetchurl}:
derivation {
name = "findutils-4.1.20";
system = stdenv.system;
builder = ./builder.sh;
@@ -6,5 +8,5 @@
url = ftp://alpha.gnu.org/pub/gnu/findutils/findutils-4.1.20.tar.gz;
md5 = "e90ce7222daadeb8616b8db461e17cbc";
};
stdenv = stdenv;
inherit stdenv;
}
+4
View File
@@ -0,0 +1,4 @@
#! /bin/sh -e
. $stdenv/setup
configureFlags="--without-ssl"
genericBuild
+13
View File
@@ -0,0 +1,13 @@
{stdenv, fetchurl, zlib}:
derivation {
name = "curl-7.11.1";
system = stdenv.system;
builder = ./builder.sh;
src = fetchurl {
url = http://curl.haxx.se/download/curl-7.11.1.tar.bz2;
md5 = "c2af7c3364a1a8839516f74961b6bd11";
};
buildInputs = [zlib];
inherit stdenv;
}
+3 -9
View File
@@ -1,9 +1,3 @@
#! /bin/sh
. $stdenv/setup || exit 1
tar xvfz $src || exit 1
cd wget-* || exit 1
./configure --prefix=$out || exit 1
make || exit 1
make install || exit 1
#! /bin/sh -e
. $stdenv/setup
genericBuild
+7 -5
View File
@@ -1,10 +1,12 @@
{stdenv, fetchurl}: derivation {
name = "wget-1.9";
{stdenv, fetchurl}:
derivation {
name = "wget-1.9.1";
system = stdenv.system;
builder = ./builder.sh;
src = fetchurl {
url = ftp://ftp.nluug.nl/pub/gnu/wget/wget-1.9.tar.gz;
md5 = "18ac093db70801b210152dd69b4ef08a";
url = ftp://ftp.nl.net/pub/gnu/wget/wget-1.9.1.tar.gz;
md5 = "e6051f1e1487ec0ebfdbda72bedc70ad";
};
stdenv = stdenv;
inherit stdenv;
}
+2 -8
View File
@@ -1,9 +1,3 @@
#! /bin/sh
. $stdenv/setup || exit 1
tar xvfz $src || exit 1
cd diffutils-* || exit 1
./configure --prefix=$out || exit 1
make || exit 1
make install || exit 1
. $stdenv/setup
genericBuild
+4 -2
View File
@@ -1,4 +1,6 @@
{stdenv, fetchurl}: derivation {
{stdenv, fetchurl}:
derivation {
name = "diffutils-2.8.1";
system = stdenv.system;
builder = ./builder.sh;
@@ -6,5 +8,5 @@
url = ftp://ftp.nluug.nl/pub/gnu/diffutils/diffutils-2.8.1.tar.gz;
md5 = "71f9c5ae19b60608f6c7f162da86a428";
};
stdenv = stdenv;
inherit stdenv;
}
+3 -9
View File
@@ -1,9 +1,3 @@
#! /bin/sh
. $stdenv/setup || exit 1
tar xvfj $src || exit 1
cd gawk-* || exit 1
./configure --prefix=$out || exit 1
make || exit 1
make install || exit 1
#! /bin/sh -e
. $stdenv/setup
genericBuild
+4 -2
View File
@@ -1,4 +1,6 @@
{stdenv, fetchurl}: derivation {
{stdenv, fetchurl}:
derivation {
name = "gawk-3.1.3";
system = stdenv.system;
builder = ./builder.sh;
@@ -6,5 +8,5 @@
url = ftp://ftp.nluug.nl/pub/gnu/gawk/gawk-3.1.3.tar.bz2;
md5 = "a116eec17e7ba085febb74c7758823bd";
};
stdenv = stdenv;
inherit stdenv;
}
+1 -12
View File
@@ -1,14 +1,3 @@
#! /bin/sh -e
set -x
export NIX_DEBUG=1
buildinputs="$pcre"
. $stdenv/setup
echo $NIX_LDFLAGS
tar xvfj $src
cd grep-*
./configure --prefix=$out
make
make install
genericBuild
+5 -3
View File
@@ -1,4 +1,6 @@
{stdenv, fetchurl, pcre}: derivation {
{stdenv, fetchurl, pcre}:
derivation {
name = "gnugrep-2.5.1";
system = stdenv.system;
builder = ./builder.sh;
@@ -6,6 +8,6 @@
url = ftp://ftp.nluug.nl/pub/gnu/grep/grep-2.5.1.tar.bz2;
md5 = "ddd99e2d5d4f4611357e31e97f080cf2";
};
stdenv = stdenv;
pcre = pcre;
buildInputs = [pcre];
inherit stdenv;
}
+2 -8
View File
@@ -1,9 +1,3 @@
#! /bin/sh
. $stdenv/setup || exit 1
tar xvfz $src || exit 1
cd sed-* || exit 1
./configure --prefix=$out || exit 1
make || exit 1
make install || exit 1
. $stdenv/setup
genericBuild
+4 -2
View File
@@ -1,4 +1,6 @@
{stdenv, fetchurl}: derivation {
{stdenv, fetchurl}:
derivation {
name = "gnused-4.0.7";
system = stdenv.system;
builder = ./builder.sh;
@@ -6,5 +8,5 @@
url = ftp://ftp.nluug.nl/pub/gnu/sed/sed-4.0.7.tar.gz;
md5 = "005738e7f97bd77d95b6907156c8202a";
};
stdenv = stdenv;
inherit stdenv;
}