diff --git a/pkgs/development/python-modules/ezdxf/default.nix b/pkgs/development/python-modules/ezdxf/default.nix index 80c9c467927c..fd6cd988cd00 100644 --- a/pkgs/development/python-modules/ezdxf/default.nix +++ b/pkgs/development/python-modules/ezdxf/default.nix @@ -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 ];