From 5941f66f0e76cadbda30b3240ba00b30ea365ac7 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Fri, 19 Mar 2004 16:53:04 +0000 Subject: * 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 --- pkgs/tools/compression/bzip2/builder.sh | 12 ++++-------- pkgs/tools/compression/bzip2/default.nix | 6 ++++-- 2 files changed, 8 insertions(+), 10 deletions(-) (limited to 'pkgs/tools/compression/bzip2') diff --git a/pkgs/tools/compression/bzip2/builder.sh b/pkgs/tools/compression/bzip2/builder.sh index 2fa113aa17a..e2c5982852e 100755 --- a/pkgs/tools/compression/bzip2/builder.sh +++ b/pkgs/tools/compression/bzip2/builder.sh @@ -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 diff --git a/pkgs/tools/compression/bzip2/default.nix b/pkgs/tools/compression/bzip2/default.nix index 1684edd1659..af3ec46dec7 100644 --- a/pkgs/tools/compression/bzip2/default.nix +++ b/pkgs/tools/compression/bzip2/default.nix @@ -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; } -- cgit 1.4.1