about summary refs log tree commit diff
path: root/nixpkgs/pkgs/by-name/li/likwid/package.nix
blob: 95fe029044fa260c8d55ca502e43123ca31fc2ea (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
{ lib
, stdenv
, fetchurl
, perl
, substituteAll
, coreutils
, gnugrep
}:

stdenv.mkDerivation rec {
  pname = "likwid";
  version = "5.3.0";

  src = fetchurl {
    url = "https://ftp.fau.de/pub/likwid/likwid-${version}.tar.gz";
    hash = "sha256-wpDlVMQlMSSsKriwVuFO5NI5ZrjJ+/oQuoH3WuVDzk4=";
  };

  nativeBuildInputs = [ perl ];

  hardeningDisable = [ "format" ];

  patches = [
    ./nosetuid.patch
    (substituteAll {
      src = ./cat-grep-sort-wc.patch;
      coreutils = "${coreutils}/bin/";
      gnugrep = "${gnugrep}/bin/";
    })
  ];

  postPatch = "patchShebangs bench/ perl/";

  makeFlags = [ "PREFIX=$(out)" ];

  meta = with lib; {
    homepage = "https://hpc.fau.de/research/tools/likwid/";
    description = "Performance monitoring and benchmarking suite";
    license = licenses.gpl3Only;
    # Might work on ARM by appropriately setting COMPILER in config.mk
    platforms = intersectLists platforms.linux platforms.x86;
    maintainers = [ maintainers.vbgl ];
    mainProgram = "likwid-perfctr";
  };
}