Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at flake-libs 72 lines 1.5 kB view raw
1{ 2 lib, 3 buildPythonPackage, 4 pythonOlder, 5 fetchFromGitHub, 6 isPyPy, 7 8 # build-system 9 setuptools, 10 11 # propagates 12 markupsafe, 13 14 # optional-dependencies 15 babel, 16 lingua, 17 18 # tests 19 chameleon, 20 mock, 21 pytestCheckHook, 22}: 23 24buildPythonPackage rec { 25 pname = "mako"; 26 version = "1.3.9"; 27 pyproject = true; 28 29 disabled = pythonOlder "3.7"; 30 31 src = fetchFromGitHub { 32 owner = "sqlalchemy"; 33 repo = "mako"; 34 tag = "rel_${lib.replaceStrings [ "." ] [ "_" ] version}"; 35 hash = "sha256-BC1PSmMG9KzD+w8tDUW9WXJS25HNsELgwDpkTHYO9j0="; 36 }; 37 38 build-system = [ setuptools ]; 39 40 dependencies = [ markupsafe ]; 41 42 optional-dependencies = { 43 babel = [ babel ]; 44 lingua = [ lingua ]; 45 }; 46 47 nativeCheckInputs = [ 48 chameleon 49 mock 50 pytestCheckHook 51 ] ++ lib.flatten (lib.attrValues optional-dependencies); 52 53 disabledTests = lib.optionals isPyPy [ 54 # https://github.com/sqlalchemy/mako/issues/315 55 "test_alternating_file_names" 56 # https://github.com/sqlalchemy/mako/issues/238 57 "test_file_success" 58 "test_stdin_success" 59 # fails on pypy2.7 60 "test_bytestring_passthru" 61 ]; 62 63 meta = with lib; { 64 description = "Super-fast templating language"; 65 mainProgram = "mako-render"; 66 homepage = "https://www.makotemplates.org/"; 67 changelog = "https://docs.makotemplates.org/en/latest/changelog.html"; 68 license = licenses.mit; 69 platforms = platforms.unix; 70 maintainers = with maintainers; [ domenkozar ]; 71 }; 72}