This commit is contained in:
2026-07-25 17:39:39 +02:00
parent c79d2fef9a
commit c8d3a770bc
12 changed files with 1630 additions and 30 deletions
+28
View File
@@ -0,0 +1,28 @@
{ stdenv, kernel }:
stdenv.mkDerivation {
pname = "cpuid_fault_emulation";
version = "0.1";
src = ./source;
nativeBuildInputs = kernel.moduleBuildDependencies;
hardeningDisable = [
"pic"
"format"
];
# Patch the hardcoded host paths to point into the Nix store
postPatch = ''
substituteInPlace Makefile \
--replace '/lib/modules/$(KERNEL)/build' '${kernel.dev}/lib/modules/${kernel.modDirVersion}/build' \
--replace '$(shell uname -r)' '${kernel.modDirVersion}'
'';
installPhase = ''
install -D cpuid_fault_emulation.ko \
$out/lib/modules/${kernel.modDirVersion}/extra/cpuid_fault_emulation.ko
'';
meta.platforms = [ "x86_64-linux" ];
}