depot/third_party/nixpkgs/pkgs/development/python-modules/salmon-mail/default.nix
Default email 159e378cbb Project import generated by Copybara.
GitOrigin-RevId: c04d5652cfa9742b1d519688f65d1bbccea9eb7e
2024-09-19 17:19:46 +03:00

63 lines
1.3 KiB
Nix

{
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";
rev = "refs/tags/${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 = with lib; {
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 = licenses.gpl3Only;
maintainers = with maintainers; [ jluttine ];
};
}