2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
fetchFromGitHub,
|
|
|
|
gettext,
|
|
|
|
ninja,
|
|
|
|
meson,
|
|
|
|
sassc,
|
|
|
|
python3Packages,
|
|
|
|
gobject-introspection,
|
|
|
|
wrapGAppsHook3,
|
|
|
|
libayatana-appindicator,
|
|
|
|
libxcb,
|
|
|
|
qt6,
|
|
|
|
ibus,
|
|
|
|
usbutils,
|
|
|
|
psmisc,
|
2022-06-16 17:23:12 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
python3Packages.buildPythonApplication rec {
|
2024-06-20 14:57:18 +00:00
|
|
|
pname = "polychromatic";
|
2024-09-19 14:19:46 +00:00
|
|
|
version = "0.9.2";
|
2022-06-16 17:23:12 +00:00
|
|
|
format = "other";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "polychromatic";
|
|
|
|
repo = "polychromatic";
|
2024-09-19 14:19:46 +00:00
|
|
|
rev = "refs/tags/v${version}";
|
|
|
|
hash = "sha256-eSfyoEu4qQv+R17wgTfATOE1uHkksNxo17btR6swuZo=";
|
2022-06-16 17:23:12 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
postPatch = ''
|
|
|
|
patchShebangs scripts
|
|
|
|
substituteInPlace scripts/build-styles.sh \
|
2024-06-20 14:57:18 +00:00
|
|
|
--replace-fail '$(which sassc 2>/dev/null)' '${sassc}/bin/sassc' \
|
|
|
|
--replace-fail '$(which sass 2>/dev/null)' '${sassc}/bin/sass'
|
2023-02-02 18:25:31 +00:00
|
|
|
substituteInPlace polychromatic/paths.py \
|
2024-06-20 14:57:18 +00:00
|
|
|
--replace-fail "/usr/share/polychromatic" "$out/share/polychromatic"
|
2022-06-16 17:23:12 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
preConfigure = ''
|
|
|
|
scripts/build-styles.sh
|
|
|
|
'';
|
2024-06-20 14:57:18 +00:00
|
|
|
|
|
|
|
nativeBuildInputs = [
|
2022-10-21 18:38:19 +00:00
|
|
|
gettext
|
|
|
|
gobject-introspection
|
|
|
|
meson
|
|
|
|
ninja
|
|
|
|
sassc
|
2024-05-15 15:35:15 +00:00
|
|
|
wrapGAppsHook3
|
2024-06-05 15:53:02 +00:00
|
|
|
qt6.wrapQtAppsHook
|
|
|
|
qt6.qtbase
|
2022-06-16 17:23:12 +00:00
|
|
|
];
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
buildInputs = [ qt6.qtwayland ];
|
|
|
|
|
2024-06-20 14:57:18 +00:00
|
|
|
propagatedBuildInputs = with python3Packages; [
|
|
|
|
colorama
|
|
|
|
colour
|
|
|
|
openrazer
|
|
|
|
pyqt6
|
|
|
|
pyqt6-webengine
|
|
|
|
requests
|
|
|
|
setproctitle
|
|
|
|
libxcb
|
|
|
|
openrazer-daemon
|
|
|
|
ibus
|
|
|
|
usbutils
|
|
|
|
] ++ [
|
|
|
|
libayatana-appindicator
|
|
|
|
psmisc
|
|
|
|
];
|
2022-06-16 17:23:12 +00:00
|
|
|
|
2024-06-20 14:57:18 +00:00
|
|
|
dontWrapGApps = true;
|
2022-10-21 18:38:19 +00:00
|
|
|
dontWrapQtApps = true;
|
2022-06-16 17:23:12 +00:00
|
|
|
|
|
|
|
makeWrapperArgs = [
|
2022-10-21 18:38:19 +00:00
|
|
|
"\${gappsWrapperArgs[@]}"
|
2022-12-02 08:20:57 +00:00
|
|
|
"\${qtWrapperArgs[@]}"
|
2022-06-16 17:23:12 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
homepage = "https://polychromatic.app/";
|
2024-06-20 14:57:18 +00:00
|
|
|
description = "Graphical front-end and tray applet for configuring Razer peripherals on GNU/Linux";
|
2022-06-16 17:23:12 +00:00
|
|
|
longDescription = ''
|
|
|
|
Polychromatic is a frontend for OpenRazer that enables Razer devices
|
|
|
|
to control lighting effects and more on GNU/Linux.
|
|
|
|
'';
|
|
|
|
license = licenses.gpl3;
|
|
|
|
platforms = platforms.linux;
|
|
|
|
maintainers = with maintainers; [ evanjs ];
|
2024-06-20 14:57:18 +00:00
|
|
|
mainProgram = "polychromatic-controller";
|
2022-06-16 17:23:12 +00:00
|
|
|
};
|
|
|
|
}
|