Files
nixpkgs/pkgs/development/python-modules/compreffor/default.nix
T
Ihar Hrachyshka 567e8dfd8e treewide: clean up 'meta = with' pattern
This commit was created by a combination of scripts and tools:
- an ast-grep script to prefix things in meta with `lib.`,
- a modified nixf-diagnose / nixf combination to remove unused `with
lib;`, and
- regular nixfmt.

Co-authored-by: Wolfgang Walther <walther@technowledgy.de>
2025-12-10 18:09:49 +01:00

54 lines
1.1 KiB
Nix

{
lib,
buildPythonPackage,
cython,
fetchPypi,
setuptools-scm,
fonttools,
pytestCheckHook,
}:
buildPythonPackage rec {
pname = "compreffor";
version = "0.5.6";
pyproject = true;
src = fetchPypi {
inherit pname version;
hash = "sha256-icE9GDf5SD/gmqZrGe30SQ7ghColye3VIytSXaI/EA4=";
};
postPatch = ''
substituteInPlace pyproject.toml \
--replace-fail '"setuptools_git_ls_files",' ""
substituteInPlace setup.py \
--replace-fail ', "setuptools_git_ls_files"' ""
'';
build-system = [
cython
setuptools-scm
];
dependencies = [ fonttools ];
nativeCheckInputs = [ pytestCheckHook ];
preCheck = ''
# import from $out
mv src/python/compreffor/test .
rm -r src tools
'';
pythonImportsCheck = [ "compreffor" ];
meta = {
changelog = "https://github.com/googlefonts/compreffor/releases/tag/${version}";
description = "CFF table subroutinizer for FontTools";
mainProgram = "compreffor";
homepage = "https://github.com/googlefonts/compreffor";
license = lib.licenses.asl20;
maintainers = [ ];
};
}