From d1b2e3b0e8ec8fdd4de5d6e4778d5df27b939b7b Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Sun, 10 Oct 2021 22:34:14 +0200 Subject: [PATCH 1/4] python3Packages.crownstone-cloud: init at 1.4.5 --- .../crownstone-cloud/default.nix | 50 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 + 2 files changed, 52 insertions(+) create mode 100644 pkgs/development/python-modules/crownstone-cloud/default.nix diff --git a/pkgs/development/python-modules/crownstone-cloud/default.nix b/pkgs/development/python-modules/crownstone-cloud/default.nix new file mode 100644 index 000000000000..94e6219264c0 --- /dev/null +++ b/pkgs/development/python-modules/crownstone-cloud/default.nix @@ -0,0 +1,50 @@ +{ lib +, aiohttp +, asynctest +, buildPythonPackage +, fetchFromGitHub +, certifi +, pythonOlder +, pytestCheckHook +}: + +buildPythonPackage rec { + pname = "crownstone-cloud"; + version = "1.4.5"; + format = "setuptools"; + + disabled = pythonOlder "3.8"; + + src = fetchFromGitHub { + owner = "crownstone"; + repo = "crownstone-lib-python-cloud"; + rev = "v${version}"; + sha256 = "1a8bkqkrc7iyggr5rr20qdqg67sycdx2d94dd1ylkmr7627r34ys"; + }; + + propagatedBuildInputs = [ + aiohttp + asynctest + certifi + ]; + + checkInputs = [ + pytestCheckHook + ]; + + postPatch = '' + substituteInPlace requirements.txt \ + --replace "codecov>=2.1.10" "" + ''; + + pythonImportsCheck = [ + "crownstone_cloud" + ]; + + meta = with lib; { + description = "Python module for communicating with Crownstone Cloud and devices"; + homepage = "https://github.com/crownstone/crownstone-lib-python-cloud"; + 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 648a94ff4211..4e75e3b618fb 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -1739,6 +1739,8 @@ in { croniter = callPackage ../development/python-modules/croniter { }; + crownstone-cloud = callPackage ../development/python-modules/crownstone-cloud { }; + cryptacular = callPackage ../development/python-modules/cryptacular { }; cryptography = callPackage ../development/python-modules/cryptography { From 0465cd739c842b5f4cbf7c7c0ecc66e1341c619b Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Sun, 10 Oct 2021 22:36:49 +0200 Subject: [PATCH 2/4] python3Packages.crownstone-core: init at 3.0.1 --- .../crownstone-core/default.nix | 41 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 + 2 files changed, 43 insertions(+) create mode 100644 pkgs/development/python-modules/crownstone-core/default.nix diff --git a/pkgs/development/python-modules/crownstone-core/default.nix b/pkgs/development/python-modules/crownstone-core/default.nix new file mode 100644 index 000000000000..35289cf1956c --- /dev/null +++ b/pkgs/development/python-modules/crownstone-core/default.nix @@ -0,0 +1,41 @@ +{ lib +, buildPythonPackage +, fetchFromGitHub +, pyaes +, pytestCheckHook +, pythonOlder +}: + +buildPythonPackage rec { + pname = "crownstone-core"; + version = "3.0.1"; + format = "setuptools"; + + disabled = pythonOlder "3.8"; + + src = fetchFromGitHub { + owner = "crownstone"; + repo = "crownstone-lib-python-core"; + rev = version; + sha256 = "138lignv7c8kkqbqfkdcfpg39gm9x44h7r2j403m4ib7gq420hsn"; + }; + + propagatedBuildInputs = [ + pyaes + ]; + + checkInputs = [ + pytestCheckHook + ]; + + pythonImportsCheck = [ + "crownstone_core" + ]; + + meta = with lib; { + description = "Python module with shared classes, util functions and definition of Crownstone"; + homepage = "https://github.com/crownstone/crownstone-lib-python-core"; + 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 4e75e3b618fb..4adbd71031a4 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -1741,6 +1741,8 @@ in { crownstone-cloud = callPackage ../development/python-modules/crownstone-cloud { }; + crownstone-core = callPackage ../development/python-modules/crownstone-core { }; + cryptacular = callPackage ../development/python-modules/cryptacular { }; cryptography = callPackage ../development/python-modules/cryptography { From 9cf1425116a61e83c99b6f4b9ad0392fee8c61be Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Sun, 10 Oct 2021 22:40:36 +0200 Subject: [PATCH 3/4] 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 { From f0417a33365a2b5e6f1333624ee20e1c034edf1f Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Mon, 11 Oct 2021 07:54:18 +0200 Subject: [PATCH 4/4] python3Packages.crownstone-sse: init at 2.0.2 --- .../python-modules/crownstone-sse/default.nix | 44 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 + 2 files changed, 46 insertions(+) create mode 100644 pkgs/development/python-modules/crownstone-sse/default.nix diff --git a/pkgs/development/python-modules/crownstone-sse/default.nix b/pkgs/development/python-modules/crownstone-sse/default.nix new file mode 100644 index 000000000000..ef2e2cbc240c --- /dev/null +++ b/pkgs/development/python-modules/crownstone-sse/default.nix @@ -0,0 +1,44 @@ +{ lib +, aiohttp +, asynctest +, buildPythonPackage +, certifi +, fetchFromGitHub +, pythonOlder +, coverage +}: + +buildPythonPackage rec { + pname = "crownstone-sse"; + version = "2.0.2"; + format = "setuptools"; + + disabled = pythonOlder "3.8"; + + src = fetchFromGitHub { + owner = "crownstone"; + repo = "crownstone-lib-python-sse"; + rev = version; + sha256 = "0rrr92j8pi5annrfa22k1hggsyyacl9asi9i8yrj4jqdjvwjn2gc"; + }; + + propagatedBuildInputs = [ + aiohttp + asynctest + certifi + ]; + + # Tests are only providing coverage + doCheck = false; + + pythonImportsCheck = [ + "crownstone_sse" + ]; + + meta = with lib; { + description = "Python module for listening to Crownstone SSE events"; + homepage = "https://github.com/crownstone/crownstone-lib-python-sse"; + 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 146b7a64c68a..82740dd98665 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-sse = callPackage ../development/python-modules/crownstone-sse { }; + crownstone-uart = callPackage ../development/python-modules/crownstone-uart { }; cryptacular = callPackage ../development/python-modules/cryptacular { };