Add basic and chardev modules
This commit is contained in:
commit
e3c9144b8a
10 changed files with 298 additions and 0 deletions
32
flake.nix
Normal file
32
flake.nix
Normal file
|
@ -0,0 +1,32 @@
|
|||
{
|
||||
description = "Environnement de développement pour des modules noyaux Linux";
|
||||
|
||||
inputs = {
|
||||
nixpkgs.url = "github:NixOS/nixpkgs";
|
||||
flake-utils.url = "github:numtide/flake-utils";
|
||||
};
|
||||
|
||||
outputs = {
|
||||
nixpkgs,
|
||||
flake-utils,
|
||||
...
|
||||
}: flake-utils.lib.eachSystem flake-utils.lib.allSystems (system:
|
||||
let
|
||||
pkgs = import nixpkgs { inherit system; };
|
||||
|
||||
linux_dev = pkgs.linuxKernel.kernels.linux_zen.dev;
|
||||
in {
|
||||
devShells = {
|
||||
default = pkgs.mkShell {
|
||||
packages = [ linux_dev ];
|
||||
|
||||
LINUX_MODULES_FOLDER = "${linux_dev}/lib/modules/${linux_dev.modDirVersion}";
|
||||
|
||||
shellHook = ''
|
||||
echo "Current Linux Kernel used : ${linux_dev.version}"
|
||||
'';
|
||||
};
|
||||
};
|
||||
}
|
||||
);
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue