diff options
Diffstat (limited to 'nixpkgs/pkgs/development/python-modules/manimpango/default.nix')
-rw-r--r-- | nixpkgs/pkgs/development/python-modules/manimpango/default.nix | 66 |
1 files changed, 66 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/development/python-modules/manimpango/default.nix b/nixpkgs/pkgs/development/python-modules/manimpango/default.nix new file mode 100644 index 000000000000..4219e9a59431 --- /dev/null +++ b/nixpkgs/pkgs/development/python-modules/manimpango/default.nix @@ -0,0 +1,66 @@ +{ lib +, stdenv +, buildPythonPackage +, fetchFromGitHub +, python +, pkg-config +, pango +, cython +, AppKit +, pytestCheckHook +, pythonOlder +}: + +buildPythonPackage rec { + pname = "manimpango"; + version = "0.4.4"; + format = "setuptools"; + + disabled = pythonOlder "3.7"; + + src = fetchFromGitHub { + owner = "ManimCommunity"; + repo = pname; + rev = "refs/tags/v${version}"; + hash = "sha256-M7Wd4s9q+oNioi4JlcQcKSyLRliGgoMzkiXcIznpR5o="; + }; + + 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 ]; + }; +} |