2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
buildPythonPackage,
|
|
|
|
daemonize,
|
|
|
|
dbus-python,
|
|
|
|
fetchFromGitHub,
|
|
|
|
gobject-introspection,
|
|
|
|
gtk3,
|
|
|
|
pygobject3,
|
|
|
|
pyudev,
|
|
|
|
setproctitle,
|
|
|
|
setuptools,
|
|
|
|
wrapGAppsNoGuiHook,
|
|
|
|
notify2,
|
2024-06-20 14:57:18 +00:00
|
|
|
glib
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
let
|
2021-02-05 17:12:51 +00:00
|
|
|
common = import ./common.nix { inherit lib fetchFromGitHub; };
|
2020-04-24 23:36:52 +00:00
|
|
|
in
|
2022-12-17 10:02:37 +00:00
|
|
|
buildPythonPackage (common // {
|
2023-08-22 20:05:09 +00:00
|
|
|
pname = "openrazer-daemon";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
outputs = [
|
|
|
|
"out"
|
|
|
|
"man"
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2023-08-22 20:05:09 +00:00
|
|
|
sourceRoot = "${common.src.name}/daemon";
|
2022-12-17 10:02:37 +00:00
|
|
|
|
|
|
|
postPatch = ''
|
2024-04-21 15:54:59 +00:00
|
|
|
substituteInPlace openrazer_daemon/daemon.py \
|
|
|
|
--replace-fail "plugdev" "openrazer"
|
2022-12-17 10:02:37 +00:00
|
|
|
'';
|
|
|
|
|
2024-06-20 14:57:18 +00:00
|
|
|
nativeBuildInputs = [ setuptools wrapGAppsNoGuiHook gobject-introspection ];
|
|
|
|
|
|
|
|
buildInputs = [
|
|
|
|
glib
|
|
|
|
gtk3
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
daemonize
|
|
|
|
dbus-python
|
|
|
|
pygobject3
|
|
|
|
pyudev
|
|
|
|
setproctitle
|
2023-11-16 04:20:00 +00:00
|
|
|
notify2
|
2020-04-24 23:36:52 +00:00
|
|
|
];
|
|
|
|
|
2023-08-22 20:05:09 +00:00
|
|
|
postInstall = ''
|
|
|
|
DESTDIR="$out" PREFIX="" make manpages install-resources install-systemd
|
2020-04-24 23:36:52 +00:00
|
|
|
'';
|
|
|
|
|
2022-12-17 10:02:37 +00:00
|
|
|
# no tests run
|
|
|
|
doCheck = false;
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
dontWrapGApps = true;
|
|
|
|
|
|
|
|
preFixup = ''
|
|
|
|
makeWrapperArgs+=("''${gappsWrapperArgs[@]}")
|
|
|
|
'';
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
meta = common.meta // {
|
2024-06-20 14:57:18 +00:00
|
|
|
description = "Entirely open source user-space daemon that allows you to manage your Razer peripherals on GNU/Linux";
|
2024-04-21 15:54:59 +00:00
|
|
|
mainProgram = "openrazer-daemon";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
})
|