Files
nixpkgs/pkgs/development/python-modules/adafruit-io/default.nix

53 lines
1.1 KiB
Nix

{
lib,
buildPythonPackage,
fetchFromGitHub,
paho-mqtt,
pytestCheckHook,
requests,
setuptools,
setuptools-scm,
}:
buildPythonPackage (finalAttrs: {
pname = "adafruit-io";
version = "3.0.0";
pyproject = true;
src = fetchFromGitHub {
owner = "adafruit";
repo = "Adafruit_IO_Python";
tag = finalAttrs.version;
hash = "sha256-INi1ZJf9j8fP+DJrtQvXKWr7gjp8V7OQVOBuSMB1O/0=";
};
build-system = [
setuptools
setuptools-scm
];
dependencies = [
paho-mqtt
requests
];
nativeCheckInputs = [ pytestCheckHook ];
pythonImportsCheck = [ "Adafruit_IO" ];
disabledTestPaths = [
# Tests requires valid credentials
"tests/test_client.py"
"tests/test_errors.py"
"tests/test_mqtt_client.py"
];
meta = {
description = "Module for interacting with Adafruit IO";
homepage = "https://github.com/adafruit/Adafruit_IO_Python";
changelog = "https://github.com/adafruit/Adafruit_IO_Python/releases/tag/${finalAttrs.src.tag}";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ fab ];
};
})