blob: 07ba97fc151140ddaedc4e6d036d419809f03c09 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
|
{
lib,
buildPythonPackage,
fetchFromGitHub,
appdirs,
geojson,
hatchling,
requests,
pytestCheckHook,
requests-mock,
versioningit,
}:
buildPythonPackage rec {
pname = "datapoint";
version = "0.13.0";
pyproject = true;
src = fetchFromGitHub {
owner = "Perseudonymous";
repo = "datapoint-python";
tag = version;
hash = "sha256-vgwuoG/2Lzo56cAiXEYNPsXQYfx8Cwg0NJgojDBxoug=";
};
postPatch = ''
substituteInPlace pyproject.toml \
--replace-fail 'dynamic = ["version"]' 'version = "${version}"'
'';
build-system = [
hatchling
versioningit
];
dependencies = [
appdirs
geojson
requests
];
nativeCheckInputs = [
pytestCheckHook
requests-mock
];
pythonImportsCheck = [ "datapoint" ];
meta = {
description = "Python interface to the Met Office's Datapoint API";
homepage = "https://github.com/Perseudonymous/datapoint-python";
changelog = "https://github.com/Perseudonymous/datapoint-python/blob/${src.tag}/CHANGELOG.md";
license = lib.licenses.gpl3Only;
maintainers = with lib.maintainers; [ dotlambda ];
};
}
|