{ description = "Qt for Python development environment (PySide6, nixos-26.05)"; inputs = { nixpkgs.url = "github:Nixos/nixpkgs/nixos-26.05"; }; outputs = { self, nixpkgs }: let system = "x86_64-linux"; pkgs = nixpkgs.legacyPackages.${system}; python = pkgs.python3.withPackages ( p: with p; [ pyside6 ] ); in { formatter.${system} = pkgs.nixfmt; devShells.${system}.default = pkgs.mkShell { packages = [ python pkgs.qt6.qttools # designer, linguist, assistant pkgs.qt6.qtdoc # offline documentation for Assistant ]; # Platform plugins are found automatically (compiled-in store # paths), but QML imports are NOT: without this export, any # "import QtQuick" fails with "module is not installed". shellHook = '' # uic/rcc (with Python codegen via -g python) live in libexec, # not bin, so they are not on PATH by default. export PATH=${pkgs.qt6.qtbase}/libexec:$PATH export QML_IMPORT_PATH=${pkgs.qt6.qtdeclarative}/lib/qt-6/qml export QML2_IMPORT_PATH=$QML_IMPORT_PATH export QT_DOCS=${pkgs.qt6.qtdoc}/share/doc echo "PySide6 $(python -c 'import PySide6; print(PySide6.__version__)') sur Python $(python -V | cut -d' ' -f2)" echo "Exemples dans ./examples — voir README.md" ''; }; }; }