2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
buildPythonPackage,
|
|
|
|
fetchPypi,
|
|
|
|
fetchpatch,
|
2024-02-29 20:09:43 +00:00
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
# build-system
|
|
|
|
setuptools,
|
2024-02-29 20:09:43 +00:00
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
# dependencies
|
|
|
|
flask,
|
2024-02-29 20:09:43 +00:00
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
# tests
|
|
|
|
pytestCheckHook,
|
|
|
|
pygments,
|
2022-01-19 23:45:15 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "flask-gravatar";
|
|
|
|
version = "0.5.0";
|
2024-01-02 11:29:13 +00:00
|
|
|
format = "setuptools";
|
2022-01-19 23:45:15 +00:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
pname = "Flask-Gravatar";
|
|
|
|
inherit version;
|
|
|
|
sha256 = "YGZfMcLGEokdto/4Aek+06CIHGyOw0arxk0qmSP1YuE=";
|
|
|
|
};
|
|
|
|
|
2024-02-29 20:09:43 +00:00
|
|
|
patches = [
|
|
|
|
(fetchpatch {
|
|
|
|
# flask 3.0 compat
|
|
|
|
url = "https://github.com/zzzsochi/Flask-Gravatar/commit/d74d70d9695c464b602c96c2383d391b38ed51ac.patch";
|
|
|
|
hash = "sha256-tCKkA2io/jhvrh6RhTeEw4AKnIZc9hsqTf2qItUsdjo=";
|
|
|
|
})
|
|
|
|
];
|
|
|
|
|
2022-01-19 23:45:15 +00:00
|
|
|
postPatch = ''
|
|
|
|
sed -i setup.py \
|
|
|
|
-e "s|tests_require=tests_require,||g" \
|
|
|
|
-e "s|extras_require=extras_require,||g" \
|
|
|
|
-e "s|setup_requires=setup_requires,||g"
|
|
|
|
# pep8 is deprecated and cov not needed
|
|
|
|
substituteInPlace pytest.ini \
|
|
|
|
--replace "--pep8" "" \
|
|
|
|
--replace "--cov=flask_gravatar --cov-report=term-missing" ""
|
|
|
|
'';
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
nativeBuildInputs = [ setuptools ];
|
2024-02-29 20:09:43 +00:00
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
propagatedBuildInputs = [ flask ];
|
2022-01-19 23:45:15 +00:00
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [
|
2022-01-19 23:45:15 +00:00
|
|
|
pytestCheckHook
|
|
|
|
pygments
|
|
|
|
];
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
pythonImportsCheck = [ "flask_gravatar" ];
|
2022-01-19 23:45:15 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
homepage = "https://github.com/zzzsochi/Flask-Gravatar";
|
|
|
|
description = "Small and simple integration of gravatar into flask";
|
|
|
|
license = licenses.bsd3;
|
|
|
|
maintainers = with maintainers; [ gador ];
|
|
|
|
};
|
|
|
|
}
|