[Nix-dev] Building linux kernle with manual-config.nix

Sergey Mironov grrwlf at gmail.com
Fri Mar 7 09:17:50 CET 2014


Hi. I am trying to build my own minimalistic kernel with `buildLinux'
defined in kernel/manual-config.nix. I've written the wrapper
expression as follows:

# linuxHandMade.nix
{ stdenv, fetchurl, buildLinux } :

buildLinux rec {

  version = "3.10.28";

  src = fetchurl {
    url = "mirror://kernel/linux/kernel/v3.x/linux-${version}.tar.xz";
    sha256 = "1blzvr3qywi8wxgl28zsn5djwgvw70yh3i6qjh2sz3zk9gnpd6mq";
  };

  configfile = ./linux-config;

  allowImportFromDerivation = true;
}

where ./linux-config is the .config I have built manually by unpacking
kernel sources and doing 'make menuconfig'. Everything was OK until I
disabled the loadable modules support. The ./linux-config now contains
"# CONFIG_MODULES is not set" and kernel/manual-config.nix doesn't
work. The error is quite obscure:

$ nix-build econat.nix -A linuxHandMade  --show-trace
error: while evaluating `callPackageWith' at
`/home/grwlf/proj/nixpkgs-econat/lib/customisation.nix:95:35':
while evaluating `makeOverridable' at
`/home/grwlf/proj/nixpkgs-econat/lib/customisation.nix:56:24':
while evaluating an anonymous function at
`/home/grwlf/proj/nixpkgs-econat/econat/apps/kernel.nix:1:1':
while evaluating an anonymous function at
`/home/grwlf/proj/nixpkgs-econat/pkgs/os-specific/linux/kernel/manual-config.nix:13:4':
while evaluating `mkDerivation' at
`/home/grwlf/proj/nixpkgs-econat/pkgs/stdenv/generic/default.nix:55:24':
while evaluating `addPassthru' at
`/home/grwlf/proj/nixpkgs-econat/lib/customisation.nix:100:22':
while evaluating an anonymous function at
`/nix/store/mf69pq5r5948h2q4wj4zfx69rn6zcfk4-nix-1.6.1/share/nix/corepkgs/derivation.nix:4:1':
value is null while a list was expected

I think I've already entered the purely-tested areas of Nixos but
still could anybody give me a clue of what may go wrong?

Regards,
Sergey


More information about the nix-dev mailing list