in genericBuild. This also means that you can override a phase
function by redefining it, like
buildPhase() {
... do something ...
}
and you still get the log nesting stuff.
* GNUmakefile is also a valid makefile name.
* Evaluate the variables $preHook and $postHook to allow more stdenv
overrideability.
svn path=/nixpkgs/branches/stdenv-updates/; revision=10786
is skipped when there is no configure script). So you don't need to
set
buildPhase = "true";
for derivations that don't have any build action.
* Variable $makefile to allow the makefile to be specified.
svn path=/nixpkgs/branches/stdenv-updates/; revision=10784
* GCC 4.2: restore the ability to build a statically linked compiler,
needed for the Nixpkgs bootstrap.
* GCC 4.2: use symlinks instead of hard links in $out/bin
(NIXPKGS-62).
svn path=/nixpkgs/branches/stdenv-updates/; revision=9771
The function for use in setup hooks. The syntax is very simple:
add_to_var varName needDir addDir prefix
If the directory $prefix$needDir exists, directory $prefix$addDir is added to
variable named varName (using PATH_DELIMITER as delimiter). If addDir is "", it
defaults to needDir (this is a most common case).
svn path=/nixpkgs/trunk/; revision=9496
Now you can write prefixKey="-prefix " and "-prefix ${out}" will be inserted in
configureFlags (instead of "--prefix ${out}").
svn path=/nixpkgs/trunk/; revision=9351
URLs to http://nix.cs.uu.nl/dist/tarballs. With content-addressable
mirror support (r9190, NIXPKGS-70) this is no longer necessary:
fetchurl will try to download from that location automatically. So
we can keep the original URLs.
svn path=/nixpkgs/trunk/; revision=9192
* Removed substitute, it's part of the generic builder now.
* stdenv-initial (Linux): use the real generic builder script. This
does require that sed is in the path of the builder of the initial
stdenv.
svn path=/nixpkgs/trunk/; revision=7498
fixupPhase strips binaries, runs patchelf, etc. This is so that
those things still happen when somebody overrides installPhase.
svn path=/nixpkgs/trunk/; revision=7494
often the same flags need to be passed to both `make' and `make
install'. Added a variable buildFlags for flags that should only be
passed to `make'.
svn path=/nixpkgs/trunk/; revision=7491
* If the environment variable buildCommand is set, then eval that
instead of doing the build phases. This is used by the runCommand
function in all-packages.nix to allow one-lines like
foo = runCommand "foo" {} "mkdir $out; echo foo > $out/foo";
svn path=/nixpkgs/trunk/; revision=7298
* Kernel: accept a list of kernel patches through the kernelPatches
argument. The names of the patches are added to the description
attribute (e.g., "The Linux kernel (with patches:
skas-2.6.18-v9-pre9)").
* Generic builder (forked in setup-new.sh): support patches that are
compressed using gzip or bzip2.
svn path=/nixpkgs/trunk/; revision=6913
* To prevent this kind of thing, check that all tools are statically
linked.
* Use findutils 4.2.27, 4.2.28 doesn't build with dietlibc.
svn path=/nixpkgs/trunk/; revision=6881
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
Glibc. This is useful when building GCC.
* gcc-wrapper: the dynamic linker has a different name on x86_64 and
powerpc.
* gcc-wrapper: "glibc" -> "libc", because someday we might support
different C libraries.
* gcc: don't do a multilib build (e.g., 32-bit support on x86_64),
don't need it.
* gcc: merge in support for static builds.
* gcc: various simplifications in the compiler/linker flags, hope they
work.
svn path=/nixpkgs/trunk/; revision=6823
impure x86_64 environment, make sure that the 32-bit GCC / Glibc
libraries are installed, such as /usr/lib/crti.o.)
svn path=/nixpkgs/trunk/; revision=6818
x86_64. Glibc doens't build yet, though (it needs libgcc_eh, which
is strangely missing from the static GCC build).
svn path=/nixpkgs/trunk/; revision=6815
* The statically linked bootstrap tools are now automatically
reproducable, just do:
$ nix-build ./make-bootstrap-tools.nix
The resulting binaries in result/in-nixpkgs go to
stdenv/linux/bootstrap/<platform>/, and the tarballs in
result/on-server go to
https://svn.cs.uu.nl:12443/repos/trace/tarballs/trunk/stdenv-linux/<platform>/<revision>/.
These are checked out on nix.cs.uu.nl under http://.../dist/tarballs.
* The statically linked libraries all use dietlibc now (except
patchelf and glibc), so they are much smaller. This is especially
nice for the tools in the Nixpkgs tree, since it makes Nixpkgs
tarballs smaller.
* Use Binutils 2.17 and GCC 4.1.1 for the bootstrap.
* The stdenv is now based on Glibc 2.5. I hope it works ;-)
svn path=/nixpkgs/trunk/; revision=6803
set to the result, but don't use them in the actual derivation (so
they're not inputs). Useful to pass through extra attributes that
are not inputs, but should be made available to Nix expressions
using the derivation (e.g., in assertions).
svn path=/nixpkgs/trunk/; revision=6521
A stdenv/mingw/pkgs/pkgconfig-builder.sh
Bootstrap pkg-config: support the setup hook.
M stdenv/mingw/fix-builder.sh
Fix the "system" variable.
svn path=/nixpkgs/trunk/; revision=6267
Moved all the shell fixes to fix-builder.sh, which is now always invoked.
Added aterm to the list of packages provided by mingw.nix
svn path=/nixpkgs/trunk/; revision=6152
- clone of fetchurl that invokes a given chmod to workaround problems
with inappropriate file permissions (executable files are not allowed
by Nix)
- cygpath tool to determine the full windows path of a cygwin
tool. This tool is used to give fetchurl the windows path to chmod.
- native curl.exe
- gcc-wrapper no longer used
- all-packages.nix: allows stdenv to specify fetchurl.
svn path=/nixpkgs/trunk/; revision=6140
function to regenerate itself with a different setup script. This
is useful for experimenting with changes to the setup script in
specific packages without triggering a rebuild of everything.
* stdenv/generic/setup-latest.sh is a branch of setup.sh containing
pending changes that will be merged into setup.sh eventually.
* setup-latest.sh: don't use tar's "z" and "j" flags. Rather, call
gzip and bunzip2 directly.
svn path=/nixpkgs/trunk/; revision=6066
(ideally, this should be the other way around, but I have no idea how
many packages will break if we enable shared libraries by default)
svn path=/nixpkgs/trunk/; revision=5923
contains arbitrary information about a package, like this:
meta = {
homepage = "http://gcc.gnu.org/";
license = "GPL/LGPL";
description = "GNU Compiler Collection, 4.0.x";
};
The "meta" attribute is not passed to the actual derivation
operation, so it's not a dependency --- changes to "meta" attributes
don't trigger a recompilation.
Now we have to standardise some useful attributes ;-)
svn path=/nixpkgs/branches/usability/; revision=5024
all-packages. That is, an attribute like "bash" in all-packages.nix
should evaluate to the "bash" used to build stdenv, it shouldn't
build a new one.
Hm, this would be a lot cleaner if we had lazy_rec ;-)
svn path=/nixpkgs/branches/usability/; revision=4775
Now, switching the curl to this version did not trigger a massive rebuild on
my system, which puzzles me. Maybe it is because no checksum is recorded?
Am I doing something wrong?
svn path=/nixpkgs/trunk/; revision=4434
* Use the system Perl on all non-i686-linux platforms.
* Don't build Python support in libxml2 on most platforms.
svn path=/nixpkgs/trunk/; revision=3019
$glibc/lib/gconv/ISO-2022-JP.so has an RPATH of `$ORIGIN' so that it
can find glibc/lib/gconv/libJIS.so; `$ORIGIN' should not be filtered
out of the RPATH).
svn path=/nixpkgs/trunk/; revision=2290
* Combine most of the archives together into one file (static.bz2).
* Don't depend on Subversion directories, but single files only.
Otherwise any Subversion operation may cause a rebuild because
something in .svn changes. It would be nice if .svn directories
were filtered out when copying things to the store.
* Glibc tarball: removed all .so files, /bin and /sbin, etc., and put
linux-headers in the Glibc tarball.
svn path=/nixpkgs/trunk/; revision=2265
this contains mostly Armijn's pure stdenv-linux.
* After unpacking the statically linked GCC, patch all store paths to
/nix/store/ffffffffffffffffffffffffffffffff. Ugly hack to prevent
undeclared references but it works.
* We don't need Glib's dynamic libraries in the first bootstrap stage;
delete them. Actually the downloaded Glibc binary is only needed
for building Glibc, since GCC needs a C compiler to build some
programs in `configure'. So static linking is fine for that. Maybe
it would be better to patch `configure' so that we don't need a
pre-built Glibc at all.
* Set the svn:executable property on `cp' and `patchelf'.
* In Glibc, revert to LinuxThreads. Maybe NPTL will work, but TLS
support is a problem.
* Delete most Glibc patches; they're no longer needed since the branch
updated it to 20050110.
* Some cleanups.
svn path=/nixpkgs/trunk/; revision=2258
be passed to derivations that need to apply patches.
* GCC 3.4 is now the default compiler (old GCC renamed to `gcc-3.3').
* The temporary GCCs built during the stdenvLinux bootstrap are now
built without C++ support and without profiling.
* Remove fixincl in GCC 3.4 to prevent a retained dependency on the
previous GCC.
* Always set $prefix in setup.sh, even when there is no configure
script.
svn path=/nixpkgs/trunk/; revision=1444
Use with a bit of care though, because it will need an extra flag to be able to find the right version of cc1, etc.
svn path=/nixpkgs/trunk/; revision=1374
`$NIX_BUILD_TOP/env-vars' at the beginning of each build phase. In
conjunction with the `-K' Nix flag, this is useful for debugging: to
reproduce the build environment, go to the saved build directory and
source in `env-vars' (e.g., `. env-vars').
svn path=/nixpkgs/trunk/; revision=1367
substitution feature (which appears to be buggy - there's no way to
wait for an output redirection, and bash sometimes appears to die
due to subtle timing conditions). This also removes the most
egregious dependency on bash.
svn path=/nixpkgs/trunk/; revision=1258
even if some build phase failed if the variable `$succeedOnFailure'
is set to 1. If that happens, the file `$out/nix-support/failed' is
created to mark the build result as bad. This is useful for release
management systems that might want to publish failed releases.
svn path=/nixpkgs/trunk/; revision=1163
* A new `distPhase' to build source distributions (enabled when
$doDist = 1).
* A new `checkPhase' to perform `make check' (enabled when $doCheck =
1).
* Allow the prefix to be redirected, either by setting $prefix or by
setting $useTempPrefix to 1. Useful when making distributions.
* Allow the build or install phases to be skipped by setting
$dontBuild $dontInstall to 1.
* Allow the order of phases to be changed by setting $phases.
svn path=/nixpkgs/trunk/; revision=1151
("/usr/bin/ld: can't use -s with -r (resulting file would not be
relocatable)").
* Since stdenv/generic had to be modified for this, I forked it in
situ. This should be merged later.
svn path=/nixpkgs/trunk/; revision=1121
On the downside, the build process of stdenvLinux builds gcc 9 times
(3 x 3 bootstrap stages). That's a bit excessive.
svn path=/nixpkgs/trunk/; revision=880
* Make builders unexecutable by removing the hash-bang line and
execute permission.
* Convert calls to `derivation' to `mkDerivation'.
* Remove `system' and `stdenv' attributes from calls to
`mkDerivation'. These transformations were all done automatically,
so it is quite possible I broke stuff.
* Put the `mkDerivation' function in stdenv/generic.
svn path=/nixpkgs/trunk/; revision=874
store, rather than outside (such as /bin/sh).
For instance, the Nix expression for the ATerm library now looks
like this:
{stdenv, fetchurl}:
stdenv.mkDerivation {
name = "aterm-2.0.5";
builder = ./builder.sh;
...
}
where `mkDerivation' is a helper function in `stdenv' that massages
the given attribute set into using the bash shell that is part of
the standard environment:
mkDerivation = attrs: derivation (att s // {
builder = pkgs.bash ~ /bin/sh;
args = ["-e" attrs.builder];
stdenv = (...);
system = (...).system;
});
Note that this makes it unnecessary to set the `stdenv' and `system'
attributes, since `mkDerivation' already does that.
svn path=/nixpkgs/trunk/; revision=866
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
checked whether absolute paths passed to gcc/ld refer to the store,
which is wrong: they can also refer to the build tree
(/tmp/nix-...).
* Less static composition in the construction of stdenv-nix-linux:
gcc-wrapper and generic are now passed in as arguments, rather then
referenced by relative path. This makes it easier to hack on a
specific stage of the bootstrap process (before, a change to, e.g.,
generic/setup.sh would cause all bootstrap stages to be redone).
svn path=/nixpkgs/trunk/; revision=833
- gcc/ld-wrappers have been factored out into a separate
derivation. This allows a working gcc to be installed in the user
environment. (Previously the Nix gcc didn't work because it
needed a whole bunch of flags to point to glibc.)
- Better modularity: packages can specify hooks into the setup
scripts. For instance, setup no longer knows about the
PKG_CONFIG_PATH variable; pkgconfig can set it up instead.
- gcc not longer depends on binutils. This simplifies the bootstrap
process.
svn path=/nixpkgs/trunk/; revision=816
/usr/lib/crt1.o, while it should be using $glibc/lib/crt1.o. This
quick hack (prepending $glibc/lib to the GCC search path using "-B")
fixes the problem, but a better solution to prevent this sort of
thing is to remove these static paths from gcc.
Note: this problem was found using the pure UML Nix environment
(where we don't have /usr/lib).
svn path=/nixpkgs/trunk/; revision=810
against the right dynamic libraries. set-env.sh add the right linker flags to the
NIX_LDFLAGS environment variable, which is passed by gcc-wrapper to the linker.
(In many cases these flags could just be passed through LDFLAGS to configure
scripts; however, in many other cases this doesn't work properly.)
--This line, and those below, will be ignored--
M pkgs/atk/atk-build.sh
M pkgs/glibc/glibc-build.sh
M pkgs/expat/expat-build.sh
M pkgs/freetype/freetype-build.sh
M pkgs/system/populate-linkdirs.pl
M pkgs/sdf2/sdf2-build.sh
M pkgs/pspell/pspell-build.sh
M pkgs/subversion/subversion-build.sh
M pkgs/helpers/set-env.sh
M pkgs/pango/pango-build.sh
M pkgs/strategoxt/strategoxt-build.sh
M pkgs/aterm/aterm-build.sh
M pkgs/libxml2/libxml2-build.sh
M pkgs/glib-1/glib-build.sh
M pkgs/glib/glib-build.sh
M pkgs/pan/pan.fix
M pkgs/pan/pan-build.sh
M pkgs/libxslt/libxslt-build.sh
M pkgs/httpd/httpd-build.sh
M pkgs/openssl/openssl-build.sh
M pkgs/gtkspell/gtkspell-build.sh
M pkgs/fontconfig/fontconfig.fix
M pkgs/fontconfig/fontconfig-build.sh
M pkgs/gnet/gnet-build.sh
M pkgs/gtk+-1/gtk+-build.sh
M pkgs/gtk+/gtk+-build.sh
M pkgs/stdenv/gcc-wrapper.sh
M pkgs/stdenv/stdenv-build.sh
M pkgs/db4/db4-build.sh
M pkgs/db4/db4.fix
M pkgs/MPlayer/MPlayer-build.sh
M pkgs/swig/swig-build.sh
svn path=/nixpkgs/trunk/; revision=213
the build and execution environment.
This is very useful. For example, it allows packages built on a SuSE
8.2 system to run on a SuSE 8.1 system (this is because 8.2 has a newer
glibc; packages built against it cannot be dynamically linked against
older glibcs).
Of course, Fix packages should not directly import glibc since that is
very system-specific. Rather, they should import stdenv/stdenv.fix and
in their build scripts source in $stdenv/setup, which will setup the
right environment variables. The idea is that stdenv.fix provides the
basic C/Unix build environment (C compiler, POSIX utilities, etc.).
Note that only the ATerm package currently uses this.
svn path=/nixpkgs/trunk/; revision=203