1{
2 lib,
3 buildPythonPackage,
4 pythonOlder,
5 fetchFromGitHub,
6 poetry-core,
7 pillow,
8}:
9
10buildPythonPackage rec {
11 pname = "vacuum-map-parser-base";
12 version = "0.1.5";
13 pyproject = true;
14
15 disabled = pythonOlder "3.11";
16
17 src = fetchFromGitHub {
18 owner = "PiotrMachowski";
19 repo = "Python-package-${pname}";
20 tag = "v${version}";
21 hash = "sha256-jB3/m2qlaDnc9fVTlM0wR2ROZmJQ1h6a+awauOa312g=";
22 };
23
24 postPatch = ''
25 # Upstream doesn't set a version in the pyproject.toml file
26 substituteInPlace pyproject.toml \
27 --replace "0.0.0" "${version}"
28 '';
29
30 nativeBuildInputs = [ poetry-core ];
31
32 propagatedBuildInputs = [ pillow ];
33
34 # No tests
35 doCheck = false;
36
37 pythonImportsCheck = [ "vacuum_map_parser_base" ];
38
39 meta = with lib; {
40 homepage = "https://github.com/PiotrMachowski/Python-package-vacuum-map-parser-base";
41 description = "Common code for vacuum map parsers";
42 changelog = "https://github.com/PiotrMachowski/Python-package-vacuum-map-parser-base/releases/tag/${src.tag}";
43 maintainers = with maintainers; [ jamiemagee ];
44 license = licenses.asl20;
45 };
46}