2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
buildPythonPackage,
|
|
|
|
braintree,
|
|
|
|
cryptography,
|
|
|
|
django,
|
|
|
|
django-phonenumber-field,
|
|
|
|
fetchFromGitHub,
|
|
|
|
mercadopago,
|
|
|
|
pythonOlder,
|
|
|
|
requests,
|
|
|
|
setuptools-scm,
|
|
|
|
sphinx-rtd-theme,
|
|
|
|
stripe,
|
|
|
|
xmltodict,
|
2023-04-12 12:48:02 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "django-payments";
|
|
|
|
version = "2.0.0";
|
|
|
|
format = "setuptools";
|
|
|
|
|
|
|
|
disabled = pythonOlder "3.7";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "jazzband";
|
|
|
|
repo = "django-payments";
|
|
|
|
rev = "refs/tags/v${version}";
|
|
|
|
hash = "sha256-6WPV08CV+rko/tRnsT5GyTGYaJbiIKTvpisfRwizBIo=";
|
|
|
|
};
|
|
|
|
|
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace setup.py \
|
|
|
|
--replace "django-phonenumber-field[phonenumberslite]" "django-phonenumber-field"
|
|
|
|
'';
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
nativeBuildInputs = [ setuptools-scm ];
|
2023-04-12 12:48:02 +00:00
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
django
|
|
|
|
django-phonenumber-field
|
|
|
|
requests
|
|
|
|
] ++ django-phonenumber-field.optional-dependencies.phonenumbers;
|
|
|
|
|
|
|
|
# require internet connection
|
|
|
|
doCheck = false;
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
pythonImportsCheck = [ "payments" ];
|
2023-04-12 12:48:02 +00:00
|
|
|
|
|
|
|
passthru.optional-dependencies = {
|
2024-06-05 15:53:02 +00:00
|
|
|
all = [
|
|
|
|
braintree # suds-community
|
|
|
|
mercadopago
|
|
|
|
cryptography
|
|
|
|
xmltodict
|
|
|
|
stripe
|
|
|
|
];
|
2023-04-12 12:48:02 +00:00
|
|
|
braintree = [ braintree ];
|
2024-06-05 15:53:02 +00:00
|
|
|
cybersource = [
|
|
|
|
# suds-community
|
|
|
|
];
|
2023-04-12 12:48:02 +00:00
|
|
|
docs = [ sphinx-rtd-theme ];
|
|
|
|
mercadopago = [ mercadopago ];
|
|
|
|
sagepay = [ cryptography ];
|
|
|
|
sofort = [ xmltodict ];
|
|
|
|
stripe = [ stripe ];
|
|
|
|
};
|
|
|
|
|
|
|
|
meta = with lib; {
|
2024-06-20 14:57:18 +00:00
|
|
|
description = "Universal payment handling for Django";
|
2023-04-12 12:48:02 +00:00
|
|
|
homepage = "https://github.com/jazzband/django-payments/";
|
|
|
|
changelog = "https://github.com/jazzband/django-payments/releases/tag/v${version}";
|
|
|
|
license = licenses.bsd3;
|
|
|
|
maintainers = with maintainers; [ derdennisop ];
|
|
|
|
};
|
|
|
|
}
|