2022-08-02 17:42:39 +00:00
|
|
|
{ lib, stdenv, fetchgit, fetchpatch, 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}";
|
2022-08-02 17:42:39 +00:00
|
|
|
version = "2.13.4";
|
2013-07-04 20:34:32 +00:00
|
|
|
|
2022-08-02 17:42:39 +00:00
|
|
|
src = fetchgit {
|
|
|
|
url = "https://git.lttng.org/lttng-modules.git";
|
|
|
|
rev = "v${version}";
|
|
|
|
hash = "sha256-J2Tr1vOiCAilmnf3attF3bz8Irn9IQ2QbapdXJ4MUSg=";
|
2013-07-04 20:34:32 +00:00
|
|
|
};
|
|
|
|
|
2022-08-02 17:42:39 +00:00
|
|
|
patches = [
|
|
|
|
# fix: mm/page_alloc: fix tracepoint mm_page_alloc_zone_locked() (v5.19)
|
|
|
|
(fetchpatch {
|
|
|
|
url = "https://git.lttng.org/?p=lttng-modules.git;a=patch;h=6229bbaa423832f6b7c7a658ad11e1d4242752ff";
|
|
|
|
hash = "sha256-pqbKxBzjfN20wfsqSeBLXNQ+/U+3qk9RfTiT32OwSIc=";
|
|
|
|
})
|
|
|
|
|
|
|
|
# fix: fs: Remove flags parameter from aops->write_begin (v5.19)
|
|
|
|
(fetchpatch {
|
|
|
|
url = "https://git.lttng.org/?p=lttng-modules.git;a=patch;h=5e2f832d59d51589ab69479c7db43c7581fb9346";
|
|
|
|
hash = "sha256-auoCbvFEVR76sOCLjIe+q/Q+vunQlR3G3gVcjqAGGPk=";
|
|
|
|
})
|
|
|
|
|
|
|
|
# fix: workqueue: Fix type of cpu in trace event (v5.19)
|
|
|
|
(fetchpatch {
|
|
|
|
url = "https://git.lttng.org/?p=lttng-modules.git;a=patch;h=c6da9604b1666780ea4725b3b3d1bfa1548f9c89";
|
|
|
|
hash = "sha256-qoTwy+P32qg1L+JctqM1+70OkeTbnbL3QJ9LwaBq/bw=";
|
|
|
|
})
|
|
|
|
|
|
|
|
# fix: net: skb: introduce kfree_skb_reason() (v5.15.58..v5.16)
|
|
|
|
(fetchpatch {
|
|
|
|
url = "https://git.lttng.org/?p=lttng-modules.git;a=patch;h=96c477dabaaf6cd1734bebe0972fef877e5a463b";
|
|
|
|
hash = "sha256-b7BhrYZ5SZqeRVGEu0Eo9GfbcZdDPrgEnOl2XU3z+ds=";
|
|
|
|
})
|
|
|
|
];
|
|
|
|
|
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
|
|
|
|
2019-10-30 02:23:29 +00:00
|
|
|
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 ];
|
|
|
|
};
|
|
|
|
}
|