2020-04-24 23:36:52 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchFromGitHub
|
|
|
|
, six
|
|
|
|
, numpy
|
|
|
|
, pytestCheckHook
|
|
|
|
, pykka
|
|
|
|
, enum34
|
|
|
|
, pythonOlder
|
2022-01-13 20:06:32 +00:00
|
|
|
, pythonAtLeast
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
# 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;
|
2024-01-02 11:29:13 +00:00
|
|
|
format = "setuptools";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2022-01-13 20:06:32 +00:00
|
|
|
# 3.10 is not supported, upstream inactive
|
|
|
|
disabled = pythonAtLeast "3.10";
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "ni";
|
|
|
|
repo = "nidaqmx-python";
|
|
|
|
rev = "0.5.7";
|
|
|
|
sha256 = "19m9p99qvdmvvqbwmqrqm6b50x7czgrj07gdsxbbgw04shf5bhrs";
|
|
|
|
};
|
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
numpy
|
|
|
|
six
|
|
|
|
] ++ lib.optionals (pythonOlder "3.4") [
|
|
|
|
enum34
|
|
|
|
];
|
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [
|
2020-04-24 23:36:52 +00:00
|
|
|
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;
|
|
|
|
|
2021-02-05 17:12:51 +00:00
|
|
|
pythonImportsCheck = [
|
2020-04-24 23:36:52 +00:00
|
|
|
"nidaqmx.task"
|
|
|
|
];
|
|
|
|
|
|
|
|
meta = {
|
|
|
|
description = "API for interacting with the NI-DAQmx driver";
|
|
|
|
license = [ lib.licenses.mit ];
|
|
|
|
};
|
|
|
|
}
|