1{ 2 stdenv, 3 lib, 4 buildPythonPackage, 5 fetchPypi, 6 dnspython, 7 chardet, 8 lmtpd, 9 python-daemon, 10 six, 11 jinja2, 12 mock, 13 click, 14}: 15 16buildPythonPackage rec { 17 pname = "salmon-mail"; 18 version = "3.2.0"; 19 format = "setuptools"; 20 21 src = fetchPypi { 22 inherit pname version; 23 sha256 = "0q2m6xri1b7qv46rqpv2qfdgk2jvswj8lpaacnxwjna3m685fhfx"; 24 }; 25 26 nativeCheckInputs = [ 27 jinja2 28 mock 29 ]; 30 propagatedBuildInputs = [ 31 chardet 32 dnspython 33 lmtpd 34 python-daemon 35 six 36 click 37 ]; 38 39 # Darwin tests fail without this. See: 40 # https://github.com/NixOS/nixpkgs/pull/82166#discussion_r399909846 41 __darwinAllowLocalNetworking = true; 42 43 # The tests use salmon executable installed by salmon itself so we need to add 44 # that to PATH 45 checkPhase = '' 46 # tests fail and pytest is not supported 47 rm tests/server_tests.py 48 PATH=$out/bin:$PATH python setup.py test 49 ''; 50 51 meta = with lib; { 52 broken = stdenv.isDarwin; 53 homepage = "https://salmon-mail.readthedocs.org/"; 54 description = "Pythonic mail application server"; 55 mainProgram = "salmon"; 56 license = licenses.gpl3Only; 57 maintainers = with maintainers; [ jluttine ]; 58 }; 59}