aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--clef/nix/schematic.nix11
-rw-r--r--flake.lock2
2 files changed, 8 insertions, 5 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
diff --git a/flake.lock b/flake.lock
index 62abf7c..2785693 100644
--- a/flake.lock
+++ b/flake.lock
@@ -30,7 +30,7 @@
},
"locked": {
"lastModified": 1,
- "narHash": "sha256-keX8wAIShSwyQpzHeMpzYf4Edqn4XddHu6QvVFrG/3g=",
+ "narHash": "sha256-pkNrmtKW8t9a0kcBS7aoSoo3dk7+YO1roIQJvsnO8mQ=",
"path": "./clef",
"type": "path"
},