nixpkgs/pkgs/development/python-modules/nidaqmx/default.nix
Guillaume Girol 33afbf39f6 treewide: switch to nativeCheckInputs
checkInputs used to be added to nativeBuildInputs. Now we have
nativeCheckInputs to do that instead. Doing this treewide change allows
to keep hashes identical to before the introduction of
nativeCheckInputs.
2023-01-21 12:00:00 +00:00

60 lines
1.2 KiB
Nix

{ lib
, buildPythonPackage
, fetchFromGitHub
, six
, numpy
, pytestCheckHook
, pykka
, enum34
, pythonOlder
, pythonAtLeast
}:
# 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;
# 3.10 is not supported, upstream inactive
disabled = pythonAtLeast "3.10";
src = fetchFromGitHub {
owner = "ni";
repo = "nidaqmx-python";
rev = "0.5.7";
sha256 = "19m9p99qvdmvvqbwmqrqm6b50x7czgrj07gdsxbbgw04shf5bhrs";
};
propagatedBuildInputs = [
numpy
six
] ++ lib.optionals (pythonOlder "3.4") [
enum34
];
nativeCheckInputs = [
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;
pythonImportsCheck = [
"nidaqmx.task"
];
meta = {
description = "API for interacting with the NI-DAQmx driver";
license = [ lib.licenses.mit ];
maintainers = [ lib.maintainers.fridh ];
};
}