I made the stdenvCross adapter simpler, according to Nicolas Pierron comments,
and I commented it a bit.
There are still jobs to do. At least:
- Plan for the general renaming from buildInputs to hostInputs
- We should not break merges from trunk.
- Make the generic stdenv understand about host/buildInputs, at least for
native builds, because it is used in the always-native building of
stdenvLinux. This should allow us to remove all duplications of "*NoCross" in
nixpkgs.
svn path=/nixpkgs/branches/stdenv-updates/; revision=18449
needing to keep a new tree of expressions apart for the expressions to get
cross-compiled.
I changed the whole way of using cross compilation with nixpkgs, which before
was done through a simple adapter.
Now the adapter became complex, and I've tried to avoid the most obvious
recursivities. For example, the fetchurl expression should
never be cross-compiled, as the gmp, mpfr, and some others, like
some ncurses, perl, ... I made overrided copies of those necessary as
perlNoCross, ncursesNoCross, as stdenvNoCross, keeping in mind that
the stdenv (capable of cross compilation) is built upon stdenvNoCross using
an adapter.
So, to cross compile, instead of building using "nixpkgs/default.nix",
you should build with your
own "myarchiteture.nix", which should have contents like these, for example:
import /etc/nixos/nixpkgs/default.nix
{
crossSystem = {
config = "armv5tel-unknown-linux-gnueabi";
bigEndian = false;
arch = "arm";
float = "soft";
};
}
svn path=/nixpkgs/branches/stdenv-updates/; revision=18398
It still does not work, but I think I already get glibc cross compiled.
Next: gcc and g++, and set some setup script hooks on stdenvCross.
It took quite enough hours for this commit.
svn path=/nixpkgs/branches/stdenv-updates/; revision=18351
My idea is to provide special stdenv expressions that will contain in the path
additional cross compilers. As most expressions for programs accept a stdenv parameter,
we could substitute this parameter with the special stdenv, which will have a
generic builder that attempts the usual "--target=..." and can additionally
have an env variable like "cross" with the target architecture set.
So, finally we could have additional expressions like this:
bashRealArm = makeOverridable (import ../shells/bash) {
inherit fetchurl bison;
stdenv = stdenvCross "armv5tel-unknown-linux-gnueabi";
};
Meanwhile it does not work - I still cannot get the cross-gcc to build.
I think it does not fill the previous expressions with a lot of noise, so I
think it may be a good path to follow.
I only touched some files of the current stdenv: gcc-4.3, kernel headers
2.6.28, glibc 2.9, ...
I tried to use the gcc-cross-wrapper, that may be very outdated. Maybe I will
update it, or update the gcc-wrapper expression to make it fit the cross tools,
but meanwhile I even cannot build gcc, so I have not tested the wrapper.
This new idea on cross compiling is not similar to that of the
nixpkgs/branches/cross-compilation, which mostly added bare new expressions for
anything to be cross compiled, if I understood it correctly.
I cared not to break anything of the usual stdenv in all this work.
svn path=/nixpkgs/branches/stdenv-updates/; revision=18343
This comes from:
svn diff ^/nixpkgs/trunk/@18255 ^/nixpkgs/branches/stdenv-updates/ > diff
patch -p0 < diff
and then adding into svn all files new from the patch.
trunk@18255 comes from the last time I updated stdenv-updates from trunk.
svn path=/nixpkgs/stdenv-updates2/; revision=18272
tree under $out into a separate stdenv adapter named keepBuildTree.
* makeModulesClosure: support building an initrd for a kernel that has
been compiled with coverage instrumentation.
svn path=/nixpkgs/trunk/; revision=16916
I thought I didn't change stdenv, but I did. This will go soon into the stdenv
branch then.
Reverse-merging r16467 through r16465.
svn path=/nixpkgs/trunk/; revision=16468
LD_LIBRARY_PATH since it breaks /bin/sh on non-NixOS platforms (and
reverted the previous "fix" in r15470).
svn path=/nixpkgs/branches/stdenv-updates/; revision=16029
* Use patchelf 0.5 and use the --force-rpath flag. This removes the
need for setting LD_LIBRARY_PATH and so should fix bootstrapping
Nixpkgs on non-NixOS platforms.
svn path=/nixpkgs/trunk/; revision=16022
export > $NIX_BUILD_TOP/env-vars
will fail if the name attribute contains a metacharacter
(e.g. "?"):
building path(s) `/nix/store/yk93gk3lc5bslcn5hklnzs0bdkp2r0an-icu-3.8-setBreakType-public.diff?rev=1.1'
/nix/store/gj8ac12mrwinbq7wzzhwfjjs3028a11x-stdenv-linux/setup: line 374: $NIX_BUILD_TOP/env-vars: ambiguous redirect
I guess this only happens if you happen to have an old temporary
build directory for the same derivation in /tmp.
This affects fetchurl in particular.
svn path=/nixpkgs/trunk/; revision=15915
* setup.sh: removed some obsolete features, specifically some that
were only used by the old build farm.
* addToSearchPath: removed some parameters that weren't used
anywhere.
svn path=/nixpkgs/branches/stdenv-updates/; revision=15136
instead of "gcc-4.3.3". This fixed the long-standing annoyance that
you can't distinguish the two in (say) nix-store -qR.
* On x86_64-linux, put $out/lib64 in the RPATH in addition to
$out/lib, because some packages (in particular GCC) put libraries in
$out/lib64 and ended up linking against the wrong library.
* Strip $out/lib64.
* Removed g77_42 because it's exactly the same as gfortran.
svn path=/nixpkgs/branches/stdenv-updates/; revision=14708
* Updated stdenv-linux:
- The bootstrap tools are no longer statically linked (except for
binaries in the Nixpkgs tree used to download and unpack the
bootstrap tools).
- x86_64 uses the same static binaries as i686. This makes the
Nixpkgs tree a bit smaller.
- Use the Linux 2.6.28 headers.
svn path=/nixpkgs/branches/stdenv-updates/; revision=13946
variables. This is so you don't have to write things like
preBuild=preBuild
preBuild() {
bla
}
svn path=/nixpkgs/branches/stdenv-updates/; revision=13941
setting the NIX_INDENT_MAKE variable; disabled by default) so we
don't need a separate gnumakeNix package.
svn path=/nixpkgs/branches/stdenv-updates/; revision=13807
Instead of using a mishmash of statically linked and dietlibc
programs (which often have problems on various platforms), we just
use normal, dynamically linked binaries, and use some patchelf magic
to rewrite them so that they can find Glibc. Also include G++ and
Perl, since there are some builds in the bootstrap that need them.
svn path=/nixpkgs/branches/stdenv-updates/; revision=13788
* In stripDirs: use xargs -r, otherwise when there is nothing to
strip, strip prints its help text. Harmless but annoying.
svn path=/nixpkgs/trunk/; revision=13492
bootstrap wasn't recycled in the final allPackages, causing an
additional glibc to be built for packages that explicitly depend on
glibc.
svn path=/nixpkgs/trunk/; revision=12200
paths. E.g. /usr/bin/perl is rewritten to /nix/store/<whatever Perl
is in $PATH>. Paths in the Nix store are left unchanged.
Contributed by Nicolas Pierron.
svn path=/nixpkgs/branches/stdenv-updates/; revision=12036
* Some fetchurl-related refactoring. The `realCurl' attribute is
gone, `curl' is the real thing. To prevent an infinite recursion in
`fetchurl' (because it depends on curl and building curl needs
fetchurl), curl and its dependencies (openssl, zlib, perl) use
`fetchurlBoot', which is the fetchurl used by the previous bootstrap
phase (e.g. the statically linked version of curl for
stdenv-linux). So as a result you can use https:// urls almost
everywhere.
There's also some hackery to prevent a different curl from being
built in every stdenv-linux bootstrap phase (namely the
stdenv.fetchurl attribute which allows fetchurl to be overriden
everywhere).
svn path=/nixpkgs/trunk/; revision=11905
the fail() function unnecessary.
* Flag showBuildStats to print execution times on builder exit.
svn path=/nixpkgs/branches/stdenv-updates/; revision=11688