3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/pkgs/stdenv
Eelco Dolstra 0b7e256162 * Hook variables in the generic builder are now executed using eval.
This has a major advantage: you can write hooks directly in Nix
  expressions.  For instance, rather than write a builder like this:

    source $stdenv/setup

    postInstall=postInstall
    postInstall() {
        ln -sf gzip $out/bin/gunzip
        ln -sf gzip $out/bin/zcat
    }

    genericBuild

  (the gzip builder), you can just add this attribute to the
  derivation:

    postInstall = "ln -sf gzip $out/bin/gunzip; ln -sf gzip $out/bin/zcat";

  and so a separate build script becomes unnecessary.  This should
  allow us to get rid of most builders in Nixpkgs.

* Allow configure and make arguments to contain whitespace.
  Previously, you could say, for instance

    configureFlags="CFLAGS=-O0"

  but not

    configureFlags="CFLAGS=-O0 -g"

  since the `-g' would be interpreted as a separate argument to
  configure.  Now you can say

    configureFlagsArray=("CFLAGS=-O0 -g")

  or similarly

    configureFlagsArray=("CFLAGS=-O0 -g" "LDFLAGS=-L/foo -L/bar")

  which does the right thing.  Idem for makeFlags, installFlags,
  checkFlags and distFlags.

  Unfortunately you can't pass arrays to Bash through the environment,
  so you can't put the array above in a Nix expression, e.g.,

    configureFlagsArray = ["CFLAGS=-O0 -g"];

  since it would just be flattened to a since string.  However, you
  can use the inline hooks described above:

    preConfigure = "configureFlagsArray=(\"CFLAGS=-O0 -g\")";


svn path=/nixpkgs/trunk/; revision=6863
2006-10-26 22:20:25 +00:00
..
cygwin * Allow packages to enabled shared libraries on cygwin. 2006-07-24 21:20:49 +00:00
darwin * Fix "infinite recursion" errors on FreeBSD and Darwin. 2006-03-08 15:34:05 +00:00
freebsd * Fix "infinite recursion" errors on FreeBSD and Darwin. 2006-03-08 15:34:05 +00:00
generic * Hook variables in the generic builder are now executed using eval. 2006-10-26 22:20:25 +00:00
initial * Filter out the meta attribute, again. 2006-03-24 16:07:42 +00:00
linux * Bootstrap tools for the pure stdenv-linux on powerpc-linux. 2006-10-26 20:07:49 +00:00
mingw * `drv + /path' is deprecated, so don't do that anymore. 2006-10-17 14:06:18 +00:00
native * gcc-wrapper: separately store the flags necessary to find GCC and 2006-10-24 18:26:23 +00:00
nix * gcc-wrapper: separately store the flags necessary to find GCC and 2006-10-24 18:26:23 +00:00
common-path.nix * Remove redundant files, move path.nix around a bit. 2006-07-14 08:35:59 +00:00
default.nix * Use the pure stdenv on x86_64. 2006-10-25 13:27:43 +00:00