6 stdenv.mkDerivation rec {
7 pname = "cpu-energy-meter";
10 src = fetchFromGitHub {
12 repo = "cpu-energy-meter";
14 hash = "sha256-QW65Z8mRYLHcyLeOtNAHjwPNWAUP214wqIYclK+whFw=";
18 substituteInPlace Makefile \
19 --replace "DESTDIR :=" "DESTDIR := $out" \
20 --replace "PREFIX := /usr/local" "PREFIX :="
23 buildInputs = [ libcap ];
25 env.NIX_CFLAGS_COMPILE = "-fcommon";
28 install -Dm444 -t $out/etc/udev/rules.d $src/debian/additional_files/59-msr.rules
32 description = "Tool for measuring energy consumption of Intel CPUs";
33 homepage = "https://github.com/sosy-lab/cpu-energy-meter";
34 changelog = "https://github.com/sosy-lab/cpu-energy-meter/blob/main/CHANGELOG.md";
35 maintainers = with maintainers; [ lorenzleutgeb ];
36 license = licenses.bsd3;
37 platforms = [ "x86_64-linux" ];
38 mainProgram = "cpu-energy-meter";