Merge pull request #307098 from r-ryantm/auto-update/cilium-cli
[NixPkgs.git] / pkgs / development / python-modules / schemdraw / default.nix
blob441e668f81fc70bef6e8ca45a4f89d88c5e19dcf
1 { lib
2 , buildPythonPackage
3 , pythonOlder
4 , fetchFromGitHub
5 , setuptools
6 , pyparsing
7 , matplotlib
8 , latex2mathml
9 , ziafont
10 , ziamath
11 , pytestCheckHook
12 , nbval
15 buildPythonPackage rec {
16   pname = "schemdraw";
17   version = "0.18";
18   format = "pyproject";
20   disabled = pythonOlder "3.8";
22   src = fetchFromGitHub {
23     owner = "cdelker";
24     repo = pname;
25     rev = version;
26     hash = "sha256-JJc3LA+fqB+2g7pPIZ8YMV921EyYpLZrHSJCYyYThZg=";
27   };
29   nativeBuildInputs = [
30     setuptools
31   ];
33   propagatedBuildInputs = [
34     pyparsing
35   ];
37   passthru.optional-dependencies = {
38     matplotlib = [
39       matplotlib
40     ];
41     svgmath = [
42       latex2mathml
43       ziafont
44       ziamath
45     ];
46   };
48   nativeCheckInputs = [
49     pytestCheckHook
50     nbval
51     matplotlib
52     latex2mathml
53     ziafont
54     ziamath
55   ];
57   # Strip out references to unfree fonts from the test suite
58   postPatch = ''
59     substituteInPlace test/test_styles.ipynb --replace "font='Times', " ""
60   '';
62   pytestFlagsArray = [ "--nbval-lax" ];
64   pythonImportsCheck = [ "schemdraw" ];
66   meta = with lib; {
67     description = "A package for producing high-quality electrical circuit schematic diagrams";
68     homepage = "https://schemdraw.readthedocs.io/en/latest/";
69     changelog = "https://schemdraw.readthedocs.io/en/latest/changes.html";
70     license = licenses.mit;
71     maintainers = with maintainers; [ sfrijters ];
72   };