I’m trying to adapt the gist from https://gist.github.com/gtgteq/a3bae1c09c95196f6e2a767d08f62ad8 that installs droidcam to work on arbitrary kernels (I don’t like this pinning on kernel 4.9), so I tried to import from my configuration.nix the following file (the other nix files being the one from the gist):
I also tried to replace the kernel = ... with kernel = pkgs.linuxPackages_latest;, but the error is the same. Why don’t the new kernels have a .dev attribute? How can I fix this code accordingly?
Oh, it seems that the solution is simply to use instead kernel = config.boot.kernelPackages.kernel; (see the leading .kernel). However, I’m not sure if it’s the proper way to configure kernelPackages, as I can’t see lot’s of packages having that structure in nixpkgs. Is there a better way to define a kernel module?
pkgs in this case refers to the top-level package set. boot.config.kernelPackages refers to a nested package set.
This is how the module expression is able to receive a kernel input, as that package does exist within the kernelPackages package set, but doesn’t exist at the top level. Also, with nested package sets is that if they fail to find a dependency at the current package scope, they can always go to the parent scope and search for a dependency there.
Concerning the packaging @jtojnar how are we supposed to install properly this app without writting an expression for it ? (Even starting from the binaries) Even with buildFHS you can’t install kernel modules I guess (or it should be super dirty)!
Yes sure, I’m just curious to know if there is a dirty way to run that package if I don’t have time to write a nix expression for it and recompile from source (like can I use steam-run to load kernel modules?).