aboutsummaryrefslogtreecommitdiff
path: root/clef/nix/schematic.nix
diff options
context:
space:
mode:
authorNathan Perry <np@nathanperry.dev>2024-08-14 03:52:50 -0400
committerNathan Perry <np@nathanperry.dev>2024-08-14 03:52:50 -0400
commit64c25cff1e7b47e67be8652386b2c9df1ddb49f3 (patch)
tree1658ba9d7cdf0c3dfee9988a9a8bd5a8daec3093 /clef/nix/schematic.nix
parentdd0b5c571fc4a26864e29658cafd42bdbbc4848d (diff)
nix/schematic: work in src to find local wks files
Diffstat (limited to 'clef/nix/schematic.nix')
-rw-r--r--clef/nix/schematic.nix11
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