1{ lib 2, buildPythonPackage 3, fetchFromGitHub 4, six 5, numpy 6, pytestCheckHook 7, pykka 8, enum34 9, pythonOlder 10, pythonAtLeast 11}: 12 13# Note we currently do not patch the path to the drivers 14# because those are not available in Nixpkgs. 15# https://github.com/NixOS/nixpkgs/pull/74980 16 17buildPythonPackage rec { 18 pname = "nidaqmx"; 19 version = src.rev; 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 ] ++ lib.optionals (pythonOlder "3.4") [ 35 enum34 36 ]; 37 38 nativeCheckInputs = [ 39 pytestCheckHook 40 pykka 41 ]; 42 43 dontUseSetuptoolsCheck = true; 44 45 # Older pytest is needed 46 # https://github.com/ni/nidaqmx-python/issues/80 47 # Fixture "x_series_device" called directly. Fixtures are not meant to be called directly 48 doCheck = false; 49 50 pythonImportsCheck = [ 51 "nidaqmx.task" 52 ]; 53 54 meta = { 55 description = "API for interacting with the NI-DAQmx driver"; 56 license = [ lib.licenses.mit ]; 57 maintainers = [ lib.maintainers.fridh ]; 58 }; 59}