[Nix-dev] Re: [Nix-commits] SVN commit: nix - 18468 - NicolasPierron - nixpkgs/branches/stdenv-updates/pkgs/lib

Nicolas Pierron nicolas.b.pierron at gmail.com
Fri Nov 20 10:51:37 CET 2009


Hi Ludovic,

On Thu, Nov 19, 2009 at 23:29, Ludovic Courtès <ludo at gnu.org> wrote:
> 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?

Ask a MAC user ... whatever, I've added apple because, while searching
"darwin" inside the config.guess script of gcc,  I've found that
darwin was defined as " *-apple-darwin ".  So I don't know, but this
seems to hurt MAC users if you told them they have a PC. (
http://www.youtube.com/watch?v=C5z0Ia5jDt4 )

>> 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.

Except if you are downloading a pre-compiled version.

>> 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”?

Unfortunately it is not.  This is just a guess because (in general)
the string is not expressive enough to infer such thing.

> 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.

Could you develop what you are afraid of?

-- 
Nicolas Pierron
http://www.linkedin.com/in/nicolasbpierron - http://nbp.name/
Donald Knuth - I can't go to a restaurant because I keep looking at
the fonts on the menu.



More information about the nix-dev mailing list