42c6771744
For security reasons, and generally, it is best to create a more fine grained group than plugdev. This way users that wish to tweak razer devices don't have access to the entire plugdev group's permissions. This is of course a breaking change.
53 lines
963 B
Nix
53 lines
963 B
Nix
{ lib
|
|
, buildPythonApplication
|
|
, isPy3k
|
|
, daemonize
|
|
, dbus-python
|
|
, fetchFromGitHub
|
|
, fetchpatch
|
|
, gobject-introspection
|
|
, gtk3
|
|
, makeWrapper
|
|
, pygobject3
|
|
, pyudev
|
|
, setproctitle
|
|
, wrapGAppsHook
|
|
}:
|
|
|
|
let
|
|
common = import ./common.nix { inherit lib fetchFromGitHub; };
|
|
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
|
|
];
|
|
|
|
postPatch = ''
|
|
substituteInPlace openrazer_daemon/daemon.py --replace "plugdev" "openrazer"
|
|
'';
|
|
|
|
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";
|
|
};
|
|
})
|