python3Packages.ezdxf: add withGui argument

This commit is contained in:
Martin Joerg
2025-12-11 14:32:23 +00:00
parent fd10c63ae3
commit 3cd97b94fa
@@ -15,6 +15,8 @@
matplotlib,
pymupdf,
pyqt5,
withGui ? false,
qt6,
librecad,
}:
@@ -31,12 +33,15 @@ buildPythonPackage rec {
hash = "sha256-p8wvnBIOOcZ8XKPN1b9wsWF9eutSNeeoGSkgLfA/kjQ=";
};
nativeBuildInputs = lib.optionals withGui [ qt6.wrapQtAppsHook ];
dependencies = [
pyparsing
typing-extensions
numpy
fonttools
];
]
++ lib.optionals withGui ([ qt6.qtbase ] ++ optional-dependencies.draw);
optional-dependencies = {
draw = [
@@ -58,6 +63,12 @@ buildPythonPackage rec {
cython
];
dontWrapQtApps = true;
preFixup = lib.optionalString withGui ''
makeWrapperArgs+=("''${qtWrapperArgs[@]}")
'';
checkInputs = [ pillow ];
nativeCheckInputs = [ pytestCheckHook ];