Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at gcc-offload 96 lines 1.8 kB view raw
1{ 2 lib, 3 buildPythonPackage, 4 fetchFromGitHub, 5 6 # build-system 7 setuptools, 8 9 # dependencies 10 numpy, 11 qtpy, 12 h5py, 13 requests, 14 tomli, 15 16 # tests 17 pytestCheckHook, 18 qt6, 19 pyqt6, 20 21 # passthru.tests 22 guidata, 23 pyside6, 24 qt5, 25 pyqt5, 26 pyside2, 27}: 28 29buildPythonPackage rec { 30 pname = "guidata"; 31 version = "3.7.1"; 32 pyproject = true; 33 34 src = fetchFromGitHub { 35 owner = "PlotPyStack"; 36 repo = "guidata"; 37 rev = "refs/tags/v${version}"; 38 hash = "sha256-Qao10NyqFLysx/9AvORX+EIrQlnQJQhSYkVHeTwIutQ="; 39 }; 40 41 build-system = [ 42 setuptools 43 ]; 44 45 dependencies = [ 46 numpy 47 qtpy 48 h5py 49 requests 50 tomli 51 ]; 52 53 nativeCheckInputs = [ 54 pytestCheckHook 55 # Not propagating this, to allow one to choose to choose a pyqt / pyside 56 # implementation. 57 pyqt6 58 ]; 59 60 preCheck = '' 61 export QT_PLUGIN_PATH="${lib.getBin qt6.qtbase}/${qt6.qtbase.qtPluginPrefix}" 62 export QT_QPA_PLATFORM=offscreen 63 ''; 64 65 pythonImportsCheck = [ "guidata" ]; 66 67 passthru = { 68 tests = { 69 # Should be compatible with all of these Qt implementations 70 withPyQt6 = guidata.override { 71 pyqt6 = pyqt6; 72 qt6 = qt6; 73 }; 74 withPySide6 = guidata.override { 75 pyqt6 = pyside6; 76 qt6 = qt6; 77 }; 78 withPyQt5 = guidata.override { 79 pyqt6 = pyqt5; 80 qt6 = qt5; 81 }; 82 withPySide2 = guidata.override { 83 pyqt6 = pyside2; 84 qt6 = qt5; 85 }; 86 }; 87 }; 88 89 meta = { 90 description = "Python library generating graphical user interfaces for easy dataset editing and display"; 91 homepage = "https://github.com/PlotPyStack/guidata"; 92 changelog = "https://github.com/PlotPyStack/guidata/blob/${src.rev}/CHANGELOG.md"; 93 license = lib.licenses.bsd3; 94 maintainers = with lib.maintainers; [ doronbehar ]; 95 }; 96}