better-control: init at 6.11.6 (#408413)

This commit is contained in:
Aleksana 2025-05-19 18:39:09 +08:00 committed by GitHub
commit dda860a8f7
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 110 additions and 0 deletions

View file

@ -21006,6 +21006,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";

View file

@ -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
};
}