about summary refs log tree commit diff
path: root/tools/perf-flamegraph-pid/default.nix
blob: 0cd0a1b9dd3cc4b3c9b3a82d1b6fc14cedf3d87a (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
{ lib, stdenvNoCC, pkgs }:

stdenvNoCC.mkDerivation rec {
  pname = "perf-flamegraph-pid";
  src = ./perf-flamegraph-pid.sh;
  version = "0.1.0";

  nativeBuildInputs = with pkgs; [ flamegraph linuxPackages_latest.perf ];
  propagatedBuildInputs = with pkgs; [ flamegraph linuxPackages_latest.perf ];

  dontUnpack = true;
  dontBuild = true;

  installPhase = ''
    mkdir -p $out/bin
    cp $src $out/bin/${pname}
  '';

  meta = with lib; {
    description = "Generate a process' flame graph.";
    license = with licenses; [ mit ];
    platforms = platforms.unix;
    maintainers = with maintainers; [ fcuny ];
  };
}