config/packages/networking/evil/default.nix
2023-06-15 16:24:28 +02:00

30 lines
817 B
Nix

{ stdenv, fetchFromGitHub, kernel }:
stdenv.mkDerivation rec {
pname = "evil";
version = "1.0.0";
name = "${pname}-${kernel.version}-${version}";
src = fetchFromGitHub {
owner = "alwilson";
repo = pname;
rev = "096ba9bf408fc714dc09a2e41be9ec03fc50ee4a";
sha256 = "sha256-t0iJwIIThNkCcR2P1kJRdffcY6HmFg5qvJeXQhPfy6U=";
};
nativeBuildInputs = kernel.moduleBuildDependencies;
makeFlags = kernel.makeFlags ++ [
"KDIR=${kernel.dev}/lib/modules/${kernel.modDirVersion}/build"
"KVER=${kernel.modDirVersion}"
"KERNEL_MODLIB=$(out)/lib/modules/${kernel.modDirVersion}"
"INCLUDEDIR=$(out)/include"
];
installPhase = ''
installDir=$out/lib/modules/${kernel.modDirVersion}/extra
xz evil.ko
install -d $installDir
install -m644 evil.ko.xz $installDir
'';
}