maintainers: remove email for amuckstot30 (#360059)
[NixPkgs.git] / pkgs / os-specific / linux / ply / default.nix
blob0c8e323b434949019f500b0c3df8f8071463340d
1 { lib, stdenv, kernel, fetchFromGitHub, autoreconfHook, bison, flex, p7zip, rsync }:
3 stdenv.mkDerivation rec {
4   pname = "ply";
5   version = "2.1.1-${lib.substring 0 7 src.rev}";
7   nativeBuildInputs = [ autoreconfHook flex bison p7zip rsync ];
9   src = fetchFromGitHub {
10     owner = "iovisor";
11     repo = "ply";
12     rev = "e25c9134b856cc7ffe9f562ff95caf9487d16b59";
13     sha256 = "1178z7vvnjwnlxc98g2962v16878dy7bd0b2njsgn4vqgrnia7i5";
14   };
16   preAutoreconf = ''
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}
23     else
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
27     fi
29     configureFlagsArray+=(--with-kerneldir=$(echo $(pwd)/linux-*))
30     ./autogen.sh --prefix=$out
31   '';
33   meta = with lib; {
34     description = "Dynamic tracing in Linux";
35     mainProgram = "ply";
36     homepage = "https://wkz.github.io/ply/";
37     license = [ licenses.gpl2Only ];
38     maintainers = with maintainers; [ mic92 mbbx6spp ];
39   };