1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-11-19 20:21:14 +00:00

Merge pull request #147232 from mkg20001/zen-tweaks

This commit is contained in:
Maciej Krüger 2022-05-26 06:44:54 +02:00 committed by GitHub
commit 41e3072c81
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 74 additions and 0 deletions

View file

@ -137,6 +137,7 @@
./programs/captive-browser.nix
./programs/ccache.nix
./programs/cdemu.nix
./programs/cfs-zen-tweaks.nix
./programs/chromium.nix
./programs/clickshare.nix
./programs/cnping.nix

View file

@ -0,0 +1,28 @@
# CFS Zen Tweaks
{ config, pkgs, lib, ... }:
with lib;
let
cfg = config.programs.cfs-zen-tweaks;
in
{
meta = {
maintainers = with maintainers; [ mkg20001 ];
};
options = {
programs.cfs-zen-tweaks.enable = mkEnableOption "CFS Zen Tweaks";
};
config = mkIf cfg.enable {
systemd.packages = [ pkgs.cfs-zen-tweaks ];
systemd.services.set-cfs-tweak.wantedBy = [ "multi-user.target" "suspend.target" "hibernate.target" "hybrid-sleep.target" "suspend-then-hibernate.target" ];
};
}

View file

@ -0,0 +1,43 @@
{ lib
, stdenv
, fetchFromGitHub
, cmake
, makeWrapper
, gawk
}:
stdenv.mkDerivation rec {
pname = "cfs-zen-tweaks";
version = "1.2.0";
src = fetchFromGitHub {
owner = "igo95862";
repo = "cfs-zen-tweaks";
rev = version;
sha256 = "HRR2tdjNmWyrpbcMlihSdb/7g/tHma3YyXogQpRCVyo=";
};
postPatch = ''
patchShebangs set-cfs-zen-tweaks.bash
chmod +x set-cfs-zen-tweaks.bash
substituteInPlace set-cfs-zen-tweaks.bash \
--replace '$(gawk' '$(${gawk}/bin/gawk'
'';
buildInputs = [
gawk
];
nativeBuildInputs = [
cmake
makeWrapper
];
meta = with lib; {
description = "Tweak Linux CPU scheduler for desktop responsiveness";
homepage = "https://github.com/igo95862/cfs-zen-tweaks";
license = licenses.gpl2Only;
platforms = platforms.linux;
maintainers = with maintainers; [ mkg20001 ];
};
}

View file

@ -4855,6 +4855,8 @@ with pkgs;
cfssl = callPackage ../tools/security/cfssl { };
cfs-zen-tweaks = callPackage ../os-specific/linux/cfs-zen-tweaks { };
chafa = callPackage ../tools/misc/chafa {
inherit (darwin.apple_sdk.frameworks) Foundation;
};