2023-02-09 11:40:11 +00:00
|
|
|
{ lib, stdenv, fetchFromGitHub, kernel }:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2021-06-28 23:13:55 +00:00
|
|
|
pname = "lttng-modules-${kernel.version}";
|
2023-02-09 11:40:11 +00:00
|
|
|
version = "2.13.8";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2023-02-09 11:40:11 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "lttng";
|
|
|
|
repo = "lttng-modules";
|
2022-08-12 12:06:08 +00:00
|
|
|
rev = "v${version}";
|
2023-02-09 11:40:11 +00:00
|
|
|
hash = "sha256-6ohWsGUGFz7QlHkKWyW5edpSsBTE9DFS3v6EsH9wNZo=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2022-03-30 09:31:56 +00:00
|
|
|
nativeBuildInputs = kernel.moduleBuildDependencies;
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
hardeningDisable = [ "pic" ];
|
|
|
|
|
2023-03-04 12:14:45 +00:00
|
|
|
env.NIX_CFLAGS_COMPILE = "-Wno-error=implicit-function-declaration";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2022-03-30 09:31:56 +00:00
|
|
|
makeFlags = kernel.makeFlags ++ [
|
|
|
|
"KERNELDIR=${kernel.dev}/lib/modules/${kernel.modDirVersion}/build"
|
|
|
|
"INSTALL_MOD_PATH=${placeholder "out"}"
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
installTargets = [ "modules_install" ];
|
|
|
|
|
|
|
|
enableParallelBuilding = true;
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "Linux kernel modules for LTTng tracing";
|
|
|
|
homepage = "https://lttng.org/";
|
2021-06-28 23:13:55 +00:00
|
|
|
license = with licenses; [ lgpl21Only gpl2Only mit ];
|
2020-04-24 23:36:52 +00:00
|
|
|
platforms = platforms.linux;
|
|
|
|
maintainers = [ maintainers.bjornfor ];
|
2023-02-09 11:40:11 +00:00
|
|
|
broken = (lib.versions.majorMinor kernel.modDirVersion) == "5.10" || (lib.versions.majorMinor kernel.modDirVersion) == "5.4";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|