about summary refs log tree commit diff
path: root/nixpkgs/pkgs/applications/science/electronics/kicad/runtime_stock_data_path.patch
blob: 43e99a531cf5ac4278dc322b969cc5ca8c9989d8 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
diff --git a/common/paths.cpp b/common/paths.cpp
index a74cdd9..790cc58 100644
--- a/common/paths.cpp
+++ b/common/paths.cpp
@@ -151,6 +151,10 @@ wxString PATHS::GetStockDataPath( bool aRespectRunFromBuildDir )
 {
     wxString path;

+    if( wxGetEnv( wxT( "NIX_KICAD8_STOCK_DATA_PATH" ), &path ) ) {
+        return path;
+    }
+
     if( aRespectRunFromBuildDir && wxGetEnv( wxT( "KICAD_RUN_FROM_BUILD_DIR" ), nullptr ) )
     {
         // Allow debugging from build dir by placing relevant files/folders in the build root