2021-02-05 17:12:51 +00:00
|
|
|
{ lib, stdenv
|
2020-04-24 23:36:52 +00:00
|
|
|
, fetchFromGitHub
|
|
|
|
, libelfin
|
|
|
|
, ncurses
|
|
|
|
, python3
|
2020-06-18 07:06:33 +00:00
|
|
|
, python3Packages
|
2020-04-24 23:36:52 +00:00
|
|
|
, makeWrapper
|
|
|
|
}:
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "coz";
|
|
|
|
version = "0.2.1";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "plasma-umass";
|
|
|
|
repo = "coz";
|
|
|
|
rev = version;
|
|
|
|
sha256 = "0val36yw987b1558iiyk3nqg0yy5k9y5wh49v91zj3cs58mmfyhc";
|
|
|
|
};
|
|
|
|
|
|
|
|
postPatch = ''
|
|
|
|
sed -i -e '/pid_t gettid/,+2d' libcoz/ccutil/thread.h
|
|
|
|
'';
|
|
|
|
|
|
|
|
postConfigure = ''
|
|
|
|
# This is currently hard-coded. Will be fixed in the next release.
|
|
|
|
sed -e "s|/usr/lib/|$out/lib/|" -i ./coz
|
|
|
|
'';
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
ncurses
|
|
|
|
makeWrapper
|
2020-06-18 07:06:33 +00:00
|
|
|
python3Packages.wrapPython
|
2020-04-24 23:36:52 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
buildInputs = [
|
|
|
|
libelfin
|
|
|
|
(python3.withPackages (p: [ p.docutils ]))
|
|
|
|
];
|
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
mkdir -p $out/share/man/man1
|
|
|
|
make install prefix=$out
|
|
|
|
|
|
|
|
# fix executable includes
|
|
|
|
chmod -x $out/include/coz.h
|
|
|
|
|
2020-06-18 07:06:33 +00:00
|
|
|
wrapPythonPrograms
|
2020-04-24 23:36:52 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
meta = {
|
|
|
|
homepage = "https://github.com/plasma-umass/coz";
|
2020-11-03 02:18:15 +00:00
|
|
|
description = "Profiler based on casual profiling";
|
2024-04-21 15:54:59 +00:00
|
|
|
mainProgram = "coz";
|
2021-02-05 17:12:51 +00:00
|
|
|
license = lib.licenses.bsd2;
|
|
|
|
maintainers = with lib.maintainers; [ zimbatm ];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|