1{
2 lib,
3 buildPythonPackage,
4 fetchFromGitHub,
5 fetchpatch2,
6
7 # build system
8 setuptools,
9
10 # dependencies
11 cssutils,
12 lxml,
13 requests,
14
15 # tests
16 ipdb,
17 pytestCheckHook,
18}:
19
20buildPythonPackage rec {
21 pname = "inlinestyler";
22 version = "0.2.5";
23 pyproject = true;
24
25 src = fetchFromGitHub {
26 owner = "dlanger";
27 repo = "inlinestyler";
28 tag = version;
29 hash = "sha256-9TKXqW+5SiiNXnHW2lOVh3zhFhodM7a1UB2yXsEuX3I=";
30 };
31
32 patches = [
33 # https://github.com/dlanger/inlinestyler/pull/33
34 (fetchpatch2 {
35 url = "https://github.com/dlanger/inlinestyler/commit/29fc1c256fd8f37c3e2fda34c975f0bcfe72cf9a.patch";
36 hash = "sha256-35GWrfvXgpy1KAZ/0pdxsiKNTpDku6/ZX3KWfRUGQmc=";
37 })
38 ];
39
40 build-system = [ setuptools ];
41
42 dependencies = [
43 cssutils
44 lxml
45 requests
46 ];
47
48 pythonImportsCheck = [ "inlinestyler" ];
49
50 nativeCheckInputs = [
51 ipdb
52 pytestCheckHook
53 ];
54
55 meta = with lib; {
56 description = "Simple CSS inliner for generating HTML email messages";
57 homepage = "https://github.com/dlanger/inlinestyler";
58 changelog = "https://github.com/dlanger/inlinestyler/blob/${src.rev}/CHANGELOG";
59 license = licenses.bsd3;
60 maintainers = [ ];
61 };
62}