summaryrefslogtreecommitdiff
path: root/pkgs/development/python-modules/inlinestyler/default.nix
blob: bf0262aac439cc091a28111fe1a5826a76bebb5a (about) (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
57
58
59
60
61
62
{
  lib,
  buildPythonPackage,
  fetchFromGitHub,
  fetchpatch2,

  # build system
  setuptools,

  # dependencies
  cssutils,
  lxml,
  requests,

  # tests
  ipdb,
  pytestCheckHook,
}:

buildPythonPackage rec {
  pname = "inlinestyler";
  version = "0.2.5";
  pyproject = true;

  src = fetchFromGitHub {
    owner = "dlanger";
    repo = "inlinestyler";
    tag = version;
    hash = "sha256-9TKXqW+5SiiNXnHW2lOVh3zhFhodM7a1UB2yXsEuX3I=";
  };

  patches = [
    # https://github.com/dlanger/inlinestyler/pull/33
    (fetchpatch2 {
      url = "https://github.com/dlanger/inlinestyler/commit/29fc1c256fd8f37c3e2fda34c975f0bcfe72cf9a.patch";
      hash = "sha256-35GWrfvXgpy1KAZ/0pdxsiKNTpDku6/ZX3KWfRUGQmc=";
    })
  ];

  build-system = [ setuptools ];

  dependencies = [
    cssutils
    lxml
    requests
  ];

  pythonImportsCheck = [ "inlinestyler" ];

  nativeCheckInputs = [
    ipdb
    pytestCheckHook
  ];

  meta = with lib; {
    description = "Simple CSS inliner for generating HTML email messages";
    homepage = "https://github.com/dlanger/inlinestyler";
    changelog = "https://github.com/dlanger/inlinestyler/blob/${src.rev}/CHANGELOG";
    license = licenses.bsd3;
    maintainers = [ ];
  };
}