about summary refs log tree commit diff
path: root/pkgs/development/python-modules/openrazer
diff options
context:
space:
mode:
authorEvan Stoll <evanjsx@gmail.com>2019-08-28 21:06:30 -0400
committerEvan Stoll <evanjsx@gmail.com>2019-08-30 17:20:44 -0400
commit50eba5b6886b84c5aa08ddf1717c087c5cf4979c (patch)
tree2f103cda6a118280aed359c69ee56caa910663ba /pkgs/development/python-modules/openrazer
parentd9f95c1b1ea184a20b99b30dfb6d1a6390937e1d (diff)
pythonPackages.openrazer: init at 2.6.0
Diffstat (limited to 'pkgs/development/python-modules/openrazer')
-rw-r--r--pkgs/development/python-modules/openrazer/common.nix17
-rw-r--r--pkgs/development/python-modules/openrazer/pylib.nix26
2 files changed, 43 insertions, 0 deletions
diff --git a/pkgs/development/python-modules/openrazer/common.nix b/pkgs/development/python-modules/openrazer/common.nix
new file mode 100644
index 0000000000000..eac2751ce3e5a
--- /dev/null
+++ b/pkgs/development/python-modules/openrazer/common.nix
@@ -0,0 +1,17 @@
+{ stdenv
+, fetchFromGitHub
+}: rec {
+  version = "2.6.0";
+  src = fetchFromGitHub {
+    owner = "openrazer";
+    repo = "openrazer";
+    rev = "v${version}";
+    sha256 = "1s5irs3avrlp891mxan3z8p55ias9rq26rqp2qrlcc6i4vl29di0";
+  };
+  meta = with stdenv.lib; {
+    homepage = https://openrazer.github.io/;
+    license = licenses.gpl2;
+    maintainers = with maintainers; [ roelvandijk ];
+    platforms = platforms.linux;
+  };
+}
diff --git a/pkgs/development/python-modules/openrazer/pylib.nix b/pkgs/development/python-modules/openrazer/pylib.nix
new file mode 100644
index 0000000000000..2f9ff467b2d9c
--- /dev/null
+++ b/pkgs/development/python-modules/openrazer/pylib.nix
@@ -0,0 +1,26 @@
+{ buildPythonPackage
+, dbus-python
+, fetchFromGitHub
+, numpy
+, stdenv
+, openrazer-daemon
+}:
+
+let
+  common = import ./common.nix { inherit stdenv fetchFromGitHub; };
+in
+buildPythonPackage (common // rec {
+  pname = "openrazer";
+
+  sourceRoot = "source/pylib";
+
+  propagatedBuildInputs = [
+    dbus-python
+    numpy
+    openrazer-daemon
+  ];
+
+  meta = common.meta // {
+    description = "An entirely open source Python library that allows you to manage your Razer peripherals on GNU/Linux";
+  };
+})