nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix
at python-updates 80 lines 1.6 kB view raw
1{ 2 lib, 3 python3Packages, 4 fetchFromGitHub, 5 qt6, 6}: 7 8python3Packages.buildPythonApplication rec { 9 pname = "cfclient"; 10 version = "2025.2"; 11 pyproject = true; 12 13 src = fetchFromGitHub { 14 owner = "bitcraze"; 15 repo = "crazyflie-clients-python"; 16 tag = version; 17 hash = "sha256-LCGTMLIfGH59KFwQACyuEQTh/zkGgzXd3e6MkFTgKhA="; 18 }; 19 20 strictDeps = true; 21 22 buildInputs = [ 23 qt6.qtbase 24 ]; 25 26 nativeBuildInputs = [ 27 qt6.wrapQtAppsHook 28 ]; 29 30 dontWrapQtApps = true; 31 32 build-system = with python3Packages; [ 33 setuptools 34 setuptools-scm 35 ]; 36 37 pythonRelaxDeps = [ 38 "numpy" 39 "pyqt6" 40 "pyzmq" 41 "vispy" 42 ]; 43 44 dependencies = with python3Packages; [ 45 appdirs 46 cflib 47 numpy 48 pyopengl 49 pyserial 50 pysdl2 51 pyqtgraph 52 pyqt6 53 pyqt6-sip 54 pyyaml 55 pyzmq 56 scipy 57 setuptools 58 vispy 59 ]; 60 61 # No tests 62 doCheck = false; 63 64 # Use wrapQtApp for Python scripts as the manual mentions that wrapQtAppsHook only applies to binaries 65 postFixup = '' 66 wrapQtApp "$out/bin/cfclient" \ 67 --set QT_QPA_PLATFORM "wayland" \ 68 --set XDG_CURRENT_DESKTOP "Wayland" \ 69 ''${qtWrapperArgs[@]} 70 ''; 71 72 meta = { 73 description = "Host applications and library for Crazyflie drones written in Python"; 74 homepage = "https://github.com/bitcraze/crazyflie-clients-python"; 75 changelog = "https://github.com/bitcraze/crazyflie-clients-python/releases/tag/${version}"; 76 license = lib.licenses.gpl2Only; 77 maintainers = [ lib.maintainers.brianmcgillion ]; 78 platforms = lib.platforms.linux; 79 }; 80}