depot/third_party/nixpkgs/pkgs/tools/system/autocpu-freq/default.nix
Default email 2969ca571a Project import generated by Copybara.
GitOrigin-RevId: 257cbbcd3ab7bd96f5d24d50adc807de7c82e06d
2021-01-09 11:05:03 +01:00

34 lines
929 B
Nix

{ stdenv, python3Packages, fetchFromGitHub }:
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 stdenv.lib; {
homepage = "https://github.com/AdnanHodzic/auto-cpufreq";
description = "Automatic CPU speed & power optimizer for Linux";
license = licenses.lgpl3Plus;
platforms = platforms.linux;
maintainers = [ maintainers.Technical27 ];
};
}