Files
nixpkgs/pkgs/development/python-modules/nidaqmx/default.nix
T
Winter a19cd4ffb1 Revert "treewide: replace rev with tag"
This reverts commit 65a333600d.

This wasn't tested for correctness with something like fodwatch [0],
and should not have been (self-)merged so quickly, especially without
further review.

It also resulted in the breakage of at least one package [1] (and that's
the one we know of and was caught).

A few packages that were updated in between this commit and this revert
were not reverted back to using `rev`, but other than that, this is a
1:1 revert.

[0]: https://codeberg.org/raphaelr/fodwatch
[1]: https://github.com/NixOS/nixpkgs/pull/396904 / 758551e458
2025-04-08 02:57:25 -04:00

86 lines
1.5 KiB
Nix

{
lib,
stdenv,
buildPythonPackage,
fetchFromGitHub,
poetry-core,
pythonOlder,
numpy,
deprecation,
hightime,
tzlocal,
python-decouple,
click,
distro,
requests,
sphinx,
sphinx-rtd-theme,
grpcio,
protobuf,
toml,
}:
buildPythonPackage rec {
pname = "nidaqmx";
version = "1.0.2";
pyproject = true;
src = fetchFromGitHub {
owner = "ni";
repo = "nidaqmx-python";
rev = "${version}";
hash = "sha256-rf5cGq3Iv6ucURSUFuFANQzaGeufBZ+adjKlg4B5DRY=";
};
disabled = pythonOlder "3.8";
build-system = [ poetry-core ];
prePatch = ''
substituteInPlace pyproject.toml \
--replace-fail 'poetry.masonry.api' 'poetry.core.masonry.api'
substituteInPlace pyproject.toml \
--replace-fail '["poetry>=1.2"]' '["poetry-core>=1.0.0"]'
'';
dependencies =
[
numpy
deprecation
hightime
tzlocal
python-decouple
click
requests
]
++ lib.optionals stdenv.hostPlatform.isLinux [
distro
];
passthru.optional-dependencies = {
docs = [
sphinx
sphinx-rtd-theme
toml
];
grpc = [
grpcio
protobuf
];
};
# Tests require hardware
doCheck = false;
pythonImportsCheck = [ "nidaqmx" ];
meta = {
changelog = "https://github.com/ni/nidaqmx-python/releases/tag/v${version}";
description = "API for interacting with the NI-DAQmx driver";
homepage = "https://github.com/ni/nidaqmx-python";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ fsagbuya ];
};
}