From c1136468968a31e20c3cbf09ed76ceee827d80d5 Mon Sep 17 00:00:00 2001 From: Rishabh5321 <40533251+Rishabh5321@users.noreply.github.com> Date: Sun, 18 May 2025 19:52:08 +0530 Subject: [PATCH 1/2] maintainers: add Rishabh5321 --- maintainers/maintainer-list.nix | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/maintainers/maintainer-list.nix b/maintainers/maintainer-list.nix index d60647627288..9a59776aa16d 100644 --- a/maintainers/maintainer-list.nix +++ b/maintainers/maintainer-list.nix @@ -20979,6 +20979,12 @@ githubId = 807447; name = "Robert Scott"; }; + Rishabh5321 = { + name = "Rishabh Singh"; + email = "rishabh98818@gmail.com"; + github = "Rishabh5321"; + githubId = 40533251; + }; Rishik-Y = { name = "Rishik Yalamanchili"; email = "202301258@daiict.ac.in"; From c399ae314493403e36ef55ff7f4173dd3fb1f9b6 Mon Sep 17 00:00:00 2001 From: Rishabh5321 <40533251+Rishabh5321@users.noreply.github.com> Date: Mon, 19 May 2025 15:04:28 +0530 Subject: [PATCH 2/2] better-control: init at 6.11.6 --- pkgs/by-name/be/better-control/package.nix | 104 +++++++++++++++++++++ 1 file changed, 104 insertions(+) create mode 100644 pkgs/by-name/be/better-control/package.nix diff --git a/pkgs/by-name/be/better-control/package.nix b/pkgs/by-name/be/better-control/package.nix new file mode 100644 index 000000000000..1576a4e58907 --- /dev/null +++ b/pkgs/by-name/be/better-control/package.nix @@ -0,0 +1,104 @@ +{ + lib, + python3Packages, + fetchFromGitHub, + gtk3, + bash, + networkmanager, + bluez, + brightnessctl, + power-profiles-daemon, + gammastep, + libpulseaudio, + desktop-file-utils, + wrapGAppsHook3, + gobject-introspection, + upower, + nix-update-script, +}: + +python3Packages.buildPythonApplication rec { + pname = "better-control"; + version = "v6.11.6"; + pyproject = false; + + src = fetchFromGitHub { + owner = "quantumvoid0"; + repo = "better-control"; + tag = version; + hash = "sha256-+2hY+o+GPyJHXpQFVW8BOUEiIBGQ1hItOVpA/AVas2Q="; + }; + + build-system = with python3Packages; [ + setuptools + ]; + + nativeBuildInputs = [ + desktop-file-utils + wrapGAppsHook3 + gobject-introspection + ]; + + buildInputs = [ + bash + gtk3 + ]; + + # Check src/utils/dependencies.py + runtimeDeps = [ + libpulseaudio + networkmanager + bluez + brightnessctl + power-profiles-daemon + gammastep + upower + ]; + + dependencies = with python3Packages; [ + pygobject3 + dbus-python + psutil + qrcode + requests + setproctitle + pillow + pycairo + ]; + + makeFlags = [ "PREFIX=${placeholder "out"}" ]; + + dontWrapGApps = true; + + makeWrapperArgs = [ + "\${gappsWrapperArgs[@]}" + "--prefix PATH : ${lib.makeBinPath runtimeDeps}" + ]; + + postInstall = '' + rm $out/bin/betterctl + chmod +x $out/share/better-control/better_control.py + substituteInPlace $out/bin/* \ + --replace-fail "python3 " "" + substituteInPlace $out/share/applications/better-control.desktop \ + --replace-fail "/usr/bin/" "" + ''; + + # Project has no tests + doCheck = false; + + postFixup = '' + wrapPythonProgramsIn "$out/share/better-control" "$out $pythonPath" + ''; + + passthru.updateScript = nix-update-script { }; + + meta = { + description = "Simple control panel for linux based on GTK"; + homepage = "https://github.com/quantumvoid0/better-control"; + license = lib.licenses.gpl3Only; + maintainers = with lib.maintainers; [ Rishabh5321 ]; + platforms = lib.platforms.linux; + mainProgram = "control"; # Users use both "control" and "better-control" to launch + }; +}