about summary refs log tree commit diff
path: root/pkgs/development/python-modules/uxsim/add-qt-plugin-path-to-env.patch
blob: 42f001085d0503551608e7c95ac3a192ef822807 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
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"