2022-06-16 17:23:12 +00:00
|
|
|
{ stdenv, lib, buildPythonPackage, fetchPypi, dnspython, chardet, lmtpd
|
2020-04-24 23:36:52 +00:00
|
|
|
, python-daemon, six, jinja2, mock, click }:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "salmon-mail";
|
|
|
|
version = "3.2.0";
|
2024-01-02 11:29:13 +00:00
|
|
|
format = "setuptools";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
|
|
|
sha256 = "0q2m6xri1b7qv46rqpv2qfdgk2jvswj8lpaacnxwjna3m685fhfx";
|
|
|
|
};
|
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [ jinja2 mock ];
|
2020-04-24 23:36:52 +00:00
|
|
|
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;
|
|
|
|
|
|
|
|
# The tests use salmon executable installed by salmon itself so we need to add
|
|
|
|
# that to PATH
|
|
|
|
checkPhase = ''
|
2021-01-09 10:05:03 +00:00
|
|
|
# tests fail and pytest is not supported
|
|
|
|
rm tests/server_tests.py
|
2020-04-24 23:36:52 +00:00
|
|
|
PATH=$out/bin:$PATH python setup.py test
|
|
|
|
'';
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2022-06-16 17:23:12 +00:00
|
|
|
broken = stdenv.isDarwin;
|
2020-04-24 23:36:52 +00:00
|
|
|
homepage = "https://salmon-mail.readthedocs.org/";
|
|
|
|
description = "Pythonic mail application server";
|
2021-03-20 04:20:00 +00:00
|
|
|
license = licenses.gpl3Only;
|
2020-04-24 23:36:52 +00:00
|
|
|
maintainers = with maintainers; [ jluttine ];
|
|
|
|
};
|
|
|
|
}
|