about summary refs log tree commit diff
path: root/pkgs/os-specific/linux/cfs-zen-tweaks
diff options
context:
space:
mode:
authorMaciej Krüger <mkg20001@gmail.com>2021-11-24 08:06:56 +0100
committerMaciej Krüger <mkg20001@gmail.com>2021-12-04 13:06:16 +0100
commit9a94139d343aad265457d65632e6f70be306616f (patch)
tree78a5d7a7286f5a6c7c088f29a68854b3f2ded2db /pkgs/os-specific/linux/cfs-zen-tweaks
parentccb03c908bf7c32785180ae363d1cde6db70a172 (diff)
cfs-zen-tweaks: init at 1.2.0
Diffstat (limited to 'pkgs/os-specific/linux/cfs-zen-tweaks')
-rw-r--r--pkgs/os-specific/linux/cfs-zen-tweaks/default.nix43
1 files changed, 43 insertions, 0 deletions
diff --git a/pkgs/os-specific/linux/cfs-zen-tweaks/default.nix b/pkgs/os-specific/linux/cfs-zen-tweaks/default.nix
new file mode 100644
index 0000000000000..a894e0bd4b69b
--- /dev/null
+++ b/pkgs/os-specific/linux/cfs-zen-tweaks/default.nix
@@ -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 ];
+  };
+}