1{
2 lib,
3 buildPythonPackage,
4 fetchFromGitHub,
5 six,
6 numpy,
7 pytestCheckHook,
8 pykka,
9 pythonAtLeast,
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 format = "setuptools";
20
21 # 3.10 is not supported, upstream inactive
22 disabled = pythonAtLeast "3.10";
23
24 src = fetchFromGitHub {
25 owner = "ni";
26 repo = "nidaqmx-python";
27 rev = "0.5.7";
28 sha256 = "19m9p99qvdmvvqbwmqrqm6b50x7czgrj07gdsxbbgw04shf5bhrs";
29 };
30
31 propagatedBuildInputs = [
32 numpy
33 six
34 ];
35
36 nativeCheckInputs = [
37 pytestCheckHook
38 pykka
39 ];
40
41 dontUseSetuptoolsCheck = true;
42
43 # Older pytest is needed
44 # https://github.com/ni/nidaqmx-python/issues/80
45 # Fixture "x_series_device" called directly. Fixtures are not meant to be called directly
46 doCheck = false;
47
48 pythonImportsCheck = [ "nidaqmx.task" ];
49
50 meta = {
51 description = "API for interacting with the NI-DAQmx driver";
52 license = [ lib.licenses.mit ];
53 };
54}