2021-01-25 08:26:54 +00:00
|
|
|
{ lib, buildPythonPackage, fetchPypi, dnspython, chardet, lmtpd
|
2020-03-09 14:43:05 +00:00
|
|
|
, python-daemon, six, jinja2, mock, click }:
|
2017-11-27 06:50:29 +00:00
|
|
|
|
|
|
|
buildPythonPackage rec {
|
2018-01-11 00:52:45 +00:00
|
|
|
pname = "salmon-mail";
|
2020-03-09 14:43:05 +00:00
|
|
|
version = "3.2.0";
|
2017-11-27 06:50:29 +00:00
|
|
|
|
2018-01-11 00:52:45 +00:00
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2020-03-09 14:43:05 +00:00
|
|
|
sha256 = "0q2m6xri1b7qv46rqpv2qfdgk2jvswj8lpaacnxwjna3m685fhfx";
|
2017-11-27 06:50:29 +00:00
|
|
|
};
|
|
|
|
|
2020-03-09 14:43:05 +00:00
|
|
|
checkInputs = [ jinja2 mock ];
|
|
|
|
propagatedBuildInputs = [ chardet dnspython lmtpd python-daemon six click ];
|
|
|
|
|
|
|
|
# Darwin tests fail without this. See:
|
|
|
|
# https://github.com/NixOS/nixpkgs/pull/82166#discussion_r399909846
|
|
|
|
__darwinAllowLocalNetworking = true;
|
2017-11-27 06:50:29 +00:00
|
|
|
|
2018-06-29 12:20:38 +01:00
|
|
|
# The tests use salmon executable installed by salmon itself so we need to add
|
|
|
|
# that to PATH
|
|
|
|
checkPhase = ''
|
2021-01-06 10:35:26 +00:00
|
|
|
# tests fail and pytest is not supported
|
|
|
|
rm tests/server_tests.py
|
2020-03-09 14:43:05 +00:00
|
|
|
PATH=$out/bin:$PATH python setup.py test
|
2018-06-29 12:20:38 +01:00
|
|
|
'';
|
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2020-04-01 02:11:51 +01:00
|
|
|
homepage = "https://salmon-mail.readthedocs.org/";
|
2017-11-27 06:50:29 +00:00
|
|
|
description = "Pythonic mail application server";
|
2021-03-22 16:33:21 +00:00
|
|
|
license = licenses.gpl3Only;
|
2017-11-27 06:50:29 +00:00
|
|
|
maintainers = with maintainers; [ jluttine ];
|
|
|
|
};
|
|
|
|
}
|