2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
buildPythonPackage,
|
|
|
|
fetchFromGitHub,
|
|
|
|
fetchpatch2,
|
|
|
|
|
|
|
|
# build system
|
|
|
|
setuptools,
|
|
|
|
|
|
|
|
# dependencies
|
|
|
|
cssutils,
|
|
|
|
lxml,
|
|
|
|
requests,
|
|
|
|
|
|
|
|
# tests
|
|
|
|
ipdb,
|
|
|
|
pytestCheckHook,
|
2023-05-24 13:37:59 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "inlinestyler";
|
|
|
|
version = "0.2.5";
|
2024-04-21 15:54:59 +00:00
|
|
|
pyproject = true;
|
2023-05-24 13:37:59 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "dlanger";
|
|
|
|
repo = "inlinestyler";
|
2024-04-21 15:54:59 +00:00
|
|
|
rev = "refs/tags/${version}";
|
2023-05-24 13:37:59 +00:00
|
|
|
hash = "sha256-9TKXqW+5SiiNXnHW2lOVh3zhFhodM7a1UB2yXsEuX3I=";
|
|
|
|
};
|
|
|
|
|
2024-04-21 15:54:59 +00:00
|
|
|
patches = [
|
|
|
|
# https://github.com/dlanger/inlinestyler/pull/33
|
|
|
|
(fetchpatch2 {
|
|
|
|
url = "https://github.com/dlanger/inlinestyler/commit/29fc1c256fd8f37c3e2fda34c975f0bcfe72cf9a.patch";
|
|
|
|
hash = "sha256-35GWrfvXgpy1KAZ/0pdxsiKNTpDku6/ZX3KWfRUGQmc=";
|
|
|
|
})
|
|
|
|
];
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
build-system = [ setuptools ];
|
2024-04-21 15:54:59 +00:00
|
|
|
|
|
|
|
dependencies = [
|
2023-05-24 13:37:59 +00:00
|
|
|
cssutils
|
|
|
|
lxml
|
|
|
|
requests
|
|
|
|
];
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
pythonImportsCheck = [ "inlinestyler" ];
|
2023-05-24 13:37:59 +00:00
|
|
|
|
|
|
|
nativeCheckInputs = [
|
|
|
|
ipdb
|
|
|
|
pytestCheckHook
|
|
|
|
];
|
|
|
|
|
|
|
|
meta = with lib; {
|
2024-06-20 14:57:18 +00:00
|
|
|
description = "Simple CSS inliner for generating HTML email messages";
|
2023-05-24 13:37:59 +00:00
|
|
|
homepage = "https://github.com/dlanger/inlinestyler";
|
|
|
|
changelog = "https://github.com/dlanger/inlinestyler/blob/${src.rev}/CHANGELOG";
|
|
|
|
license = licenses.bsd3;
|
2024-07-31 10:19:44 +00:00
|
|
|
maintainers = [ ];
|
2023-05-24 13:37:59 +00:00
|
|
|
};
|
|
|
|
}
|