2021-01-10 23:54:33 -08:00
|
|
|
{lib, stdenv, fetchurl}:
|
2015-03-28 03:10:39 -07:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2019-08-15 05:41:18 -07:00
|
|
|
pname = "cpulimit";
|
2021-05-12 01:20:15 -07:00
|
|
|
version = "2.7";
|
2015-03-28 03:10:39 -07:00
|
|
|
|
|
|
|
src = fetchurl {
|
2019-08-15 05:41:18 -07:00
|
|
|
url = "mirror://sourceforge/limitcpu/${pname}-${version}.tar.gz";
|
2021-05-12 01:20:15 -07:00
|
|
|
sha256 = "sha256-HeBApPikDf6MegJf6YB1ZzRo+8P8zMvCMbx0AvYuxKA=";
|
2015-03-28 03:10:39 -07:00
|
|
|
};
|
|
|
|
|
2019-10-28 02:17:49 -07:00
|
|
|
buildFlags = with stdenv; [ (
|
2015-03-28 03:10:39 -07:00
|
|
|
if isDarwin then "osx"
|
|
|
|
else if isFreeBSD then "freebsd"
|
2019-10-28 02:17:49 -07:00
|
|
|
else "cpulimit"
|
|
|
|
) ];
|
2015-03-28 03:10:39 -07:00
|
|
|
|
2019-10-28 02:17:49 -07:00
|
|
|
installFlags = [ "PREFIX=$(out)" ];
|
2015-03-28 03:10:39 -07:00
|
|
|
|
2021-01-10 23:54:33 -08:00
|
|
|
meta = with lib; {
|
2020-03-31 18:11:51 -07:00
|
|
|
homepage = "http://limitcpu.sourceforge.net/";
|
2015-03-28 03:10:39 -07:00
|
|
|
description = "A tool to throttle the CPU usage of programs";
|
2015-08-04 01:40:44 -07:00
|
|
|
platforms = with platforms; linux ++ freebsd;
|
2015-03-28 03:10:39 -07:00
|
|
|
license = licenses.gpl2;
|
2016-02-10 05:59:36 -08:00
|
|
|
maintainers = [maintainers.rycee];
|
2015-03-28 03:10:39 -07:00
|
|
|
};
|
|
|
|
}
|