Compile Linux out-of-tree Module on NixOS in a Nix shell with an FHS Environment
In an earlier post, I talked about how you can build an out-of-tree Linux kernel module in a Nix derivation, i.e., package it in Nix. However, for quick prototyping, sometimes you want to just enter $ make in your shell, for example to check if everything compiles. Out-of-tree module projects following the recommended guidelines use a Makefile, possibly an additional KBuild file, and of course C source and header files. This header file Read more…