2023-02-02 21:20:50 +00:00
|
|
|
{ lib, stdenv, fetchFromGitHub, kernel }:
|
2013-07-04 20:34:32 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2021-06-05 13:53:12 +00:00
|
|
|
pname = "lttng-modules-${kernel.version}";
|
2024-05-28 09:27:29 +00:00
|
|
|
version = "2.13.13";
|
2013-07-04 20:34:32 +00:00
|
|
|
|
2023-02-02 21:20:50 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "lttng";
|
|
|
|
repo = "lttng-modules";
|
2022-08-02 17:42:39 +00:00
|
|
|
rev = "v${version}";
|
2024-05-28 09:27:29 +00:00
|
|
|
hash = "sha256-iA3B838EUU5rFWCL8BAubkTrTO1itDFp5d1653OPnS0=";
|
2013-07-04 20:34:32 +00:00
|
|
|
};
|
|
|
|
|
2022-02-10 02:13:55 +00:00
|
|
|
nativeBuildInputs = kernel.moduleBuildDependencies;
|
2018-06-07 10:44:56 +00:00
|
|
|
|
2016-02-26 17:38:15 +00:00
|
|
|
hardeningDisable = [ "pic" ];
|
2016-02-12 02:25:57 +00:00
|
|
|
|
2023-02-19 19:23:32 +00:00
|
|
|
env.NIX_CFLAGS_COMPILE = "-Wno-error=implicit-function-declaration";
|
2016-08-13 11:19:15 +00:00
|
|
|
|
2022-02-10 02:13:55 +00:00
|
|
|
makeFlags = kernel.makeFlags ++ [
|
|
|
|
"KERNELDIR=${kernel.dev}/lib/modules/${kernel.modDirVersion}/build"
|
|
|
|
"INSTALL_MOD_PATH=${placeholder "out"}"
|
|
|
|
];
|
2013-07-04 20:34:32 +00:00
|
|
|
|
2017-02-23 10:01:23 +00:00
|
|
|
installTargets = [ "modules_install" ];
|
|
|
|
|
|
|
|
enableParallelBuilding = true;
|
2013-07-04 20:34:32 +00:00
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2013-07-04 20:34:32 +00:00
|
|
|
description = "Linux kernel modules for LTTng tracing";
|
2020-04-01 01:11:51 +00:00
|
|
|
homepage = "https://lttng.org/";
|
2021-06-05 13:53:12 +00:00
|
|
|
license = with licenses; [ lgpl21Only gpl2Only mit ];
|
2013-07-04 20:34:32 +00:00
|
|
|
platforms = platforms.linux;
|
|
|
|
maintainers = [ maintainers.bjornfor ];
|
2023-02-02 21:20:50 +00:00
|
|
|
broken = (lib.versions.majorMinor kernel.modDirVersion) == "5.10" || (lib.versions.majorMinor kernel.modDirVersion) == "5.4";
|
2013-07-04 20:34:32 +00:00
|
|
|
};
|
|
|
|
}
|