nixpkgs/pkgs/development/python-modules/manimpango/default.nix
Alyssa Ross 2bfa93e01c
treewide: python{ => .pythonForBuild}.interpreter
It won't be enough to fix cross in all cases, but it is in at least
one: pywayland.  I've only made the change in cases I'm confident it's
correct, as it would be wrong to change this when python.interpreter
is used in wrappers, and possibly when it's used for running tests.
2023-02-26 20:26:17 +00:00

66 lines
1.2 KiB
Nix

{ lib
, stdenv
, buildPythonPackage
, fetchFromGitHub
, python
, pkg-config
, pango
, cython
, AppKit
, pytestCheckHook
, pythonOlder
}:
buildPythonPackage rec {
pname = "manimpango";
version = "0.4.3";
format = "setuptools";
disabled = pythonOlder "3.7";
src = fetchFromGitHub {
owner = "ManimCommunity";
repo = pname;
rev = "refs/tags/v${version}";
hash = "sha256-FT3X6TmGfwd8kRPtuqy78ZCGeEGGg6IJEeEpB7ZbIsA=";
};
nativeBuildInputs = [
pkg-config
];
buildInputs = [
pango
] ++ lib.optionals stdenv.isDarwin [
AppKit
];
propagatedBuildInputs = [
cython
];
nativeCheckInputs = [
pytestCheckHook
];
postPatch = ''
substituteInPlace setup.cfg \
--replace "--cov --no-cov-on-fail" ""
'';
preBuild = ''
${python.pythonForBuild.interpreter} setup.py build_ext --inplace
'';
pythonImportsCheck = [
"manimpango"
];
meta = with lib; {
description = "Binding for Pango";
homepage = "https://github.com/ManimCommunity/ManimPango";
changelog = "https://github.com/ManimCommunity/ManimPango/releases/tag/v${version}";
license = licenses.mit;
maintainers = with maintainers; [ emilytrau ];
};
}