nixpkgs-suyu/pkgs/development/python-modules/openrazer/daemon.nix
Jonathan Ringer d4627a01e0
openrazer-daemon: make build src name independent
(cherry picked from commit 4a7e627446f0db9fd4e5e0ae2cbaa6603d8f5b84)
2022-01-31 10:37:54 -08:00

53 lines
954 B
Nix

{ lib
, buildPythonApplication
, isPy3k
, daemonize
, dbus-python
, fetchFromGitHub
, 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;
outputs = [ "out" "man" ];
nativeBuildInputs = [ makeWrapper wrapGAppsHook ];
propagatedBuildInputs = [
daemonize
dbus-python
gobject-introspection
gtk3
pygobject3
pyudev
setproctitle
];
prePatch = ''
cd daemon
'';
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";
};
})