about summary refs log tree commit diff
path: root/pkgs/development/python-modules/pynput/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/development/python-modules/pynput/default.nix')
-rw-r--r--pkgs/development/python-modules/pynput/default.nix64
1 files changed, 33 insertions, 31 deletions
diff --git a/pkgs/development/python-modules/pynput/default.nix b/pkgs/development/python-modules/pynput/default.nix
index 88c46532d997..6d73c35e5ba6 100644
--- a/pkgs/development/python-modules/pynput/default.nix
+++ b/pkgs/development/python-modules/pynput/default.nix
@@ -1,22 +1,23 @@
-{ lib
-, stdenv
-, buildPythonPackage
-, fetchFromGitHub
+{
+  lib,
+  stdenv,
+  buildPythonPackage,
+  fetchFromGitHub,
 
-# build-system
-, setuptools
-, setuptools-lint
-, sphinx
+  # build-system
+  setuptools,
+  setuptools-lint,
+  sphinx,
 
-# dependencies
-, xlib
-, evdev
-, darwin
-, six
+  # dependencies
+  xlib,
+  evdev,
+  darwin,
+  six,
 
- # tests
-, unittestCheckHook
- }:
+  # tests
+  unittestCheckHook,
+}:
 
 buildPythonPackage rec {
   pname = "pynput";
@@ -41,28 +42,29 @@ buildPythonPackage rec {
     sphinx
   ];
 
-  propagatedBuildInputs = [
-    six
-  ] ++ lib.optionals stdenv.isLinux [
-    evdev
-    xlib
-  ] ++ lib.optionals stdenv.isDarwin (with darwin.apple_sdk.frameworks; [
-    ApplicationServices
-    Quartz
-  ]);
+  propagatedBuildInputs =
+    [ six ]
+    ++ lib.optionals stdenv.hostPlatform.isLinux [
+      evdev
+      xlib
+    ]
+    ++ lib.optionals stdenv.hostPlatform.isDarwin (
+      with darwin.apple_sdk.frameworks;
+      [
+        ApplicationServices
+        Quartz
+      ]
+    );
 
   doCheck = false; # requires running X server
 
-  nativeCheckInputs = [
-    unittestCheckHook
-  ];
+  nativeCheckInputs = [ unittestCheckHook ];
 
   meta = with lib; {
-    broken = stdenv.isDarwin;
-    description = "A library to control and monitor input devices";
+    broken = stdenv.hostPlatform.isDarwin;
+    description = "Library to control and monitor input devices";
     homepage = "https://github.com/moses-palmer/pynput";
     license = licenses.lgpl3;
     maintainers = with maintainers; [ nickhu ];
   };
 }
-