Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at devShellTools-shell 40 lines 851 B view raw
1{ 2 lib, 3 stdenv, 4 fetchFromGitHub, 5 glibc, 6 python3, 7}: 8 9stdenv.mkDerivation (finalAttrs: { 10 pname = "0xtools"; 11 version = "2.0.3"; 12 13 src = fetchFromGitHub { 14 owner = "tanelpoder"; 15 repo = "0xtools"; 16 rev = "v${finalAttrs.version}"; 17 hash = "sha256-QWH3sKYFiEWuexZkMlyWQPHmKJpcaiWI5szhdx5yKtM="; 18 }; 19 20 postPatch = '' 21 substituteInPlace lib/0xtools/psnproc.py \ 22 --replace /usr/include/asm/unistd_64.h ${glibc.dev}/include/asm/unistd_64.h 23 ''; 24 25 buildInputs = [ python3 ]; 26 27 makeFlags = [ "PREFIX=${placeholder "out"}" ]; 28 29 preInstall = '' 30 mkdir -p $out/bin 31 ''; 32 33 meta = with lib; { 34 description = "Utilities for analyzing application performance"; 35 homepage = "https://0x.tools"; 36 license = licenses.gpl2Plus; 37 maintainers = with maintainers; [ astro ]; 38 platforms = [ "x86_64-linux" ]; 39 }; 40})