about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/python-modules/nidaqmx/default.nix
blob: 937e6c1c91bdca8e0e9e8833ad15dea810b7860d (plain) (blame)
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
{ lib
, buildPythonPackage
, fetchFromGitHub
, six
, numpy
, pytestCheckHook
, pykka
, enum34
, pythonOlder
}:

# Note we currently do not patch the path to the drivers
# because those are not available in Nixpkgs.
# https://github.com/NixOS/nixpkgs/pull/74980

buildPythonPackage rec {
  pname = "nidaqmx";
  version = src.rev;

  src = fetchFromGitHub {
    owner = "ni";
    repo = "nidaqmx-python";
    rev = "0.5.7";
    sha256 = "19m9p99qvdmvvqbwmqrqm6b50x7czgrj07gdsxbbgw04shf5bhrs";
  };

  propagatedBuildInputs = [
    numpy
    six
  ] ++ lib.optionals (pythonOlder "3.4") [
    enum34
  ];

  checkInputs = [
    pytestCheckHook
    pykka
  ];

  dontUseSetuptoolsCheck = true;

  # Older pytest is needed
  # https://github.com/ni/nidaqmx-python/issues/80
  # Fixture "x_series_device" called directly. Fixtures are not meant to be called directly
  doCheck = false;

  pythonCheckImports = [
    "nidaqmx.task"
  ];

  meta = {
    description = "API for interacting with the NI-DAQmx driver";
    license = [ lib.licenses.mit ];
    maintainers = [ lib.maintainers.fridh ];
  };
}