vifm: 0.13 -> 0.14 (#380559)
[NixPkgs.git] / pkgs / by-name / fa / fatrace / package.nix
blob9ec50157eda323d74cd8be85086b9f9e37bfece6
2   lib,
3   stdenv,
4   fetchFromGitHub,
5   python3,
6   which,
7 }:
9 stdenv.mkDerivation rec {
10   pname = "fatrace";
11   version = "0.18.0";
13   src = fetchFromGitHub {
14     owner = "martinpitt";
15     repo = pname;
16     rev = version;
17     sha256 = "sha256-QkavhxORENQSLUg4tq+W1WB7zSYYinWOOYPqNbv+pEI=";
18   };
20   buildInputs = [
21     python3
22     which
23   ];
25   postPatch = ''
26     substituteInPlace power-usage-report \
27       --replace "'which'" "'${which}/bin/which'"
28   '';
30   makeFlags = [ "PREFIX=$(out)" ];
32   meta = with lib; {
33     description = "Report system-wide file access events";
34     homepage = "https://github.com/martinpitt/fatrace";
35     license = licenses.gpl3Plus;
36     longDescription = ''
37       fatrace reports file access events from all running processes.
38       Its main purpose is to find processes which keep waking up the disk
39       unnecessarily and thus prevent some power saving.
40       Requires a Linux kernel with the FANOTIFY configuration option enabled.
41       Enabling X86_MSR is also recommended for power-usage-report on x86.
42     '';
43     platforms = platforms.linux;
44   };