nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{
2 lib,
3 buildPythonPackage,
4 fetchFromGitHub,
5 pytestCheckHook,
6 requests,
7 requests-mock,
8 setuptools,
9}:
10
11buildPythonPackage rec {
12 pname = "losant-rest";
13 version = "2.1.1";
14 pyproject = true;
15
16 src = fetchFromGitHub {
17 owner = "Losant";
18 repo = "losant-rest-python";
19 tag = "v${version}";
20 hash = "sha256-B4r3ZCXt3jC/8vtBzct1HEBuMq9NpF2qOlmlhZk9a3Q=";
21 };
22
23 build-system = [ setuptools ];
24
25 dependencies = [ requests ];
26
27 nativeCheckInputs = [
28 pytestCheckHook
29 requests-mock
30 ];
31
32 enabledTestPaths = [ "tests/platformrest_tests.py" ];
33
34 pythonImportsCheck = [ "platformrest" ];
35
36 meta = {
37 description = "Python module for consuming the Losant IoT Platform API";
38 homepage = "https://github.com/Losant/losant-rest-python";
39 license = lib.licenses.mit;
40 maintainers = with lib.maintainers; [ fab ];
41 };
42}