2022-07-14 12:49:19 +00:00
|
|
|
{lib, stdenv, fetchurl}:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "limitcpu";
|
2024-06-05 15:53:02 +00:00
|
|
|
version = "3.1";
|
2022-07-14 12:49:19 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
url = "mirror://sourceforge/limitcpu/cpulimit-${version}.tar.gz";
|
2024-06-05 15:53:02 +00:00
|
|
|
sha256 = "sha256-lGmU7GDznwMJW4m9dOZguJwUyCq6dUVmk5jjArx7I0w=";
|
2022-07-14 12:49:19 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
buildFlags = with stdenv; [ (
|
|
|
|
if isDarwin then "osx"
|
|
|
|
else if isFreeBSD then "freebsd"
|
|
|
|
else "cpulimit"
|
|
|
|
) ];
|
|
|
|
|
|
|
|
installFlags = [ "PREFIX=$(out)" ];
|
|
|
|
|
|
|
|
meta = with lib; {
|
2023-02-02 18:25:31 +00:00
|
|
|
homepage = "https://limitcpu.sourceforge.net/";
|
2024-06-20 14:57:18 +00:00
|
|
|
description = "Tool to throttle the CPU usage of programs";
|
2022-07-14 12:49:19 +00:00
|
|
|
platforms = with platforms; linux ++ freebsd;
|
2024-05-15 15:35:15 +00:00
|
|
|
license = licenses.gpl2Only;
|
2022-07-14 12:49:19 +00:00
|
|
|
maintainers = [maintainers.rycee];
|
2024-01-02 11:29:13 +00:00
|
|
|
mainProgram = "cpulimit";
|
2022-07-14 12:49:19 +00:00
|
|
|
};
|
|
|
|
}
|