1{ lib
2, stdenv
3, buildPythonPackage
4, pythonOlder
5, fetchFromGitHub
6, fetchpatch
7, setuptools
8, setuptools-scm
9, jaraco-text
10, jaraco-collections
11, keyring
12, pytestCheckHook
13}:
14
15buildPythonPackage rec {
16 pname = "jaraco-email";
17 version = "3.1.0";
18
19 disabled = pythonOlder "3.7";
20
21 format = "pyproject";
22
23 src = fetchFromGitHub {
24 owner = "jaraco";
25 repo = "jaraco.email";
26 rev = "refs/tags/v${version}";
27 hash = "sha256-MR/SX5jmZvEMULgvQbh0JBZjIosNCPWl1wvEoJbdw4Y=";
28 };
29
30 patches = [
31 (fetchpatch {
32 name = "dos2unix-line-endings.patch";
33 url = "https://github.com/jaraco/jaraco.email/commit/ab9643598e26cca9c9cdbd34b00c972f547b9236.patch";
34 hash = "sha256-Z2WOnR+ELzQciVyUiUq4jaP+Vnc4aseLP7+LWJZoOU8=";
35 })
36 (fetchpatch {
37 name = "jaraco-collections-4-compatibility.patch";
38 url = "https://github.com/jaraco/jaraco.email/commit/e65e5fed0178ddcd009d16883b381c5582f1a9df.patch";
39 hash = "sha256-mKxa0ZU1JFeQPemrjQl94buLNY5gXnMCCRKBxdO870M=";
40 })
41 ];
42
43 nativeBuildInputs = [
44 setuptools
45 setuptools-scm
46 ];
47
48 SETUPTOOLS_SCM_PRETEND_VERSION = version;
49
50 propagatedBuildInputs = [
51 jaraco-text
52 jaraco-collections
53 keyring
54 ];
55
56 pythonImportsCheck = [ "jaraco.email" ];
57
58 nativeCheckInputs = [
59 pytestCheckHook
60 ];
61
62 meta = {
63 changelog = "https://github.com/jaraco/jaraco.email/blob/${src.rev}/CHANGES.rst";
64 description = "E-mail facilities by jaraco";
65 homepage = "https://github.com/jaraco/jaraco.email";
66 license = lib.licenses.mit;
67 maintainers = with lib.maintainers; [ dotlambda ];
68 };
69}