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