2024-01-02 11:29:13 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, pythonOlder
|
|
|
|
, fetchFromGitHub
|
|
|
|
, poetry-core
|
|
|
|
, pillow
|
|
|
|
, vacuum-map-parser-base
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "vacuum-map-parser-roborock";
|
2024-05-15 15:35:15 +00:00
|
|
|
version = "0.1.2";
|
2024-01-02 11:29:13 +00:00
|
|
|
pyproject = true;
|
|
|
|
|
|
|
|
disabled = pythonOlder "3.11";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "PiotrMachowski";
|
|
|
|
repo = "Python-package-${pname}";
|
|
|
|
rev = "refs/tags/v${version}";
|
2024-05-15 15:35:15 +00:00
|
|
|
hash = "sha256-y7Q8C7ZvOn/KSUMJ7A/oH+HZMVBpuPitsXqsqHvvYHE=";
|
2024-01-02 11:29:13 +00:00
|
|
|
};
|
|
|
|
|
2024-01-25 14:12:00 +00:00
|
|
|
postPatch = ''
|
|
|
|
# Upstream doesn't set a version in the pyproject.toml file
|
|
|
|
substituteInPlace pyproject.toml \
|
|
|
|
--replace "0.0.0" "${version}"
|
|
|
|
'';
|
|
|
|
|
2024-05-15 15:35:15 +00:00
|
|
|
build-system = [ poetry-core ];
|
2024-01-02 11:29:13 +00:00
|
|
|
|
2024-05-15 15:35:15 +00:00
|
|
|
dependencies = [
|
2024-01-02 11:29:13 +00:00
|
|
|
pillow
|
|
|
|
vacuum-map-parser-base
|
|
|
|
];
|
|
|
|
|
|
|
|
# No tests
|
|
|
|
doCheck = false;
|
|
|
|
|
|
|
|
pythonImportsCheck = [ "vacuum_map_parser_roborock" ];
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Functionalities for Roborock vacuum map parsing";
|
2024-05-15 15:35:15 +00:00
|
|
|
homepage = "https://github.com/PiotrMachowski/Python-package-vacuum-map-parser-roborock";
|
2024-01-02 11:29:13 +00:00
|
|
|
changelog = "https://github.com/PiotrMachowski/Python-package-vacuum-map-parser-roborock/releases/tag/v${version}";
|
|
|
|
maintainers = with maintainers; [ jamiemagee ];
|
|
|
|
license = licenses.asl20;
|
|
|
|
};
|
|
|
|
}
|