Merge pull request #222012 from SFrijters/schemdraw

authored by Sandro and committed by GitHub 98140dd0 06c63bcc

+217
+55
pkgs/development/python-modules/latex2mathml/default.nix
··· 1 + { lib 2 + , buildPythonPackage 3 + , pythonOlder 4 + , fetchFromGitHub 5 + , poetry-core 6 + , setuptools 7 + , pytestCheckHook 8 + , multidict 9 + , xmljson 10 + }: 11 + 12 + buildPythonPackage rec { 13 + pname = "latex2mathml"; 14 + version = "3.75.2"; 15 + 16 + disabled = pythonOlder "3.7"; 17 + 18 + src = fetchFromGitHub { 19 + owner = "roniemartinez"; 20 + repo = pname; 21 + rev = version; 22 + hash = "sha256-i/F1B/Rndg66tiKok1PDMK/rT5c2e8upnQrMSCTUzpU="; 23 + }; 24 + 25 + format = "pyproject"; 26 + 27 + nativeBuildInputs = [ 28 + poetry-core 29 + ]; 30 + 31 + propagatedBuildInputs = [ 32 + setuptools # needs pkg_resources at runtime 33 + ]; 34 + 35 + nativeCheckInputs = [ 36 + pytestCheckHook 37 + multidict 38 + xmljson 39 + ]; 40 + 41 + # Disable code coverage in check phase 42 + postPatch = '' 43 + sed -i '/--cov/d' pyproject.toml 44 + ''; 45 + 46 + pythonImportsCheck = [ "latex2mathml" ]; 47 + 48 + meta = with lib; { 49 + description = "Pure Python library for LaTeX to MathML conversion"; 50 + homepage = "https://github.com/roniemartinez/latex2mathml"; 51 + changelog = "https://github.com/roniemartinez/latex2mathml/releases/tag/${version}"; 52 + license = licenses.mit; 53 + maintainers = with maintainers; [ sfrijters ]; 54 + }; 55 + }
+68
pkgs/development/python-modules/schemdraw/default.nix
··· 1 + { lib 2 + , buildPythonPackage 3 + , pythonOlder 4 + , fetchFromBitbucket 5 + , pyparsing 6 + , matplotlib 7 + , latex2mathml 8 + , ziafont 9 + , ziamath 10 + , pytestCheckHook 11 + , nbval 12 + }: 13 + 14 + buildPythonPackage rec { 15 + pname = "schemdraw"; 16 + version = "0.16"; 17 + format = "pyproject"; 18 + 19 + disabled = pythonOlder "3.8"; 20 + 21 + src = fetchFromBitbucket { 22 + owner = "cdelker"; 23 + repo = pname; 24 + rev = version; 25 + hash = "sha256-W9sXtYI8gEwQPRo50taEGT6AQG1tdAbeCtX49eHVvFQ="; 26 + }; 27 + 28 + propagatedBuildInputs = [ 29 + pyparsing 30 + ]; 31 + 32 + passthru.optional-dependencies = { 33 + matplotlib = [ 34 + matplotlib 35 + ]; 36 + svgmath = [ 37 + latex2mathml 38 + ziafont 39 + ziamath 40 + ]; 41 + }; 42 + 43 + nativeCheckInputs = [ 44 + pytestCheckHook 45 + nbval 46 + matplotlib 47 + latex2mathml 48 + ziafont 49 + ziamath 50 + ]; 51 + 52 + # Strip out references to unfree fonts from the test suite 53 + postPatch = '' 54 + substituteInPlace test/test_styles.ipynb --replace "font='Times', " "" 55 + ''; 56 + 57 + pytestFlagsArray = [ "--nbval-lax" ]; 58 + 59 + pythonImportsCheck = [ "schemdraw" ]; 60 + 61 + meta = with lib; { 62 + description = "A package for producing high-quality electrical circuit schematic diagrams"; 63 + homepage = "https://schemdraw.readthedocs.io/en/latest/"; 64 + changelog = "https://schemdraw.readthedocs.io/en/latest/changes.html"; 65 + license = licenses.mit; 66 + maintainers = with maintainers; [ sfrijters ]; 67 + }; 68 + }
+39
pkgs/development/python-modules/ziafont/default.nix
··· 1 + { lib 2 + , buildPythonPackage 3 + , pythonOlder 4 + , fetchFromBitbucket 5 + , pytestCheckHook 6 + , nbval 7 + }: 8 + 9 + buildPythonPackage rec { 10 + pname = "ziafont"; 11 + version = "0.5"; 12 + 13 + disabled = pythonOlder "3.8"; 14 + 15 + src = fetchFromBitbucket { 16 + owner = "cdelker"; 17 + repo = pname; 18 + rev = version; 19 + hash = "sha256-mTQ2yRG+E2nZ2g9eSg+XTzK8A1EgKsRfbvNO3CdYeLg="; 20 + }; 21 + 22 + nativeCheckInputs = [ 23 + pytestCheckHook 24 + nbval 25 + ]; 26 + 27 + preCheck = "rm test/manyfonts.ipynb"; # Tries to download fonts 28 + 29 + pytestFlagsArray = [ "--nbval-lax" ]; 30 + 31 + pythonImportsCheck = [ "ziafont" ]; 32 + 33 + meta = with lib; { 34 + description = "Convert TTF/OTF font glyphs to SVG paths"; 35 + homepage = "https://ziafont.readthedocs.io/en/latest/"; 36 + license = licenses.mit; 37 + maintainers = with maintainers; [ sfrijters ]; 38 + }; 39 + }
+45
pkgs/development/python-modules/ziamath/default.nix
··· 1 + { lib 2 + , buildPythonPackage 3 + , pythonOlder 4 + , fetchFromBitbucket 5 + , ziafont 6 + , pytestCheckHook 7 + , nbval 8 + , latex2mathml 9 + }: 10 + 11 + buildPythonPackage rec { 12 + pname = "ziamath"; 13 + version = "0.7"; 14 + 15 + disabled = pythonOlder "3.8"; 16 + 17 + src = fetchFromBitbucket { 18 + owner = "cdelker"; 19 + repo = pname; 20 + rev = version; 21 + hash = "sha256-JuuCDww0EZEHZLxB5oQrWEJpv0szjwe4iXCRGl7OYTA="; 22 + }; 23 + 24 + propagatedBuildInputs = [ 25 + ziafont 26 + ]; 27 + 28 + nativeCheckInputs = [ 29 + pytestCheckHook 30 + nbval 31 + latex2mathml 32 + ]; 33 + 34 + pytestFlagsArray = [ "--nbval-lax" ]; 35 + 36 + pythonImportsCheck = [ "ziamath" ]; 37 + 38 + meta = with lib; { 39 + description = "Render MathML and LaTeX Math to SVG without Latex installation"; 40 + homepage = "https://ziamath.readthedocs.io/en/latest/"; 41 + changelog = "https://ziamath.readthedocs.io/en/latest/changes.html"; 42 + license = licenses.mit; 43 + maintainers = with maintainers; [ sfrijters ]; 44 + }; 45 + }
+2
pkgs/top-level/all-packages.nix
··· 4795 4795 4796 4796 gladtex = callPackage ../tools/typesetting/tex/gladtex { }; 4797 4797 4798 + latex2mathml = with python3Packages; toPythonApplication latex2mathml; 4799 + 4798 4800 latexrun = callPackage ../tools/typesetting/tex/latexrun { }; 4799 4801 4800 4802 lkproof = callPackage ../tools/typesetting/tex/lkproof { };
+8
pkgs/top-level/python-packages.nix
··· 5341 5341 5342 5342 laszip = callPackage ../development/python-modules/laszip { }; 5343 5343 5344 + latex2mathml = callPackage ../development/python-modules/latex2mathml { }; 5345 + 5344 5346 latexcodec = callPackage ../development/python-modules/latexcodec { }; 5345 5347 5346 5348 latexify-py = callPackage ../development/python-modules/latexify-py { }; ··· 10529 10531 10530 10532 schema-salad = callPackage ../development/python-modules/schema-salad { }; 10531 10533 10534 + schemdraw = callPackage ../development/python-modules/schemdraw { }; 10535 + 10532 10536 schiene = callPackage ../development/python-modules/schiene { }; 10533 10537 10534 10538 schwifty = callPackage ../development/python-modules/schwifty { }; ··· 12933 12937 zfec = callPackage ../development/python-modules/zfec { }; 12934 12938 12935 12939 zha-quirks = callPackage ../development/python-modules/zha-quirks { }; 12940 + 12941 + ziafont = callPackage ../development/python-modules/ziafont { }; 12942 + 12943 + ziamath = callPackage ../development/python-modules/ziamath { }; 12936 12944 12937 12945 zict = callPackage ../development/python-modules/zict { }; 12938 12946