biome: 1.9.2 -> 1.9.3 (#349335)
[NixPkgs.git] / pkgs / development / python-modules / ots-python / default.nix
blob7aba8368fd8b00171ca7f9223a1b73d4dff18b06
2   lib,
3   buildPythonPackage,
4   fetchPypi,
5   substituteAll,
6   opentype-sanitizer,
7   setuptools-scm,
8   pytestCheckHook,
9 }:
11 buildPythonPackage rec {
12   pname = "ots-python";
13   version = "9.1.0";
14   format = "setuptools";
16   src = fetchPypi {
17     pname = "opentype-sanitizer";
18     inherit version;
19     hash = "sha256-1Zdd+eRECimZl8L8CCkm7pCjN0TafSsc5i2Y6/oH88I=";
20   };
22   patches = [
23     # Invoke ots-sanitize from the opentype-sanitizer package instead of
24     # downloading precompiled binaries from the internet.
25     # (nixpkgs-specific, not upstreamable)
26     (substituteAll {
27       src = ./0001-use-packaged-ots.patch;
28       ots_sanitize = "${opentype-sanitizer}/bin/ots-sanitize";
29     })
30   ];
32   propagatedBuildInputs = [ opentype-sanitizer ];
33   nativeBuildInputs = [ setuptools-scm ];
35   doCheck = true;
36   nativeCheckInputs = [ pytestCheckHook ];
38   meta = with lib; {
39     description = "Python wrapper for ots (OpenType Sanitizer)";
40     homepage = "https://github.com/googlefonts/ots-python";
41     license = licenses.bsd3;
42     maintainers = with maintainers; [ danc86 ];
43   };