nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix
at python-updates 112 lines 2.3 kB view raw
1{ 2 ansicolors, 3 attrs, 4 buildPythonPackage, 5 fetchFromGitHub, 6 fetchpatch, 7 grpcio, 8 grpcio-tools, 9 grpcio-reflection, 10 jinja2, 11 lib, 12 mock, 13 openssh, 14 pexpect, 15 psutil, 16 pyserial, 17 pytestCheckHook, 18 pytest-benchmark, 19 pytest-dependency, 20 pytest-mock, 21 pyudev, 22 pyusb, 23 pyyaml, 24 requests, 25 setuptools, 26 setuptools-scm, 27 xmodem, 28}: 29 30buildPythonPackage rec { 31 pname = "labgrid"; 32 version = "25.0.1"; 33 pyproject = true; 34 35 src = fetchFromGitHub { 36 owner = "labgrid-project"; 37 repo = "labgrid"; 38 tag = "v${version}"; 39 hash = "sha256-cLofkkp2T6Y9nQ5LIS7w9URZlt8DQNN8dm3NnrvcKWY="; 40 }; 41 42 # Remove after package bump 43 patches = [ 44 (fetchpatch { 45 url = "https://github.com/Emantor/labgrid/commit/4a66b43882811d50600e37aa39b24ec40398d184.patch"; 46 sha256 = "sha256-eJMB1qFWiDzQXEB4dYOHYMQqCPHXEWCwWjNNY0yTC2s="; 47 }) 48 (fetchpatch { 49 url = "https://github.com/Emantor/labgrid/commit/d9933b3ec444c35d98fd41685481ecae8ff28bf4.patch"; 50 sha256 = "sha256-Zx5j+CD6Q89dLmTl5QSKI9M1IcZ97OCjEWtEbG+CKWE="; 51 }) 52 (fetchpatch { 53 url = "https://github.com/Emantor/labgrid/commit/f0b672afe1e8976c257f0adff9bf6e7ee9760d6f.patch"; 54 sha256 = "sha256-M7rg+W9SjWDdViWyWe3ERzbUowxzf09c4w1yG3jQGak="; 55 }) 56 ]; 57 58 build-system = [ 59 setuptools 60 setuptools-scm 61 ]; 62 63 dependencies = [ 64 ansicolors 65 attrs 66 jinja2 67 grpcio 68 grpcio-tools 69 grpcio-reflection 70 pexpect 71 pyserial 72 pyudev 73 pyusb 74 pyyaml 75 requests 76 xmodem 77 ]; 78 79 pythonRemoveDeps = [ "pyserial-labgrid" ]; 80 81 pythonImportsCheck = [ "labgrid" ]; 82 83 nativeCheckInputs = [ 84 mock 85 openssh 86 psutil 87 pytestCheckHook 88 pytest-benchmark 89 pytest-mock 90 pytest-dependency 91 ]; 92 93 disabledTests = [ 94 # flaky, timing sensitive 95 "test_timing" 96 97 # flaky, depends on ssh connection 98 "test_argument_device_expansion" 99 "test_argument_file_expansion" 100 "test_local_managedfile" 101 ]; 102 103 pytestFlags = [ "--benchmark-disable" ]; 104 105 meta = { 106 description = "Embedded control & testing library"; 107 homepage = "https://github.com/labgrid-project/labgrid"; 108 license = lib.licenses.lgpl21Plus; 109 maintainers = with lib.maintainers; [ emantor ]; 110 platforms = with lib.platforms; linux; 111 }; 112}