summaryrefslogtreecommitdiff
path: root/pkgs/development/python-modules/nidaqmx/default.nix
blob: 864a3b98381e397233a740e0fd06315f714123e6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
{
  lib,
  stdenv,
  buildPythonPackage,
  click,
  deprecation,
  distro,
  fetchFromGitHub,
  grpcio,
  hightime,
  numpy,
  poetry-core,
  protobuf,
  python-decouple,
  requests,
  sphinx-rtd-theme,
  sphinx,
  toml,
  tzlocal,
}:

buildPythonPackage rec {
  pname = "nidaqmx";
  version = "1.2.0";
  pyproject = true;

  src = fetchFromGitHub {
    owner = "ni";
    repo = "nidaqmx-python";
    tag = version;
    hash = "sha256-uxf+1nmJ+YFS3zGu+0YP4zOdBlSCHPYC8euqZIGwb00=";
  };

  build-system = [ poetry-core ];

  dependencies = [
    click
    deprecation
    hightime
    numpy
    python-decouple
    requests
    tzlocal
  ]
  ++ lib.optionals stdenv.hostPlatform.isLinux [
    distro
  ];

  optional-dependencies = {
    docs = [
      sphinx
      sphinx-rtd-theme
      toml
    ];
    grpc = [
      grpcio
      protobuf
    ];
  };

  # Tests require hardware
  doCheck = false;

  pythonImportsCheck = [ "nidaqmx" ];

  meta = {
    changelog = "https://github.com/ni/nidaqmx-python/releases/tag/${src.tag}";
    description = "API for interacting with the NI-DAQmx driver";
    homepage = "https://github.com/ni/nidaqmx-python";
    license = lib.licenses.mit;
    maintainers = with lib.maintainers; [ fsagbuya ];
  };
}