blob: 49e9a3fc2fae2b328c8f3c021df5d230883c9931 (
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
63
|
{
lib,
buildPythonPackage,
fetchFromGitHub,
setuptools,
dnspython,
chardet,
python-daemon,
jinja2,
click,
unittestCheckHook,
}:
buildPythonPackage rec {
pname = "salmon-mail";
version = "3.3.0";
pyproject = true;
src = fetchFromGitHub {
owner = "moggers87";
repo = "salmon";
tag = version;
hash = "sha256-ysBO/ridfy7YPoTsVwAxar9UvfM/qxrx2dp0EtDNLvE=";
};
nativeCheckInputs = [
jinja2
unittestCheckHook
];
build-system = [ setuptools ];
dependencies = [
chardet
click
dnspython
python-daemon
];
pythonImportsCheck = [
"salmon"
"salmon.handlers"
];
# Darwin tests fail without this. See:
# https://github.com/NixOS/nixpkgs/pull/82166#discussion_r399909846
__darwinAllowLocalNetworking = true;
# The tests use salmon executable installed by salmon itself so we need to add
# that to PATH
preCheck = ''
export PATH=$out/bin:$PATH
'';
meta = {
homepage = "https://salmon-mail.readthedocs.org/";
changelog = "https://github.com/moggers87/salmon/blob/${src.rev}/CHANGELOG.rst";
description = "Pythonic mail application server";
mainProgram = "salmon";
license = lib.licenses.gpl3Only;
maintainers = with lib.maintainers; [ jluttine ];
};
}
|