nixpkgs/pkgs/os-specific/linux/powercap/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

36 lines
966 B
Nix
Raw Normal View History

2022-05-18 15:38:17 +00:00
{ lib, stdenv, fetchFromGitHub, fetchpatch, cmake }:
2021-03-25 15:10:57 +00:00
stdenv.mkDerivation rec {
pname = "powercap";
2022-08-01 06:56:11 +00:00
version = "0.6.0";
2021-03-25 15:10:57 +00:00
src = fetchFromGitHub {
owner = "powercap";
repo = "powercap";
rev = "v${version}";
2022-08-01 06:56:11 +00:00
sha256 = "sha256-l+IpFqBnCYUU825++sUPySD/Ku0TEIX2kt+S0Wml6iA=";
2021-03-25 15:10:57 +00:00
};
2022-05-18 15:38:17 +00:00
# in master post 0.6.0, see https://github.com/powercap/powercap/issues/8
patches = [
(fetchpatch {
name = "fix-pkg-config.patch";
url = "https://github.com/powercap/powercap/commit/278dceb51635686e343edfc357b6020533fff299.patch";
sha256 = "0h62j63xdn0iqyx4xbia6hlmdjn45camb82z4vv6sb37x9sph7rg";
})
];
2021-03-25 15:10:57 +00:00
nativeBuildInputs = [ cmake ];
cmakeFlags = [
"-DBUILD_SHARED_LIBS=On"
];
meta = with lib; {
description = "Tools and library to read/write to the Linux power capping framework (sysfs interface)";
license = licenses.bsd3;
platforms = platforms.linux;
maintainers = with maintainers; [ rowanG077 ];
};
}