python3Packages.pytikz-allefeld: init at unstable-2022-11-01

This commit is contained in:
Peder Bergebakken Sundt
2023-12-02 15:58:15 +01:00
parent e50b025876
commit da0bcb8418
2 changed files with 56 additions and 0 deletions
@@ -0,0 +1,54 @@
{ lib
, stdenv
, fetchFromGitHub
, buildPythonPackage
, pythonOlder
, pymupdf
, numpy
, ipython
, texlive
}:
buildPythonPackage rec {
pname = "pytikz-allefeld"; # "pytikz" on pypi is a different module
version = "unstable-2022-11-01";
disabled = pythonOlder "3.5";
src = fetchFromGitHub {
owner = "allefeld";
repo = "pytikz";
rev = "f878ebd6ce5a647b1076228b48181b147a61abc1";
hash = "sha256-G59UUkpjttJKNBN0MB/A9CftO8tO3nv8qlTxt3/fKHk=";
};
propagatedBuildInputs = [
pymupdf
numpy
ipython
];
pythonImportsCheck = [ "tikz" ];
nativeCheckInputs = [ texlive.combined.scheme-small ];
checkPhase = ''
runHook preCheck
python -c 'if 1:
from tikz import *
pic = Picture()
pic.draw(line([(0, 0), (1, 1)]))
print(pic.code())
pic.write_image("test.pdf")
'
test -s test.pdf
runHook postCheck
'';
meta = with lib; {
homepage = "https://github.com/allefeld/pytikz";
description = "A Python interface to TikZ";
license = licenses.gpl3;
maintainers = with maintainers; [ pbsds ];
broken = stdenv.isDarwin;
};
}
+2
View File
@@ -10665,6 +10665,8 @@ self: super: with self; {
pytimeparse2 = callPackage ../development/python-modules/pytimeparse2 { };
pytikz-allefeld = callPackage ../development/python-modules/pytikz-allefeld { };
pytm = callPackage ../development/python-modules/pytm { };
pytmx = callPackage ../development/python-modules/pytmx { };