lol
1{ lib, stdenv, fetchurl, fetchpatch, libxml2, ncurses, bison, flex }:
2
3stdenv.mkDerivation rec {
4 pname = "tiptop";
5 version = "2.3.1";
6
7 src = fetchurl {
8 url = "${meta.homepage}/releases/${pname}-${version}.tar.gz";
9 sha256 = "10j1138y3cj3hsmfz4w0bmk90523b0prqwi9nhb4z8xvjnf49i2i";
10 };
11
12 patches = [
13 (fetchpatch {
14 name = "reproducibility.patch";
15 url = "https://salsa.debian.org/debian/tiptop/raw/debian/2.3.1-1/debian/patches/0001-fix-reproducibility-of-build-process.patch";
16 sha256 = "116l7n3nl9lj691i7j8x0d0za1i6zpqgghw5d70qfpb17c04cblp";
17 })
18
19 # Pull upstream patch for ncurses-6.3
20 (fetchpatch {
21 name = "ncurses-6.3.patch";
22 url = "https://gitlab.inria.fr/rohou/tiptop/-/commit/a78234c27fdd62fed09430d998950e49e11a1832.patch";
23 sha256 = "1k55agdri7iw3gwm4snj3ps62qzmxlqr6s0868l8qamjw38z9g00";
24 })
25 ];
26
27 postPatch = ''
28 substituteInPlace ./configure --replace -lcurses -lncurses
29 '';
30
31 nativeBuildInputs = [ flex bison ];
32 buildInputs = [ libxml2 ncurses ];
33
34 NIX_CFLAGS_COMPILE = "-I${libxml2.dev}/include/libxml2";
35
36 meta = with lib; {
37 description = "Performance monitoring tool for Linux";
38 homepage = "http://tiptop.gforge.inria.fr";
39 license = licenses.gpl2;
40 platforms = platforms.linux;
41 maintainers = [ maintainers.vcunat ];
42 };
43}
44