nixpkgs/pkgs/os-specific/linux/lttng-modules/default.nix

37 lines
1.1 KiB
Nix
Raw Normal View History

2014-10-21 20:23:55 +01:00
{ stdenv, fetchurl, kernel }:
assert stdenv.lib.versionAtLeast kernel.version "3.4"; # fails on 3.2
2014-10-21 20:46:17 +01:00
assert builtins.substring 0 4 kernel.version != "3.12";
stdenv.mkDerivation rec {
pname = "lttng-modules-${version}";
name = "${pname}-${kernel.version}";
2014-10-21 20:23:55 +01:00
version = "2.6.0-rc1"; # "git describe bf2ba318fff"
2014-10-21 20:23:55 +01:00
src = fetchurl {
url = "https://github.com/lttng/lttng-modules/archive/v${version}.tar.gz";
sha256 = "01gha02ybbzr86v6s6bqn649jiw5k89kb363b9s1iv8igrdlzhl1";
};
# from upstream ML, should be in the next release
patches = [ ./build-fix.patch ./6f0af2643c40b57280796eaa4fe60ce4f678b6dc.patch ];
preConfigure = ''
export KERNELDIR="${kernel.dev}/lib/modules/${kernel.modDirVersion}/build"
export INSTALL_MOD_PATH="$out"
'';
installPhase = ''
make modules_install
'';
meta = with stdenv.lib; {
description = "Linux kernel modules for LTTng tracing";
homepage = http://lttng.org/;
2014-10-22 23:13:31 +01:00
license = with licenses; [ lgpl21 gpl2 mit ];
platforms = platforms.linux;
maintainers = [ maintainers.bjornfor ];
};
}