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