1{
2 lib,
3 buildPythonPackage,
4 fetchFromGitHub,
5 pytestCheckHook,
6 fetchpatch2,
7}:
8
9buildPythonPackage rec {
10 pname = "python-vxi11";
11 version = "0.9";
12
13 # no tests in PyPI tarball
14 src = fetchFromGitHub {
15 owner = "python-ivi";
16 repo = pname;
17 rev = "v${version}";
18 sha256 = "1xv7chp7rm0vrvbz6q57fpwhlgjz461h08q9zgmkcl2l0w96hmsn";
19 };
20
21 patches = [
22 # set of patches from python-ivi/python-vxi11#47
23
24 # Fix deprecation warning
25 (fetchpatch2 {
26 url = "https://github.com/python-ivi/python-vxi11/commit/00722b1b8810ac38bfb47e8c49437055b600dfff.patch?full_index=1";
27 hash = "sha256-fZDhg578UY/Q/2li1EmL5WTPx1OUfyebzvvBVK/IyDU=";
28 })
29
30 # Removes nose dependency
31 (fetchpatch2 {
32 url = "https://github.com/python-ivi/python-vxi11/commit/a8ad324d645d6f7215f207f2cc2988dc49859698.patch?full_index=1";
33 hash = "sha256-nkH6ww4jBypEmZeatEb8fpFTB7x/AMppeEmuH9a4v6I=";
34 })
35 ];
36
37 nativeCheckInputs = [ pytestCheckHook ];
38
39 meta = with lib; {
40 description = "VXI-11 driver for controlling instruments over Ethernet";
41 mainProgram = "vxi11-cli";
42 homepage = "https://github.com/python-ivi/python-vxi11";
43 license = licenses.mit;
44 maintainers = with maintainers; [ bgamari ];
45 };
46}