* 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:
@@ -1,10 +0,0 @@
|
||||
{stdenv, fetchurl}: derivation {
|
||||
name = "aterm-2.0.5";
|
||||
system = stdenv.system;
|
||||
builder = ./builder.sh;
|
||||
src = fetchurl {
|
||||
url = http://www.cwi.nl/projects/MetaEnv/aterm/aterm-2.0.5.tar.gz;
|
||||
md5 = "68aefb0c10b2ab876b8d3c0b2d0cdb1b";
|
||||
};
|
||||
stdenv = stdenv;
|
||||
}
|
||||
@@ -1,10 +1,6 @@
|
||||
#! /bin/sh
|
||||
|
||||
. $stdenv/setup || exit 1
|
||||
. $stdenv/setup
|
||||
|
||||
tar xvfz $src || exit 1
|
||||
cd aterm-* || exit 1
|
||||
./configure --prefix=$out --with-gcc || exit 1
|
||||
make || exit 1
|
||||
make install || exit 1
|
||||
strip -S $out/lib/*.a || exit 1
|
||||
configureFlags="--with-gcc"
|
||||
genericBuild
|
||||
|
||||
@@ -1,10 +1,12 @@
|
||||
{stdenv, fetchurl}: derivation {
|
||||
name = "aterm-2.0";
|
||||
{stdenv, fetchurl}:
|
||||
|
||||
derivation {
|
||||
name = "aterm-2.0.5";
|
||||
system = stdenv.system;
|
||||
builder = ./builder.sh;
|
||||
src = fetchurl {
|
||||
url = http://www.cwi.nl/projects/MetaEnv/aterm/aterm-2.0.tar.gz;
|
||||
md5 = "853474e4bcf4a85f7d38a0676b36bded";
|
||||
url = http://www.cwi.nl/projects/MetaEnv/aterm/aterm-2.0.5.tar.gz;
|
||||
md5 = "68aefb0c10b2ab876b8d3c0b2d0cdb1b";
|
||||
};
|
||||
stdenv = stdenv;
|
||||
inherit stdenv;
|
||||
}
|
||||
|
||||
@@ -10,7 +10,6 @@ export TZ=UTC
|
||||
tar xvfz $src
|
||||
cd fontconfig-*
|
||||
./configure --prefix=$out --with-confdir=$out/etc/fonts \
|
||||
--x-includes=$x11/include --x-libraries=$x11/lib \
|
||||
--with-expat-includes=$expat/include --with-expat-lib=$expat/lib
|
||||
make
|
||||
make install
|
||||
|
||||
@@ -2,26 +2,36 @@
|
||||
|
||||
# glibc cannot have itself in its rpath.
|
||||
export NIX_NO_SELF_RPATH=1
|
||||
buildinputs="$patch"
|
||||
|
||||
. $stdenv/setup
|
||||
|
||||
tar xvfj $glibcSrc
|
||||
(cd glibc-* && tar xvfj $linuxthreadsSrc) || false
|
||||
|
||||
(cd glibc-* && patch -p1 < $vaargsPatch) || false
|
||||
postUnpack() {
|
||||
cd $sourceRoot
|
||||
unpackFile $linuxthreadsSrc
|
||||
cd ..
|
||||
}
|
||||
|
||||
mkdir build
|
||||
cd build
|
||||
../glibc-*/configure --prefix=$out --enable-add-ons --disable-profile
|
||||
postUnpack=postUnpack
|
||||
|
||||
make
|
||||
make install
|
||||
make localedata/install-locales
|
||||
strip -S $out/lib/*.a $out/lib/*.so $out/lib/gconv/*.so || true
|
||||
strip -s $out/bin/* $out/sbin/* $out/libexec/* || true
|
||||
|
||||
rm $out/etc/ld.so.cache
|
||||
preConfigure() {
|
||||
mkdir ../build
|
||||
cd ../build
|
||||
configureScript=../$sourceRoot/configure
|
||||
configureFlags="--enable-add-ons --disable-profile"
|
||||
}
|
||||
|
||||
(cd $out/include && ln -s $kernelHeaders/include/* .) || false
|
||||
preConfigure=preConfigure
|
||||
|
||||
exit 0
|
||||
|
||||
postInstall() {
|
||||
make localedata/install-locales
|
||||
rm $out/etc/ld.so.cache
|
||||
(cd $out/include && ln -s $kernelHeaders/include/* .) || exit 1
|
||||
}
|
||||
|
||||
postInstall=postInstall
|
||||
|
||||
|
||||
genericBuild
|
||||
|
||||
@@ -7,7 +7,7 @@ derivation {
|
||||
system = stdenv.system;
|
||||
builder = ./builder.sh;
|
||||
|
||||
glibcSrc = fetchurl {
|
||||
src = fetchurl {
|
||||
url = ftp://ftp.nl.net/pub/gnu/glibc/glibc-2.3.2.tar.bz2;
|
||||
md5 = "ede969aad568f48083e413384f20753c";
|
||||
};
|
||||
@@ -18,7 +18,8 @@ derivation {
|
||||
|
||||
# This is a patch to make glibc compile under GCC 3.3. Presumably
|
||||
# later releases of glibc won't need this.
|
||||
vaargsPatch = ./glibc-2.3.2-sscanf-1.patch;
|
||||
patches = [./glibc-2.3.2-sscanf-1.patch];
|
||||
|
||||
inherit stdenv kernelHeaders patch;
|
||||
buildInputs = [patch];
|
||||
inherit stdenv kernelHeaders;
|
||||
}
|
||||
|
||||
@@ -5,7 +5,7 @@ buildinputs="$x11 $glib"
|
||||
|
||||
tar xvfz $src
|
||||
cd gtk+-*
|
||||
./configure --prefix=$out --x-includes=$x11/include --x-libraries=$x11/lib
|
||||
./configure --prefix=$out
|
||||
make
|
||||
make install
|
||||
|
||||
|
||||
@@ -3,9 +3,19 @@
|
||||
buildinputs="$pkgconfig $x11 $glib $atk $pango $perl $libtiff $libjpeg $libpng"
|
||||
. $stdenv/setup
|
||||
|
||||
IFS=:
|
||||
for i in $PATH; do echo $i; done
|
||||
|
||||
#exit 1
|
||||
# A utility function for fixing up libtool scripts that scan in
|
||||
# default directories like /usr. This is a bit of a hack. A better
|
||||
# solution would be to fix libtool, but since it is included in so
|
||||
# many packages that is not feasible right now.
|
||||
|
||||
tar xvfj $src
|
||||
cd gtk+-*
|
||||
./configure --prefix=$out --x-includes=$x11/include --x-libraries=$x11/lib
|
||||
fixLibtool ltmain.sh
|
||||
./configure --prefix=$out
|
||||
make
|
||||
make install
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@ buildinputs="$pkgconfig $x11 $glib $xft"
|
||||
|
||||
tar xvfj $src
|
||||
cd pango-*
|
||||
./configure --prefix=$out --x-includes=$x11/include --x-libraries=$x11/lib
|
||||
./configure --prefix=$out
|
||||
make
|
||||
make install
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#! /bin/sh -e
|
||||
|
||||
buildinputs="$zlib"
|
||||
buildInputs="$zlib"
|
||||
. $stdenv/setup
|
||||
|
||||
tar xvfj $src
|
||||
|
||||
@@ -1,9 +1,3 @@
|
||||
#! /bin/sh
|
||||
|
||||
. $stdenv/setup || exit 1
|
||||
|
||||
tar xvfj $src || exit 1
|
||||
cd pcre-* || exit 1
|
||||
./configure --prefix=$out || exit 1
|
||||
make || exit 1
|
||||
make install || exit 1
|
||||
#! /bin/sh -e
|
||||
. $stdenv/setup
|
||||
genericBuild
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
{stdenv, fetchurl}: derivation {
|
||||
{stdenv, fetchurl}:
|
||||
|
||||
derivation {
|
||||
name = "pcre-4.3";
|
||||
system = stdenv.system;
|
||||
builder = ./builder.sh;
|
||||
@@ -6,5 +8,5 @@
|
||||
url = ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre-4.3.tar.bz2;
|
||||
md5 = "7bc7d5b590a41e6f9ede30f272002a02";
|
||||
};
|
||||
stdenv = stdenv;
|
||||
inherit stdenv;
|
||||
}
|
||||
|
||||
@@ -1,10 +1,4 @@
|
||||
#! /bin/sh
|
||||
|
||||
. $stdenv/setup || exit 1
|
||||
|
||||
tar xvfz $src || exit 1
|
||||
cd zlib-* || exit 1
|
||||
./configure --prefix=$out --shared || exit 1
|
||||
make || exit 1
|
||||
mkdir $out || exit 1
|
||||
make install || exit 1
|
||||
#! /bin/sh -e
|
||||
. $stdenv/setup
|
||||
configureFlags="--shared"
|
||||
genericBuild
|
||||
|
||||
@@ -1,10 +1,12 @@
|
||||
{stdenv, fetchurl}: derivation {
|
||||
name = "zlib-1.1.4";
|
||||
{stdenv, fetchurl}:
|
||||
|
||||
derivation {
|
||||
name = "zlib-1.2.1";
|
||||
system = stdenv.system;
|
||||
builder = ./builder.sh;
|
||||
src = fetchurl {
|
||||
url = http://www.gzip.org/zlib/zlib-1.1.4.tar.gz;
|
||||
md5 = "abc405d0bdd3ee22782d7aa20e440f08";
|
||||
url = http://www.gzip.org/zlib/zlib-1.2.1.tar.gz;
|
||||
md5 = "ef1cb003448b4a53517b8f25adb12452";
|
||||
};
|
||||
stdenv = stdenv;
|
||||
inherit stdenv;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user