[Nix-dev] Kernel headers

Michael Raskin 7c6f434c at mail.ru
Thu Aug 14 16:14:05 CEST 2008


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Pjotr Prins wrote:
| I have a basic question. I have created a Kernel_headers expression for
| 2.6.18. How do I override the NIX build without changing:
|
|    kernelHeaders = kernelHeaders_2_6_23;
|
| to:
|
|    kernelHeaders = kernelHeaders_2_6_18;
|
| In other words, what switch to I pass nix-build/nix-env -i to
| ascertain headers 2.6.18 without changing the default line in
| all-packages.nix? I would like to keep the SVN tree generic.

Write something like

kernelHeaders =
~  let kernelHeadersVersion = getConfig
~                               ["kernelHeaders" "version"]
~                               "2.6.23";
~  in
~    if kernelHeadersVersion == "2.6.23" then
~      kernelHeaders_2_6_23 else
~    if kernelHeadersVersion == "2.6.22" then
~      kernelHeaders_2_6_22 else
~    if kernelHeadersVersion == "2.6.18" then
~      kernelHeaders_2_6_18 else
~    abort "Unknown kernelHeaders version.";

I think it will be an acceptable modification to commit.. Better naming
may be needed, though.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iQEcBAEBAgAGBQJIpD2rAAoJEE6tnN0aWvw3kUAIALeXONfv86LSM5iYmxkBmMXM
nqkZRpUNr1xFY3mmZDyA7ML3Tv6OQt7tSgIQYYyb/WN68Emmy/OODYWY1FPLCy4p
Zg6VHU/qvMl7bWq44Vf6CKps4NpbxiATLuIXFA70KH51N+r77AEkqPdNeh3OG5i7
nTnJ6u9eDfEuo3rZDhHmd0Wv7R+mVj6hBQsb6RTVom55T1IX1p/BivmtaZD3EXJ8
Ju8Jdv9xI+r0p+pubnMbyl/HICQAIkQA9KM8gLd7WbDdf6BxM5KGhOtCR3gg4uix
NjDqruua4Hw5iAoZIja62LZC5rbH8Bd+dagxe2cSyzHKzMYlT98AcK5RQNLwNj8=
=R9FQ
-----END PGP SIGNATURE-----



More information about the nix-dev mailing list