[Nix-dev] Re: [Nix-commits] SVN commit: nix - 18468 - NicolasPierron - nixpkgs/branches/stdenv-updates/pkgs/lib
Nicolas Pierron
nicolas.b.pierron at gmail.com
Sat Nov 21 16:13:53 CET 2009
Hi,
On Fri, Nov 20, 2009 at 22:02, Ludovic Courtès <ludo at gnu.org> wrote:
> Nicolas Pierron <nicolas.b.pierron at gmail.com> writes:
>
>> On Fri, Nov 20, 2009 at 19:19, Ludovic Courtès <ludo at gnu.org> wrote:
>
>>> But then, I find it troublesome if all of Nixpkgs has to pay the price
>>> of this additional complexity, especially now that you showed it’s
>>> possible to natively compile NixOS on the SheevaPlug.
>>
>> What price?
>
> The changes to make Nixpkgs able to cross-compile things are IMO
> non-trivial and quite intrusive (of course, triviality and intrusiveness
> hard to measure, but we probably agree that it’s not as simple as the
> non-cross-compile-capable Nixpkgs.)
So, this is another subject ... This is no longer related to this patch.
On the cross-compilation, I think we have to introduce a separation
between build & host (which are currently named buildNative & build).
This distinction is required to ensure that you have derivation
compiled for the host system separated from derivations compiled for
the build system.
The cost of this separation is cheap. From the point of view of the
stdenv, this only introduce the host concept which was previously
defined as similar to the build system. Generalizing the concept of
cross-compilation for all jobs is not costly. What would be costly is
adding a special case for the cross-compilation.
In addition, derivation supporting cross-compilation can be checked to
not depends on their build-dependencies by looking for references to
any elements of (hostInputs - buildInputs).
What Luis have been working on is a hard problem. What I am doing is
suggesting some code reorganization to hide the apparent complexity
behind small snippet of codes. I am clearly saying the apparent
complexity, because form the stdenv point of view, this is just a
small refinement of the existing features to add a larger vocabulary
to support cross-compilation without to much hacking.
So I really wonder what is the price of maintaining a generic stdenv
which cover common hacks of cross-compilation in comparison to
maintaining all those hacks.
--
Nicolas Pierron
http://www.linkedin.com/in/nicolasbpierron - http://nbp.name/
Lars Rasmussen (Google IO 2009) - Icland is an icland.
More information about the nix-dev
mailing list