From 44a2177997c0f3a641956e169dc0628f3b6746ba Mon Sep 17 00:00:00 2001 From: John Soo Date: Fri, 3 Jun 2022 11:15:12 -0700 Subject: [PATCH] limitcpu: init at 2.7 Renamed from cpulimit. --- pkgs/tools/misc/limitcpu/default.nix | 27 +++++++++++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 ++ 2 files changed, 29 insertions(+) create mode 100644 pkgs/tools/misc/limitcpu/default.nix diff --git a/pkgs/tools/misc/limitcpu/default.nix b/pkgs/tools/misc/limitcpu/default.nix new file mode 100644 index 000000000000..2d7fb55dcd9c --- /dev/null +++ b/pkgs/tools/misc/limitcpu/default.nix @@ -0,0 +1,27 @@ +{lib, stdenv, fetchurl}: + +stdenv.mkDerivation rec { + pname = "limitcpu"; + version = "2.7"; + + src = fetchurl { + url = "mirror://sourceforge/limitcpu/cpulimit-${version}.tar.gz"; + sha256 = "sha256-HeBApPikDf6MegJf6YB1ZzRo+8P8zMvCMbx0AvYuxKA="; + }; + + buildFlags = with stdenv; [ ( + if isDarwin then "osx" + else if isFreeBSD then "freebsd" + else "cpulimit" + ) ]; + + installFlags = [ "PREFIX=$(out)" ]; + + meta = with lib; { + homepage = "http://limitcpu.sourceforge.net/"; + description = "A tool to throttle the CPU usage of programs"; + platforms = with platforms; linux ++ freebsd; + license = licenses.gpl2; + maintainers = [maintainers.rycee]; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index da373b207d7a..3f0928daa52c 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -3941,6 +3941,8 @@ with pkgs; lifeograph = callPackage ../applications/editors/lifeograph { }; + limitcpu = callPackage ../tools/misc/limitcpu { }; + link-grammar = callPackage ../tools/text/link-grammar { }; linuxptp = callPackage ../os-specific/linux/linuxptp { };