nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{
2 lib,
3 buildPythonPackage,
4 fetchFromGitHub,
5 paho-mqtt,
6 pytestCheckHook,
7 requests,
8 setuptools,
9 setuptools-scm,
10}:
11
12buildPythonPackage (finalAttrs: {
13 pname = "adafruit-io";
14 version = "2.8.2";
15 pyproject = true;
16
17 src = fetchFromGitHub {
18 owner = "adafruit";
19 repo = "Adafruit_IO_Python";
20 tag = finalAttrs.version;
21 hash = "sha256-JYQKrGg4FRzqq3wy/TqafC16rldvPEi+/xEI7XGvWM8=";
22 };
23
24 build-system = [
25 setuptools
26 setuptools-scm
27 ];
28
29 dependencies = [
30 paho-mqtt
31 requests
32 ];
33
34 nativeCheckInputs = [ pytestCheckHook ];
35
36 pythonImportsCheck = [ "Adafruit_IO" ];
37
38 disabledTestPaths = [
39 # Tests requires valid credentials
40 "tests/test_client.py"
41 "tests/test_errors.py"
42 "tests/test_mqtt_client.py"
43 ];
44
45 meta = {
46 description = "Module for interacting with Adafruit IO";
47 homepage = "https://github.com/adafruit/Adafruit_IO_Python";
48 changelog = "https://github.com/adafruit/Adafruit_IO_Python/releases/tag/${finalAttrs.src.tag}";
49 license = lib.licenses.mit;
50 maintainers = with lib.maintainers; [ fab ];
51 };
52})