Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ 2 stdenv, 3 lib, 4 pythonOlder, 5 buildPythonPackage, 6 fetchFromGitHub, 7 numpy, 8 scipy, 9 pandas, 10 matplotlib, 11 nbval, 12 pyvisa, 13 networkx, 14 ipython, 15 ipykernel, 16 ipywidgets, 17 jupyter-client, 18 sphinx-rtd-theme, 19 sphinx, 20 nbsphinx, 21 openpyxl, 22 setuptools, 23 pytestCheckHook, 24 pytest-cov-stub, 25 pytest-mock, 26}: 27 28buildPythonPackage rec { 29 pname = "scikit-rf"; 30 version = "1.7.0"; 31 pyproject = true; 32 33 disabled = pythonOlder "3.8"; 34 35 src = fetchFromGitHub { 36 owner = "scikit-rf"; 37 repo = "scikit-rf"; 38 tag = "v${version}"; 39 hash = "sha256-Ovrr1U7VuuGKDNSBSCyYSz3DNpaJrA57ccl4AFdzC5E="; 40 }; 41 42 build-system = [ setuptools ]; 43 44 dependencies = [ 45 numpy 46 scipy 47 pandas 48 ]; 49 50 optional-dependencies = { 51 plot = [ matplotlib ]; 52 xlsx = [ openpyxl ]; 53 netw = [ networkx ]; 54 visa = [ pyvisa ]; 55 docs = [ 56 ipython 57 ipykernel 58 ipywidgets 59 jupyter-client 60 sphinx-rtd-theme 61 sphinx 62 nbsphinx 63 openpyxl 64 nbval 65 ]; 66 }; 67 68 env = lib.optionalAttrs stdenv.hostPlatform.isDarwin { MPLBACKEND = "Agg"; }; 69 70 nativeCheckInputs = [ 71 pytest-mock 72 matplotlib 73 pyvisa 74 openpyxl 75 networkx 76 pytestCheckHook 77 pytest-cov-stub 78 ]; 79 80 # test_calibration.py generates a divide by zero error on darwin 81 # https://github.com/scikit-rf/scikit-rf/issues/972 82 disabledTestPaths = lib.optional ( 83 stdenv.hostPlatform.isAarch64 && stdenv.hostPlatform.isDarwin 84 ) "skrf/calibration/tests/test_calibration.py"; 85 86 pythonImportsCheck = [ "skrf" ]; 87 88 meta = with lib; { 89 description = "Python library for RF/Microwave engineering"; 90 homepage = "https://scikit-rf.org/"; 91 changelog = "https://github.com/scikit-rf/scikit-rf/releases/tag/${src.tag}"; 92 license = licenses.bsd3; 93 maintainers = with maintainers; [ lugarun ]; 94 }; 95}