1{
2 lib,
3 buildPythonPackage,
4 fetchFromGitHub,
5 pytestCheckHook,
6 pythonOlder,
7 requests-mock,
8 requests,
9 setuptools,
10}:
11
12buildPythonPackage rec {
13 pname = "swisshydrodata";
14 version = "0.2.1";
15 pyproject = true;
16
17 disabled = pythonOlder "3.12";
18
19 src = fetchFromGitHub {
20 owner = "Bouni";
21 repo = "swisshydrodata";
22 rev = "refs/tags/${version}";
23 hash = "sha256-RcVwo61HZ02JEOHsSY/W8j2OTBN25oR2JunLZ5i6yVI=";
24 };
25
26 build-system = [ setuptools ];
27
28 dependencies = [ requests ];
29
30 nativeCheckInputs = [
31 pytestCheckHook
32 requests-mock
33 ];
34
35 pythonImportsCheck = [ "swisshydrodata" ];
36
37 meta = with lib; {
38 description = "Python client to get data from the Swiss federal Office for Environment FEON";
39 homepage = "https://github.com/bouni/swisshydrodata";
40 changelog = "https://github.com/Bouni/swisshydrodata/releases/tag/${version}";
41 license = licenses.mit;
42 maintainers = with maintainers; [ fab ];
43 };
44}