diff options
Diffstat (limited to 'clef/nix/schematic.nix')
| -rw-r--r-- | clef/nix/schematic.nix | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/clef/nix/schematic.nix b/clef/nix/schematic.nix index acc136f..e931dd4 100644 --- a/clef/nix/schematic.nix +++ b/clef/nix/schematic.nix @@ -23,6 +23,9 @@ in runCommand "${schName}.schematic" { include = [ (nix-filter.matchExt "kicad_sch") (nix-filter.matchExt "kicad_pro") + (nix-filter.matchExt "kicad_wks") + + (_args: path: type: type == "directory") ]; }; } '' @@ -32,12 +35,12 @@ in runCommand "${schName}.schematic" { echo "schematic: '${schName}'" >&2 mkdir -p "$out/${sharePath}/svg" - cd "$out/${sharePath}" + cd "$src" - kicad-cli sch export pdf -o schematic.pdf $src/${sch_path} - kicad-cli sch export svg -n -o svg $src/${sch_path} + kicad-cli sch export pdf -o "$out/${sharePath}/schematic.pdf" $src/${sch_path} + kicad-cli sch export svg -n -o "$out/${sharePath}/svg" $src/${sch_path} - cd svg + cd "$out/${sharePath}/svg" # normalize for f in *.svg; do |
