2020-04-24 23:36:52 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
2022-04-27 09:35:20 +00:00
|
|
|
, pythonOlder
|
2020-04-24 23:36:52 +00:00
|
|
|
, fetchPypi
|
2020-10-16 20:44:37 +00:00
|
|
|
, isPyPy
|
2022-04-27 09:35:20 +00:00
|
|
|
|
2024-01-13 08:15:51 +00:00
|
|
|
# build-system
|
|
|
|
, setuptools
|
|
|
|
|
2022-04-27 09:35:20 +00:00
|
|
|
# propagates
|
2020-04-24 23:36:52 +00:00
|
|
|
, markupsafe
|
2022-04-27 09:35:20 +00:00
|
|
|
|
2024-01-13 08:15:51 +00:00
|
|
|
# optional-dependencies
|
2022-05-18 14:49:53 +00:00
|
|
|
, babel
|
2024-01-13 08:15:51 +00:00
|
|
|
, lingua
|
2022-04-27 09:35:20 +00:00
|
|
|
|
|
|
|
# tests
|
2024-01-13 08:15:51 +00:00
|
|
|
, chameleon
|
2020-04-24 23:36:52 +00:00
|
|
|
, mock
|
2020-10-16 20:44:37 +00:00
|
|
|
, pytestCheckHook
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
2023-03-15 16:39:30 +00:00
|
|
|
pname = "mako";
|
2024-05-15 15:35:15 +00:00
|
|
|
version = "1.3.3";
|
2024-01-13 08:15:51 +00:00
|
|
|
pyproject = true;
|
2022-04-27 09:35:20 +00:00
|
|
|
|
|
|
|
disabled = pythonOlder "3.7";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchPypi {
|
2023-03-15 16:39:30 +00:00
|
|
|
pname = "Mako";
|
|
|
|
inherit version;
|
2024-05-15 15:35:15 +00:00
|
|
|
hash = "sha256-4WwB2aucEfcpDu8c/vwJP7WkXuSj2gni/sLk0brlTnM=";
|
2022-04-27 09:35:20 +00:00
|
|
|
};
|
|
|
|
|
2024-01-13 08:15:51 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
setuptools
|
|
|
|
];
|
|
|
|
|
2022-04-27 09:35:20 +00:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
markupsafe
|
|
|
|
];
|
|
|
|
|
2022-06-16 17:23:12 +00:00
|
|
|
passthru.optional-dependencies = {
|
2022-04-27 09:35:20 +00:00
|
|
|
babel = [
|
2022-05-18 14:49:53 +00:00
|
|
|
babel
|
2022-04-27 09:35:20 +00:00
|
|
|
];
|
2024-01-13 08:15:51 +00:00
|
|
|
lingua = [
|
|
|
|
lingua
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [
|
2022-08-12 12:06:08 +00:00
|
|
|
chameleon
|
2022-04-27 09:35:20 +00:00
|
|
|
mock
|
2022-08-12 12:06:08 +00:00
|
|
|
pytestCheckHook
|
2024-01-13 08:15:51 +00:00
|
|
|
] ++ lib.flatten (lib.attrValues passthru.optional-dependencies);
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2020-10-16 20:44:37 +00:00
|
|
|
disabledTests = lib.optionals isPyPy [
|
|
|
|
# https://github.com/sqlalchemy/mako/issues/315
|
|
|
|
"test_alternating_file_names"
|
|
|
|
# https://github.com/sqlalchemy/mako/issues/238
|
|
|
|
"test_file_success"
|
|
|
|
"test_stdin_success"
|
|
|
|
# fails on pypy2.7
|
|
|
|
"test_bytestring_passthru"
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2020-10-16 20:44:37 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "Super-fast templating language";
|
2024-04-21 15:54:59 +00:00
|
|
|
mainProgram = "mako-render";
|
2020-10-16 20:44:37 +00:00
|
|
|
homepage = "https://www.makotemplates.org/";
|
|
|
|
changelog = "https://docs.makotemplates.org/en/latest/changelog.html";
|
|
|
|
license = licenses.mit;
|
|
|
|
platforms = platforms.unix;
|
|
|
|
maintainers = with maintainers; [ domenkozar ];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|