`buildDotnetModule`: add support for installing pre-release tools (#374663)
[NixPkgs.git] / pkgs / development / python-modules / cffsubr / default.nix
blob28332b92d734ec7e9d89a7cf3fab9cca8c41fdcf
2   lib,
3   afdko,
4   buildPythonPackage,
5   cmake,
6   distutils,
7   fetchPypi,
8   fonttools,
9   ninja,
10   pytestCheckHook,
11   scikit-build,
12   setuptools,
13   setuptools-scm,
16 buildPythonPackage rec {
17   pname = "cffsubr";
18   version = "0.3.0";
19   pyproject = true;
21   src = fetchPypi {
22     inherit pname version;
23     hash = "sha256-d0UVC9uBZ5+s3RHB87hwlsT029SVfo/Ou4jEVoeVLvs=";
24   };
26   postPatch = ''
27     substituteInPlace setup.py \
28       --replace-fail 'afdko_output_dir = os.path.join(afdko_root_dir, "build", "bin")' \
29                      'afdko_output_dir = "${lib.getBin afdko}/bin"' \
30       --replace-fail 'build_cmd=build_release_cmd' 'build_cmd="true"'
31   '';
33   build-system = [
34     cmake
35     distutils
36     ninja
37     scikit-build
38     setuptools
39     setuptools-scm
40   ];
42   dontUseCmakeConfigure = true;
44   dependencies = [ fonttools ];
46   nativeCheckInputs = [ pytestCheckHook ];
48   pythonImportsCheck = [ "cffsubr" ];
50   meta = with lib; {
51     changelog = "https://github.com/adobe-type-tools/cffsubr/releases/tag/v${version}";
52     description = "Standalone CFF subroutinizer based on AFDKO tx";
53     mainProgram = "cffsubr";
54     homepage = "https://github.com/adobe-type-tools/cffsubr";
55     license = licenses.asl20;
56     maintainers = [ ];
57   };