depot/third_party/nixpkgs/pkgs/os-specific/linux/oxtools/default.nix
Default email f34ce41345 Project import generated by Copybara.
GitOrigin-RevId: b73c2221a46c13557b1b3be9c2070cc42cf01eb3
2024-07-27 08:49:29 +02:00

36 lines
841 B
Nix

{ lib, stdenv, fetchFromGitHub
, glibc, python3
}:
stdenv.mkDerivation (finalAttrs: {
pname = "0xtools";
version = "2.0.2";
src = fetchFromGitHub {
owner = "tanelpoder";
repo = "0xtools";
rev = "v${finalAttrs.version}";
hash = "sha256-S2jGF6wyjE9okbren/+p37zDr+eHUE8gJe/sbsXX4f4=";
};
postPatch = ''
substituteInPlace lib/0xtools/psnproc.py \
--replace /usr/include/asm/unistd_64.h ${glibc.dev}/include/asm/unistd_64.h
'';
buildInputs = [ python3 ];
makeFlags = [ "PREFIX=${placeholder "out"}" ];
preInstall = ''
mkdir -p $out/bin
'';
meta = with lib; {
description = "Utilities for analyzing application performance";
homepage = "https://0x.tools";
license = licenses.gpl2Plus;
maintainers = with maintainers; [ astro ];
platforms = [ "x86_64-linux" ];
};
})