depot/third_party/nixpkgs/pkgs/development/python-modules/uxsim/add-qt-plugin-path-to-env.patch
Default email 5c370c0b2a Project import generated by Copybara.
GitOrigin-RevId: 33d1e753c82ffc557b4a585c77de43d4c922ebb5
2024-05-15 17:35:15 +02:00

24 lines
610 B
Diff

diff --git a/uxsim/__init__.py b/uxsim/__init__.py
index 01e1ad1..de1f0fd 100644
--- a/uxsim/__init__.py
+++ b/uxsim/__init__.py
@@ -1,8 +1,14 @@
-from .uxsim import *
-from .utils import *
+import os
+
from .analyzer import *
+from .utils import *
+from .uxsim import *
+
+# Only set our own plugin path if it's not already set
+if not os.getenv("QT_PLUGIN_PATH"):
+ os.environ["QT_PLUGIN_PATH"] = "$NIX_QT_PLUGIN_PATH"
__version__ = "1.1.1"
__author__ = "Toru Seo"
__copyright__ = "Copyright (c) 2023 Toru Seo"
-__license__ = "MIT License"
\ No newline at end of file
+__license__ = "MIT License"