1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-11-24 14:41:17 +00:00
nixpkgs/pkgs/tools/system/autocpu-freq/default.nix

35 lines
927 B
Nix
Raw Normal View History

{ lib, stdenv, python3Packages, fetchFromGitHub }:
2020-12-15 21:47:51 +00:00
python3Packages.buildPythonPackage rec {
pname = "auto-cpufreq";
version = "1.5.1";
src = fetchFromGitHub {
owner = "AdnanHodzic";
repo = pname;
rev = "v${version}";
sha256 = "uVhftO6AqFnZ0uaEYRAPvVskkouNOXPtNVYXx7WJKyw=";
};
propagatedBuildInputs = with python3Packages; [ click distro psutil ];
doCheck = false;
pythonImportsCheck = [ "source" ];
# patch to prevent script copying and to disable install
patches = [ ./prevent-install-and-copy.patch ];
postInstall = ''
# copy script manually
cp ${src}/scripts/cpufreqctl.sh $out/bin/cpufreqctl
'';
meta = with lib; {
2020-12-15 21:47:51 +00:00
homepage = "https://github.com/AdnanHodzic/auto-cpufreq";
description = "Automatic CPU speed & power optimizer for Linux";
license = licenses.lgpl3Plus;
platforms = platforms.linux;
maintainers = [ maintainers.Technical27 ];
};
}