nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{ lib
2, buildPythonPackage
3, fetchFromGitHub
4, poetry-core
5, attrs
6, cattrs
7, fonttools
8, fs
9, pytestCheckHook
10, ufo2ft
11, ufoLib2
12}:
13
14buildPythonPackage rec {
15 pname = "statmake";
16 version = "0.4.1";
17
18 format = "pyproject";
19
20 src = fetchFromGitHub {
21 owner = "daltonmaag";
22 repo = "statmake";
23 rev = "v${version}";
24 sha256 = "OXhoQAD4LEh80iRUZE2z8sCtWJDv/bSo0bwHbOOPVE0=";
25 };
26
27 nativeBuildInputs = [
28 poetry-core
29 ];
30
31 propagatedBuildInputs = [
32 attrs
33 cattrs
34 fonttools
35 # required by fonttools[ufo]
36 fs
37 ];
38
39 checkInputs = [
40 pytestCheckHook
41 ufo2ft
42 ufoLib2
43 ];
44
45 postPatch = ''
46 # https://github.com/daltonmaag/statmake/pull/41
47 substituteInPlace pyproject.toml \
48 --replace 'requires = ["poetry>=1.0.0"]' 'requires = ["poetry-core"]' \
49 --replace 'build-backend = "poetry.masonry.api"' 'build-backend = "poetry.core.masonry.api"'
50 '';
51
52 meta = with lib; {
53 description = "Applies STAT information from a Stylespace to a variable font";
54 homepage = "https://github.com/daltonmaag/statmake";
55 license = licenses.mit;
56 maintainers = with maintainers; [ ];
57 };
58}