nixpkgs/pkgs/tools/misc/cpulimit/default.nix
John Soo d0cdd897c3
cpulimit: use github sources at 0.2
The sourceforge page of limitCPU says the following:

> Update: Mr Marletta has re-launched his CPUlimit project, adding new
> features and improving OS X support. The new project is a re-write
> and should not be considered drop-in compatible with this
> project. The source code of the new CPUlimit project can be found on
> github. We here at the LimitCPU project will continue to work with
> downstream projects and with the resurrected CPUlimit project so
> that both projects may grow and improve.
2022-07-06 11:08:59 -07:00

29 lines
656 B
Nix

{ lib, stdenv, fetchFromGitHub }:
stdenv.mkDerivation rec {
pname = "cpulimit";
version = "0.2";
src = fetchFromGitHub {
owner = "opsengine";
repo = "cpulimit";
rev = "v${version}";
sha256 = "1dz045yhcsw1rdamzpz4bk8mw888in7fyqk1q1b3m1yk4pd1ahkh";
};
patches = [ ./remove-sys-sysctl.h.patch ./get-missing-basename.patch ];
installPhase = ''
mkdir -p $out/bin
cp src/cpulimit $out/bin
'';
meta = with lib; {
homepage = "https://github.com/opsengine/cpulimit";
description = "CPU usage limiter";
platforms = platforms.unix;
license = licenses.gpl2;
maintainers = [ maintainers.jsoo1 ];
};
}