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-scm,
9}:
10
11buildPythonPackage rec {
12 pname = "adafruit-io";
13 version = "2.8.0";
14 format = "setuptools";
15
16 src = fetchFromGitHub {
17 owner = "adafruit";
18 repo = "Adafruit_IO_Python";
19 tag = version;
20 hash = "sha256-OwTHMyc2ePSdYVuY1h3PY+uDBl6/7fTMXiZC3sZm8fU=";
21 };
22
23 nativeBuildInputs = [ setuptools-scm ];
24
25 propagatedBuildInputs = [
26 paho-mqtt
27 requests
28 ];
29
30 nativeCheckInputs = [ pytestCheckHook ];
31
32 pythonImportsCheck = [ "Adafruit_IO" ];
33
34 disabledTestPaths = [
35 # Tests requires valid credentials
36 "tests/test_client.py"
37 "tests/test_errors.py"
38 "tests/test_mqtt_client.py"
39 ];
40
41 meta = {
42 description = "Module for interacting with Adafruit IO";
43 homepage = "https://github.com/adafruit/Adafruit_IO_Python";
44 license = lib.licenses.mit;
45 maintainers = with lib.maintainers; [ fab ];
46 };
47}