2022-09-09 14:08:57 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchFromGitHub
|
|
|
|
, requests
|
|
|
|
, django
|
|
|
|
, boto3
|
2024-01-02 11:29:13 +00:00
|
|
|
, hatchling
|
2022-09-09 14:08:57 +00:00
|
|
|
, python
|
|
|
|
, mock
|
2024-01-02 11:29:13 +00:00
|
|
|
, responses
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "django-anymail";
|
2024-01-13 08:15:51 +00:00
|
|
|
version = "10.2";
|
2024-01-02 11:29:13 +00:00
|
|
|
pyproject = true;
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "anymail";
|
|
|
|
repo = pname;
|
2022-05-18 14:49:53 +00:00
|
|
|
rev = "refs/tags/v${version}";
|
2024-01-13 08:15:51 +00:00
|
|
|
hash = "sha256-k4C82OYm2SdjxeLScrkkitumjYgWkMNFlNeGW+C1Z8o=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2024-01-02 11:29:13 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
hatchling
|
|
|
|
];
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
requests
|
|
|
|
django
|
|
|
|
];
|
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [
|
2022-09-09 14:08:57 +00:00
|
|
|
mock
|
2024-01-02 11:29:13 +00:00
|
|
|
responses
|
|
|
|
] ++ passthru.optional-dependencies.amazon-ses;
|
2022-09-09 14:08:57 +00:00
|
|
|
|
2024-01-02 11:29:13 +00:00
|
|
|
passthru.optional-dependencies = {
|
|
|
|
amazon-ses = [ boto3 ];
|
|
|
|
};
|
2022-09-09 14:08:57 +00:00
|
|
|
|
2024-01-02 11:29:13 +00:00
|
|
|
checkPhase = ''
|
|
|
|
runHook preCheck
|
2024-01-13 08:15:51 +00:00
|
|
|
CONTINUOUS_INTEGRATION=1 ${python.interpreter} runtests.py
|
2024-01-02 11:29:13 +00:00
|
|
|
runHook postCheck
|
|
|
|
'';
|
2022-09-09 14:08:57 +00:00
|
|
|
|
2024-01-02 11:29:13 +00:00
|
|
|
pythonImportsCheck = [ "anymail" ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "Django email backends and webhooks for Mailgun";
|
|
|
|
homepage = "https://github.com/anymail/django-anymail";
|
|
|
|
license = licenses.bsd3;
|
2022-09-09 14:08:57 +00:00
|
|
|
maintainers = with maintainers; [ onny ];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|