{ lib, stdenvNoCC, pkgs, config }: stdenvNoCC.mkDerivation rec { pname = "perf-flamegraph-pid"; src = ./perf-flamegraph-pid.sh; version = "0.1.0"; nativeBuildInputs = 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 ]; }; }