1{ lib
2, buildPythonApplication
3, isPy3k
4, daemonize
5, dbus-python
6, fetchFromGitHub
7, gobject-introspection
8, gtk3
9, makeWrapper
10, pygobject3
11, pyudev
12, setproctitle
13, wrapGAppsHook
14}:
15
16let
17 common = import ./common.nix { inherit lib fetchFromGitHub; };
18in
19buildPythonApplication (common // rec {
20 pname = "openrazer_daemon";
21
22 disabled = !isPy3k;
23
24 sourceRoot = "source/daemon";
25
26 outputs = [ "out" "man" ];
27
28 nativeBuildInputs = [ makeWrapper wrapGAppsHook ];
29
30 propagatedBuildInputs = [
31 daemonize
32 dbus-python
33 gobject-introspection
34 gtk3
35 pygobject3
36 pyudev
37 setproctitle
38 ];
39
40 postPatch = ''
41 substituteInPlace openrazer_daemon/daemon.py --replace "plugdev" "openrazer"
42 '';
43
44 postBuild = ''
45 DESTDIR="$out" PREFIX="" make install manpages
46 '';
47
48 meta = common.meta // {
49 description = "An entirely open source user-space daemon that allows you to manage your Razer peripherals on GNU/Linux";
50 };
51})