From 9320c69ecb65d25a8eecb32b02652c5ff8443e4d Mon Sep 17 00:00:00 2001 From: Matt Huszagh Date: Sat, 17 Oct 2020 09:32:55 -0700 Subject: [PATCH] kicad: set default footprint, symbol library and package locations Previously, these library locations were set absolutely. This prevented overriding their locations with environment variables. Now, setting the corresponding environment variable will override the setting in the environment wrapper. For instance, I can set KISYSMOD=/some/path/to/footprints and this will be used as my footprint library instead of the default footprint library in the nix store. This feature is particularly useful for having kicad libraries which are writable. --- pkgs/applications/science/electronics/kicad/default.nix | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pkgs/applications/science/electronics/kicad/default.nix b/pkgs/applications/science/electronics/kicad/default.nix index 7bf45a8fc548..7290503311d3 100644 --- a/pkgs/applications/science/electronics/kicad/default.nix +++ b/pkgs/applications/science/electronics/kicad/default.nix @@ -197,13 +197,13 @@ stdenv.mkDerivation rec { "--prefix XDG_DATA_DIRS : ${cups}/share" "--prefix GIO_EXTRA_MODULES : ${gnome3.dconf}/lib/gio/modules" - "--set KISYSMOD ${footprints}/share/kicad/modules" - "--set KICAD_SYMBOL_DIR ${symbols}/share/kicad/library" - "--set KICAD_TEMPLATE_DIR ${templates}/share/kicad/template" + "--set-default KISYSMOD ${footprints}/share/kicad/modules" + "--set-default KICAD_SYMBOL_DIR ${symbols}/share/kicad/library" + "--set-default KICAD_TEMPLATE_DIR ${templates}/share/kicad/template" "--prefix KICAD_TEMPLATE_DIR : ${symbols}/share/kicad/template" "--prefix KICAD_TEMPLATE_DIR : ${footprints}/share/kicad/template" ] - ++ optionals (with3d) [ "--set KISYS3DMOD ${packages3d}/share/kicad/modules/packages3d" ] + ++ optionals (with3d) [ "--set-default KISYS3DMOD ${packages3d}/share/kicad/modules/packages3d" ] ++ optionals (withNgspice) [ "--prefix LD_LIBRARY_PATH : ${libngspice}/lib" ] # infinisil's workaround for #39493