2021-01-15 22:18:51 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonApplication
|
2020-04-24 23:36:52 +00:00
|
|
|
, isPy3k
|
|
|
|
, daemonize
|
|
|
|
, dbus-python
|
|
|
|
, fetchFromGitHub
|
|
|
|
, fetchpatch
|
|
|
|
, gobject-introspection
|
|
|
|
, gtk3
|
|
|
|
, makeWrapper
|
|
|
|
, pygobject3
|
|
|
|
, pyudev
|
|
|
|
, setproctitle
|
|
|
|
, wrapGAppsHook
|
|
|
|
}:
|
|
|
|
|
|
|
|
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
|
|
|
|
buildPythonApplication (common // rec {
|
|
|
|
pname = "openrazer_daemon";
|
|
|
|
|
|
|
|
disabled = !isPy3k;
|
|
|
|
|
|
|
|
sourceRoot = "source/daemon";
|
|
|
|
|
|
|
|
outputs = [ "out" "man" ];
|
|
|
|
|
|
|
|
nativeBuildInputs = [ makeWrapper wrapGAppsHook ];
|
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
daemonize
|
|
|
|
dbus-python
|
|
|
|
gobject-introspection
|
|
|
|
gtk3
|
|
|
|
pygobject3
|
|
|
|
pyudev
|
|
|
|
setproctitle
|
|
|
|
];
|
|
|
|
|
2021-08-08 23:34:03 +00:00
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace openrazer_daemon/daemon.py --replace "plugdev" "openrazer"
|
|
|
|
'';
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
postBuild = ''
|
|
|
|
DESTDIR="$out" PREFIX="" make install manpages
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = common.meta // {
|
|
|
|
description = "An entirely open source user-space daemon that allows you to manage your Razer peripherals on GNU/Linux";
|
|
|
|
};
|
|
|
|
})
|