1{ lib
2, buildPythonPackage
3, fetchFromGitHub
4, six
5, numpy
6, pytestCheckHook
7, pykka
8, enum34
9, pythonOlder
10}:
11
12# Note we currently do not patch the path to the drivers
13# because those are not available in Nixpkgs.
14# https://github.com/NixOS/nixpkgs/pull/74980
15
16buildPythonPackage rec {
17 pname = "nidaqmx";
18 version = src.rev;
19
20 src = fetchFromGitHub {
21 owner = "ni";
22 repo = "nidaqmx-python";
23 rev = "0.5.7";
24 sha256 = "19m9p99qvdmvvqbwmqrqm6b50x7czgrj07gdsxbbgw04shf5bhrs";
25 };
26
27 propagatedBuildInputs = [
28 numpy
29 six
30 ] ++ lib.optionals (pythonOlder "3.4") [
31 enum34
32 ];
33
34 checkInputs = [
35 pytestCheckHook
36 pykka
37 ];
38
39 dontUseSetuptoolsCheck = true;
40
41 # Older pytest is needed
42 # https://github.com/ni/nidaqmx-python/issues/80
43 # Fixture "x_series_device" called directly. Fixtures are not meant to be called directly
44 doCheck = false;
45
46 pythonImportsCheck = [
47 "nidaqmx.task"
48 ];
49
50 meta = {
51 description = "API for interacting with the NI-DAQmx driver";
52 license = [ lib.licenses.mit ];
53 maintainers = [ lib.maintainers.fridh ];
54 };
55}