[Nix-dev] Patching uname in stdenv?
Lluís Batlle i Rossell
viriketo at gmail.com
Wed Aug 17 14:32:11 CEST 2011
On Wed, Aug 17, 2011 at 01:11:53PM +0200, Marco Maggesi wrote:
> On Aug 17, 2011, at 12:47 PM, Lluís Batlle i Rossell wrote:
> > BLCR should fail to work in kernels older to the kernelHeaders in nixpkgs. And
> > the kernelHeaders in nixpkgs should be the only determinant of what kernels blcr
> > can work on.
>
> This is interesting.
> I should consider your remark to improve my build scripts.
> The truth is that I don't understand the implementation details of BLCR.
> (And, to be honest, I try to keep myself away as much as possible from this kind of low-level details.)
The libc is built against some specific kernel headers (the linux API). That
linux API is also available in 'stdenv', so programs wanting linux-specific
things, have access to them. We use to update the version of kernel headers in
nixpkgs when we change gcc or the libc in stdenv, so, not often.
Linux claim to have an API always backward compatible. So if you build with the
API (kernel headers) of version 2.6.20, it means that the program should work
fine in any kernel equal or newer than 2.6.20.
It may be that some distributions have kernel variations or kernel API
variations that break that backward compatibility. And I bet there are programs
that make assumptions on the kernel API they use, either because they did not
use properly the kernel headers, or they decided code based on "uname" reports,
for example.
More information about the nix-dev
mailing list