mouser: qt6 is added

This commit is contained in:
Quoc Anh Nguyen
2026-08-04 16:46:46 +03:00
parent 466a092c0e
commit a34b66acfa

View File

@@ -3,6 +3,7 @@
stdenv,
fetchFromGitHub,
python3Packages,
qt6,
copyDesktopItems,
makeDesktopItem,
nix-update-script,
@@ -24,10 +25,25 @@ python3Packages.buildPythonApplication (finalAttrs: {
hash = "sha256-Pjcx7YChgu7R8Kdv8fOJcxq98nwh/izpjbOO+4/cdk4=";
};
nativeBuildInputs = lib.optionals stdenv.hostPlatform.isLinux [
nativeBuildInputs = [
qt6.wrapQtAppsHook
]
++ lib.optionals stdenv.hostPlatform.isLinux [
copyDesktopItems
];
# pyside6 does not bundle Qt's QML modules or plugins the way the PyPI
# wheel does, so the QtQuick imports and the SVG image/icon plugins must be
# provided here for wrapQtAppsHook to pick up.
buildInputs = [
qt6.qtbase
qt6.qtdeclarative
qt6.qtsvg
]
++ lib.optionals stdenv.hostPlatform.isLinux [
qt6.qtwayland
];
dependencies =
(with python3Packages; [
pyside6
@@ -89,8 +105,11 @@ python3Packages.buildPythonApplication (finalAttrs: {
runHook postInstall
'';
# The wrapper is created manually below; there is no binary for the hook to wrap.
dontWrapQtApps = true;
postFixup = ''
makeWrapper ${python3Packages.python.interpreter} $out/bin/mouser \
makeQtWrapper ${python3Packages.python.interpreter} $out/bin/mouser \
--prefix PYTHONPATH : "$PYTHONPATH" \
''
+ lib.optionalString stdenv.hostPlatform.isLinux ''