1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-11-18 03:30:45 +00:00

coz: 0.2.1 -> 0.2.2 (#349202)

This commit is contained in:
Jonas Chevalier 2024-10-18 13:42:05 +02:00 committed by GitHub
commit babe2c97ed
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -1,50 +1,46 @@
{ lib, stdenv {
, fetchFromGitHub lib,
, libelfin docutils,
, ncurses fetchFromGitHub,
, python3 libelfin,
, python3Packages ncurses,
, makeWrapper pkg-config,
python3Packages,
makeWrapper,
}: }:
stdenv.mkDerivation rec {
python3Packages.buildPythonApplication rec {
pname = "coz"; pname = "coz";
version = "0.2.1"; version = "0.2.2";
pyproject = false; # Built with make
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "plasma-umass"; owner = "plasma-umass";
repo = "coz"; repo = "coz";
rev = version; rev = version;
hash = "sha256-DHpXKyqaDflD2olAXnyaxXvwsB3Tx4hKCeugxL0ZVG0="; hash = "sha256-tvFXInxjodB0jEgEKgnOGapiVPomBG1hvrhYtG2X5jI=";
}; };
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 = [ nativeBuildInputs = [
pkg-config
ncurses ncurses
makeWrapper docutils
python3Packages.wrapPython
]; ];
buildInputs = [ buildInputs = [
ncurses
libelfin libelfin
(python3.withPackages (p: [ p.docutils ]))
]; ];
installPhase = '' dependencies = [ python3Packages.docutils ];
mkdir -p $out/share/man/man1
make install prefix=$out
# fix executable includes makeFlags = [ "prefix=${placeholder "out"}" ];
strictDeps = true;
# fix executable includes
postInstall = ''
chmod -x $out/include/coz.h chmod -x $out/include/coz.h
wrapPythonPrograms
''; '';
meta = { meta = {
@ -52,6 +48,9 @@ stdenv.mkDerivation rec {
description = "Profiler based on casual profiling"; description = "Profiler based on casual profiling";
mainProgram = "coz"; mainProgram = "coz";
license = lib.licenses.bsd2; license = lib.licenses.bsd2;
maintainers = with lib.maintainers; [ zimbatm ]; maintainers = with lib.maintainers; [
zimbatm
aleksana
];
}; };
} }