[Nix-dev] Re: NixOS on embedded systems
Ludovic Courtès
ludo at gnu.org
Tue Jul 20 18:44:42 CEST 2010
Hi,
Lluís Batlle i Rossell <viriketo at gmail.com> writes:
> On Sat, Jul 17, 2010 at 03:32:04PM +0200, Ludovic Courtès wrote:
>> Hi Lluís!
>>
>> Lluís Batlle i Rossell <viriketo at gmail.com> writes:
>>
>> > I have the idea that NixOS expressions usually don't need a compiler, but NixOS
>> > relies on the nixpkgs expressions that need a compiler.
>>
>> Which are “the nixpkgs expressions that need a compiler” you’re
>> referring to?
>> In theory, if everything you need is available pre-compiled, you don’t
>> need a compiler. Am I overlooking cases where this isn’t true?
>
> Do you think that hydra builds every nixpkgs package you may need? It builds a
> lot, but not all (1st point).
That’s not a big issue IMO, because you can always get the missing
packages built by Hydra.
> Additionally, it is a heavy operation for a computer to evaluate the current
> nixpkgs (2nd point).
That’s indeed a problem. I think a solution would be to have a Nix
compiler instead of/in addition to the current interpreter, but of
course we’re far from there.
> Having those nixpkgs pointing mostly to fetchurl derivations instead of usual
> stdenv mkDerivations, it makes additionally a fence against building natively or
> cross-building those packages (3rd point).
You mean that NixOS/Nixpkgs could be “compiled” to some sort of a big
Nix expression that just does ‘fetchurl’ calls to fetch the pre-compiled
binaries?
It’s a form of compilation, but it’s also a hack. ;-)
> Then you could have x86_64 hydra cross-building for mipsel, and
> evaluate a nixos in that mipsel (instead of evaluating a cross-nixos -
> whose expression still does not exist - in x86_64), this nixos taking
> the packages from hydra (so being able to type nixos-rebuild in your
> embedded).
I see, good point.
Being able to build a cross-NixOS would be nice too, though it would
still be inconvenient because you wouldn’t be able to nixos-rebuild
natively.
Thanks,
Ludo’.
More information about the nix-dev
mailing list