2022-07-14 12:49:19 +00:00
|
|
|
{lib, stdenv, fetchurl}:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "limitcpu";
|
2023-07-15 17:15:38 +00:00
|
|
|
version = "3.0";
|
2022-07-14 12:49:19 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
url = "mirror://sourceforge/limitcpu/cpulimit-${version}.tar.gz";
|
2023-07-15 17:15:38 +00:00
|
|
|
sha256 = "sha256-rS9BXrK72j6DqKLZGO9ekPUuvMb+5h6Uv5F7PoTrtJw=";
|
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/";
|
2022-07-14 12:49:19 +00:00
|
|
|
description = "A tool to throttle the CPU usage of programs";
|
|
|
|
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
|
|
|
};
|
|
|
|
}
|