nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{
2 lib,
3 buildPythonPackage,
4 fetchPypi,
5 smartypants,
6 hatchling,
7 pytestCheckHook,
8}:
9
10buildPythonPackage rec {
11 pname = "typogrify";
12 version = "2.1.0";
13 pyproject = true;
14
15 src = fetchPypi {
16 inherit pname version;
17 hash = "sha256-8KoATpgDKm5r5MnaZefrcVDjbKO/UIrbzagrTQA+Ye4=";
18 };
19
20 build-system = [ hatchling ];
21
22 dependencies = [ smartypants ];
23
24 pythonImportsCheck = [ "typogrify.filters" ];
25
26 pytestFlags = [
27 "--doctest-modules"
28 ];
29
30 enabledTestPaths = [
31 "typogrify/filters.py"
32 "typogrify/packages/titlecase/tests.py"
33 ];
34
35 nativeCheckInputs = [
36 pytestCheckHook
37 ];
38
39 meta = {
40 description = "Filters to enhance web typography, including support for Django & Jinja templates";
41 homepage = "https://github.com/justinmayer/typogrify";
42 license = lib.licenses.bsd3;
43 maintainers = with lib.maintainers; [ dotlambda ];
44 };
45}