tangled
alpha
login
or
join now
pyrox.dev
/
nixpkgs
lol
0
fork
atom
overview
issues
pulls
pipelines
lkrg: init at 0.9.5
Hubert Jasudowicz
3 years ago
4a7925fc
bc5ad970
+55
2 changed files
expand all
collapse all
unified
split
pkgs
os-specific
linux
lkrg
default.nix
top-level
linux-kernels.nix
+53
pkgs/os-specific/linux/lkrg/default.nix
···
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
···
1
+
{ lib, stdenv, fetchpatch, fetchFromGitHub, kernel }:
2
+
let
3
+
isKernelRT = (kernel.structuredExtraConfig ? PREEMPT_RT) && (kernel.structuredExtraConfig.PREEMPT_RT == lib.kernel.yes);
4
+
in
5
+
stdenv.mkDerivation rec {
6
+
name = "${pname}-${version}-${kernel.version}";
7
+
pname = "lkrg";
8
+
version = "0.9.5";
9
+
10
+
src = fetchFromGitHub {
11
+
owner = "lkrg-org";
12
+
repo = "lkrg";
13
+
rev = "v${version}";
14
+
sha256 = "sha256-+yIKkTvfVbLnFBoXSKGebB1A8KqpaRmsLh8SsNuI9Dc=";
15
+
};
16
+
patches = [
17
+
(fetchpatch {
18
+
name = "fix-aarch64.patch";
19
+
url = "https://github.com/lkrg-org/lkrg/commit/a4e5c00f13f7081b346bc3736e4c035e3d17d3f7.patch";
20
+
sha256 = "sha256-DPscqi+DySHwFxGuGe7P2itPkoyb3XGu5Xp2S/ezP4Y=";
21
+
})
22
+
];
23
+
24
+
hardeningDisable = [ "pic" ];
25
+
26
+
nativeBuildInputs = kernel.moduleBuildDependencies;
27
+
28
+
makeFlags = kernel.makeFlags ++ [
29
+
"KERNEL=${kernel.dev}/lib/modules/${kernel.modDirVersion}/build"
30
+
];
31
+
32
+
dontConfigure = true;
33
+
34
+
prePatch = ''
35
+
substituteInPlace Makefile --replace "KERNEL := " "KERNEL ?= "
36
+
'';
37
+
38
+
installPhase = ''
39
+
runHook preInstall
40
+
install -D lkrg.ko $out/lib/modules/${kernel.modDirVersion}/extra/lkrg.ko
41
+
runHook postInstall
42
+
'';
43
+
44
+
meta = with lib; {
45
+
description = "LKRG Linux Kernel module";
46
+
longDescription = "LKRG performs runtime integrity checking of the Linux kernel and detection of security vulnerability exploits against the kernel.";
47
+
homepage = "https://lkrg.org/";
48
+
license = licenses.gpl2Only;
49
+
maintainers = with maintainers; [ chivay ];
50
+
platforms = platforms.linux;
51
+
broken = kernel.kernelOlder "5.10" || kernel.kernelAtLeast "6.1" || isKernelRT;
52
+
};
53
+
}
+2
pkgs/top-level/linux-kernels.nix
···
336
337
liquidtux = callPackage ../os-specific/linux/liquidtux {};
338
0
0
339
v4l2loopback = callPackage ../os-specific/linux/v4l2loopback { };
340
341
lttng-modules = callPackage ../os-specific/linux/lttng-modules { };
···
336
337
liquidtux = callPackage ../os-specific/linux/liquidtux {};
338
339
+
lkrg = callPackage ../os-specific/linux/lkrg {};
340
+
341
v4l2loopback = callPackage ../os-specific/linux/v4l2loopback { };
342
343
lttng-modules = callPackage ../os-specific/linux/lttng-modules { };