Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ 2 lib, 3 stdenv, 4 fetchFromGitHub, 5 perl, 6}: 7 8stdenv.mkDerivation { 9 pname = "FlameGraph"; 10 version = "2023-11-06"; 11 12 src = fetchFromGitHub { 13 owner = "brendangregg"; 14 repo = "FlameGraph"; 15 rev = "a96184c6939f8c6281fcd7285b54fba80555ac74"; 16 sha256 = "sha256-hvp1HxmgNbe85kxe0NyolFUd+kPPBDYAt+g2K8pE1Ak="; 17 }; 18 19 buildInputs = [ perl ]; 20 21 strictDeps = true; 22 23 installPhase = '' 24 runHook preInstall 25 26 mkdir -p $out/bin 27 for x in $src/*.pl $src/*.awk $src/dev/*.pl $src/dev/*.d; do 28 cp $x $out/bin 29 done 30 31 runHook postInstall 32 ''; 33 34 doCheck = true; 35 36 nativeCheckInputs = [ 37 perl 38 ]; 39 40 checkPhase = '' 41 runHook preCheck 42 patchShebangs --build ./test.sh 43 ./test.sh 44 runHook postCheck 45 ''; 46 47 meta = with lib; { 48 license = with licenses; [ 49 asl20 50 cddl 51 gpl2Plus 52 ]; 53 homepage = "https://www.brendangregg.com/flamegraphs.html"; 54 description = "Visualization for profiled code"; 55 mainProgram = "flamegraph.pl"; 56 platforms = platforms.unix; 57 }; 58}