1 { lib, stdenv, kernel, fetchFromGitHub, autoreconfHook, bison, flex, p7zip, rsync }:
3 stdenv.mkDerivation rec {
5 version = "2.1.1-${lib.substring 0 7 src.rev}";
7 nativeBuildInputs = [ autoreconfHook flex bison p7zip rsync ];
9 src = fetchFromGitHub {
12 rev = "e25c9134b856cc7ffe9f562ff95caf9487d16b59";
13 sha256 = "1178z7vvnjwnlxc98g2962v16878dy7bd0b2njsgn4vqgrnia7i5";
17 # If kernel sources are a folder (i.e. fetched from git), we just copy them in
18 # Since they are owned by uid 0 and read-only, we need to fix permissions
19 if [ -d ${kernel.src} ]; then
20 cp -r ${kernel.src} linux-${kernel.version}
21 chown -R $(whoami): linux-${kernel.version}
22 chmod -R a+w linux-${kernel.version}
24 # ply wants to install header files to its build directory
25 # use 7z to handle multiple archive formats transparently
26 7z x ${kernel.src} -so | 7z x -aoa -si -ttar
29 configureFlagsArray+=(--with-kerneldir=$(echo $(pwd)/linux-*))
30 ./autogen.sh --prefix=$out
34 description = "Dynamic tracing in Linux";
36 homepage = "https://wkz.github.io/ply/";
37 license = [ licenses.gpl2Only ];
38 maintainers = with maintainers; [ mic92 mbbx6spp ];