python3Packages.orjson: Disable failing tests on 32 bit
[NixPkgs.git] / pkgs / tools / misc / calamares / nixos-extensions-paths.patch
blob4e0012160e9fb5f2dcb13fea6b37bc6c21d9f36d
1 diff --git a/src/calamares/main.cpp b/src/calamares/main.cpp
2 index de709156f..a0b6c5faf 100644
3 --- a/src/calamares/main.cpp
4 +++ b/src/calamares/main.cpp
5 @@ -131,6 +132,8 @@ main( int argc, char* argv[] )
6 // TODO: umount anything in /tmp/calamares-... as an emergency save function
7 #endif
9 + CalamaresUtils::setNixosDirs();
11 bool is_debug = handle_args( a );
13 #ifdef WITH_KF5DBus
14 diff --git a/src/libcalamares/utils/Dirs.cpp b/src/libcalamares/utils/Dirs.cpp
15 index f333d6e64..6118fb412 100644
16 --- a/src/libcalamares/utils/Dirs.cpp
17 +++ b/src/libcalamares/utils/Dirs.cpp
18 @@ -115,6 +116,14 @@ setXdgDirs()
19 s_haveExtraDirs = !( s_extraConfigDirs.isEmpty() && s_extraDataDirs.isEmpty() );
22 +void
23 +setNixosDirs()
25 + s_extraConfigDirs << "/run/current-system/sw/share/calamares/";
26 + s_extraDataDirs << "/run/current-system/sw/share/calamares/";
27 + s_haveExtraDirs = !( s_extraConfigDirs.isEmpty() && s_extraDataDirs.isEmpty() );
30 QStringList
31 extraConfigDirs()
33 diff --git a/src/libcalamares/utils/Dirs.h b/src/libcalamares/utils/Dirs.h
34 index 445cbe1f1..da869d446 100644
35 --- a/src/libcalamares/utils/Dirs.h
36 +++ b/src/libcalamares/utils/Dirs.h
37 @@ -50,6 +50,9 @@ DLLEXPORT bool isAppDataDirOverridden();
38 /** @brief Setup extra config and data dirs from the XDG variables.
40 DLLEXPORT void setXdgDirs();
41 +/** @brief Setup extra config and data dirs fir NixOS.
42 + */
43 +DLLEXPORT void setNixosDirs();
44 /** @brief Are any extra directories configured? */
45 DLLEXPORT bool haveExtraDirs();
46 /** @brief XDG_CONFIG_DIRS, each guaranteed to end with / */