1{ lib, buildPythonPackage, fetchPypi, dnspython, chardet, lmtpd
2, python-daemon, six, jinja2, mock, click }:
3
4buildPythonPackage rec {
5 pname = "salmon-mail";
6 version = "3.2.0";
7
8 src = fetchPypi {
9 inherit pname version;
10 sha256 = "0q2m6xri1b7qv46rqpv2qfdgk2jvswj8lpaacnxwjna3m685fhfx";
11 };
12
13 checkInputs = [ jinja2 mock ];
14 propagatedBuildInputs = [ chardet dnspython lmtpd python-daemon six click ];
15
16 # Darwin tests fail without this. See:
17 # https://github.com/NixOS/nixpkgs/pull/82166#discussion_r399909846
18 __darwinAllowLocalNetworking = true;
19
20 # The tests use salmon executable installed by salmon itself so we need to add
21 # that to PATH
22 checkPhase = ''
23 # tests fail and pytest is not supported
24 rm tests/server_tests.py
25 PATH=$out/bin:$PATH python setup.py test
26 '';
27
28 meta = with lib; {
29 homepage = "https://salmon-mail.readthedocs.org/";
30 description = "Pythonic mail application server";
31 license = licenses.gpl3Only;
32 maintainers = with maintainers; [ jluttine ];
33 };
34}