From 9cf1425116a61e83c99b6f4b9ad0392fee8c61be Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Sun, 10 Oct 2021 22:40:36 +0200 Subject: [PATCH] python3Packages.crownstone-uart: init at 2.1.0 --- .../crownstone-uart/default.nix | 41 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 + 2 files changed, 43 insertions(+) create mode 100644 pkgs/development/python-modules/crownstone-uart/default.nix diff --git a/pkgs/development/python-modules/crownstone-uart/default.nix b/pkgs/development/python-modules/crownstone-uart/default.nix new file mode 100644 index 000000000000..fd1c2094335c --- /dev/null +++ b/pkgs/development/python-modules/crownstone-uart/default.nix @@ -0,0 +1,41 @@ +{ lib +, crownstone-core +, buildPythonPackage +, pyserial +, fetchFromGitHub +, pythonOlder +}: + +buildPythonPackage rec { + pname = "crownstone-uart"; + version = "2.1.0"; + format = "setuptools"; + + disabled = pythonOlder "3.8"; + + src = fetchFromGitHub { + owner = "crownstone"; + repo = "crownstone-lib-python-uart"; + rev = version; + sha256 = "0sdz131vmrfp6hrm9iwqw8mj9qazsxg7b85yadib1122w9f3b1zc"; + }; + + propagatedBuildInputs = [ + crownstone-core + pyserial + ]; + + # Project has no tests + doCheck = false; + + pythonImportsCheck = [ + "crownstone_uart" + ]; + + meta = with lib; { + description = "Python module for communicating with Crownstone USB dongles"; + homepage = "https://github.com/crownstone/crownstone-lib-python-uart"; + license = with licenses; [ mit ]; + maintainers = with maintainers; [ fab ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 4adbd71031a4..146b7a64c68a 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -1743,6 +1743,8 @@ in { crownstone-core = callPackage ../development/python-modules/crownstone-core { }; + crownstone-uart = callPackage ../development/python-modules/crownstone-uart { }; + cryptacular = callPackage ../development/python-modules/cryptacular { }; cryptography = callPackage ../development/python-modules/cryptography {