1{ lib
2, fetchFromGitHub
3, buildPythonPackage
4, setuptools-scm
5, pyserial
6, pyusb
7, pyvisa
8, typing-extensions
9, pytestCheckHook
10}:
11
12buildPythonPackage rec {
13 pname = "pyvisa-py";
14 version = "0.5.3";
15
16 src = fetchFromGitHub {
17 owner = "pyvisa";
18 repo = "pyvisa-py";
19 rev = "refs/tags/${version}";
20 hash = "sha256-37GptqqBSIFOpm6SpS61ZZ9C4iU5AiOduVq255mTRNo=";
21 };
22
23 nativeBuildInputs = [
24 setuptools-scm
25 ];
26
27 propagatedBuildInputs = [
28 pyserial
29 pyusb
30 pyvisa
31 typing-extensions
32 ];
33
34 checkInputs = [
35 pytestCheckHook
36 ];
37
38 postConfigure = ''
39 export SETUPTOOLS_SCM_PRETEND_VERSION="v${version}"
40 '';
41
42 meta = with lib; {
43 description = "PyVISA backend that implements a large part of the Virtual Instrument Software Architecture in pure Python";
44 homepage = "https://github.com/pyvisa/pyvisa-py";
45 license = licenses.mit;
46 maintainers = with maintainers; [ mvnetbiz ];
47 };
48}