at 23.05-pre 35 lines 966 B view raw
1{ lib, stdenv, fetchFromGitHub, fetchpatch, cmake }: 2 3stdenv.mkDerivation rec { 4 pname = "powercap"; 5 version = "0.6.0"; 6 7 src = fetchFromGitHub { 8 owner = "powercap"; 9 repo = "powercap"; 10 rev = "v${version}"; 11 sha256 = "sha256-l+IpFqBnCYUU825++sUPySD/Ku0TEIX2kt+S0Wml6iA="; 12 }; 13 14 # in master post 0.6.0, see https://github.com/powercap/powercap/issues/8 15 patches = [ 16 (fetchpatch { 17 name = "fix-pkg-config.patch"; 18 url = "https://github.com/powercap/powercap/commit/278dceb51635686e343edfc357b6020533fff299.patch"; 19 sha256 = "0h62j63xdn0iqyx4xbia6hlmdjn45camb82z4vv6sb37x9sph7rg"; 20 }) 21 ]; 22 23 nativeBuildInputs = [ cmake ]; 24 25 cmakeFlags = [ 26 "-DBUILD_SHARED_LIBS=On" 27 ]; 28 29 meta = with lib; { 30 description = "Tools and library to read/write to the Linux power capping framework (sysfs interface)"; 31 license = licenses.bsd3; 32 platforms = platforms.linux; 33 maintainers = with maintainers; [ rowanG077 ]; 34 }; 35}