2022-07-14 12:49:19 +00:00
|
|
|
{lib, stdenv, fetchurl}:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "limitcpu";
|
2023-02-02 18:25:31 +00:00
|
|
|
version = "2.8";
|
2022-07-14 12:49:19 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
url = "mirror://sourceforge/limitcpu/cpulimit-${version}.tar.gz";
|
2023-02-02 18:25:31 +00:00
|
|
|
sha256 = "sha256-fjGbCR9QEVTmAFxd+WoEAGbuhtsiAdWDXQq9mOO2t/8=";
|
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;
|
|
|
|
license = licenses.gpl2;
|
|
|
|
maintainers = [maintainers.rycee];
|
|
|
|
};
|
|
|
|
}
|