Files
nixpkgs/pkgs/by-name/ne/nemo-python/load-extensions-from-env.patch
Dark Steveneq 646b892680
Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
push sheeet
2025-10-09 14:15:47 +02:00

28 lines
983 B
Diff

diff --git a/src/nemo-python.c b/src/nemo-python.c
index 8d2acdb..900811b 100644
--- a/src/nemo-python.c
+++ b/src/nemo-python.c
@@ -255,6 +255,7 @@ nemo_module_initialize(GTypeModule *module)
{
gchar *user_extensions_dir;
const gchar *env_string;
+ const gchar *python_extensiondir;
env_string = g_getenv("NEMO_PYTHON_DEBUG");
if (env_string != NULL)
@@ -269,8 +270,12 @@ nemo_module_initialize(GTypeModule *module)
all_types = g_array_new(FALSE, FALSE, sizeof(GType));
- // Look in the new global path, $DATADIR/nemo-python/extensions
- nemo_python_load_dir(module, PYTHON_EXTENSION_DIR);
+ // Look in NEMO_PYTHON_EXTENSION_DIR
+ python_extensiondir = g_getenv("NEMO_PYTHON_EXTENSION_DIR");
+ if (python_extensiondir == NULL) {
+ python_extensiondir = PYTHON_EXTENSION_DIR;
+ }
+ nemo_python_load_dir(module, python_extensiondir);
// Look in XDG_DATA_DIR, ~/.local/share/nemo-python/extensions
user_extensions_dir = g_build_filename(g_get_user_data_dir(),