[Nix-dev] Re: [Nix-commits] SVN commit: nix - 18468 - NicolasPierron - nixpkgs/branches/stdenv-updates/pkgs/lib
Ludovic Courtès
ludo at gnu.org
Thu Nov 19 23:29:15 CET 2009
Hello,
Nicolas Pierron
<nicolas.b.pierron at gmail.com> writes:
> The system is represented by an attribute set which contains the cpu
> type, the architecture (pc, apple, ...) and the kernel.
What are the “PC” and “Apple” architectures these days?
[...]
> The architecture does not contains much information yet. The kernel
> contains the type of the executable format like ELF, PE, ... .
It’s the dynamic linker that deals with executable file formats.
> Such details give you more control compared to the usual strings. As
> example "i686-cygwin", is converted to the following set: (with the
> function mkSystemFromString)
>
> { cpu = cpuTypes.i686;
> arch = architectures.pc;
> kernel = kernels.cygwin;
> }
How is the ‘arch’ bit inferred from “i686-cygwin”?
> # The program only support the litlle endian notation.
> assert stdenv.lib.matchAttrs { cpu.signifiantByte.name =
Typo, and “endianness” is probably more appropriate.
Overall, I feel that it’s nice to have more than just strings like
“i686-cygwin”, but I’m also slightly afraid of overdesign: building an
exceedingly complex model that’s too hard to keep close to reality.
Thanks,
Ludo’.
More information about the nix-dev
mailing list