2021-03-14 17:50:12 +00:00
|
|
|
{ lib, stdenv, kernel, fetchFromGitHub, autoreconfHook, bison, flex, p7zip, rsync }:
|
2017-06-18 11:52:02 +00:00
|
|
|
|
2021-08-18 05:42:58 +00:00
|
|
|
stdenv.mkDerivation rec {
|
2019-08-13 21:52:01 +00:00
|
|
|
pname = "ply";
|
2021-08-18 05:42:58 +00:00
|
|
|
version = "2.1.1-${lib.substring 0 7 src.rev}";
|
|
|
|
|
2021-03-14 17:50:12 +00:00
|
|
|
nativeBuildInputs = [ autoreconfHook flex bison p7zip rsync ];
|
2017-06-14 22:25:46 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "iovisor";
|
|
|
|
repo = "ply";
|
2021-08-18 05:42:58 +00:00
|
|
|
rev = "e25c9134b856cc7ffe9f562ff95caf9487d16b59";
|
|
|
|
sha256 = "1178z7vvnjwnlxc98g2962v16878dy7bd0b2njsgn4vqgrnia7i5";
|
2017-06-14 22:25:46 +00:00
|
|
|
};
|
|
|
|
|
2017-06-15 19:30:12 +00:00
|
|
|
preAutoreconf = ''
|
2017-08-29 00:12:17 +00:00
|
|
|
# If kernel sources are a folder (i.e. fetched from git), we just copy them in
|
|
|
|
# Since they are owned by uid 0 and read-only, we need to fix permissions
|
|
|
|
if [ -d ${kernel.src} ]; then
|
|
|
|
cp -r ${kernel.src} linux-${kernel.version}
|
|
|
|
chown -R $(whoami): linux-${kernel.version}
|
|
|
|
chmod -R a+w linux-${kernel.version}
|
|
|
|
else
|
|
|
|
# ply wants to install header files to its build directory
|
|
|
|
# use 7z to handle multiple archive formats transparently
|
|
|
|
7z x ${kernel.src} -so | 7z x -aoa -si -ttar
|
|
|
|
fi
|
2017-06-18 11:52:02 +00:00
|
|
|
|
2017-06-15 19:30:12 +00:00
|
|
|
configureFlagsArray+=(--with-kerneldir=$(echo $(pwd)/linux-*))
|
|
|
|
./autogen.sh --prefix=$out
|
|
|
|
'';
|
2017-06-14 22:25:46 +00:00
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2021-08-15 10:22:35 +00:00
|
|
|
description = "Dynamic tracing in Linux";
|
2024-03-19 02:14:51 +00:00
|
|
|
mainProgram = "ply";
|
2020-04-01 01:11:51 +00:00
|
|
|
homepage = "https://wkz.github.io/ply/";
|
2021-08-18 05:42:23 +00:00
|
|
|
license = [ licenses.gpl2Only ];
|
2017-06-15 19:30:12 +00:00
|
|
|
maintainers = with maintainers; [ mic92 mbbx6spp ];
|
|
|
|
};
|
2017-06-14 22:25:46 +00:00
|
|
|
}
|