[Nix-dev] Patching uname in stdenv?

Shea Levy shea at shealevy.com
Wed Aug 17 16:43:03 CEST 2011


On 08/17/2011 04:45 AM, Lluís Batlle i Rossell wrote:
> On Wed, Aug 17, 2011 at 11:16:12AM +0400, Michael Raskin wrote:
>>> Hi all,
>>>
>>> What would people think of a patch that made stdenv's uname return the
>>> same value on every linux? I've only just had the idea and haven't had
>>> time to think through the possible downsides, but my initial thought is
>>> that most packages shouldn't need to know the kernel version, and that
>>> those that have a reason to (e.g. packages that provide kernel modules)
>>> should be dependent on the kernel passed to the nix expression, rather
>>> than whatever the kernel happens to be in memory at a given time. Or am I
>>> wrong? Is there a reason a build should depend on which version of the
>> I guess default uname should say version of kernel from kernelheaders
>> used for glibc, and kernelPackages one should say the kernel version
>> of the passed kernel?
> I'd like a list of the problems this would solve.
>
> Regards,
> Lluís.
Two problems that I know of so far: openjdk fails to build without a 
patch on linux >= 3.0, and firefox fails to build on the same kernel 
versions. In general, the idea that a build has any need to know the 
current running kernel (beyond the fact that it's newer than a certain 
baseline, perhaps) is suspect to me, though I'll admit I don't have much 
knowledge in that area.



More information about the nix-dev mailing list