aboutsummaryrefslogtreecommitdiff
path: root/clef/nix/panel.nix
diff options
context:
space:
mode:
authorNathan Perry <np@nathanperry.dev>2024-09-02 19:53:43 -0400
committerNathan Perry <np@nathanperry.dev>2024-09-02 19:53:43 -0400
commit982798292719a24bcbb4f9e17cd5c65c8a46ecda (patch)
tree11800fcb5a70f21903aeebed407473420bbe0d41 /clef/nix/panel.nix
parent5ddfa32166cee8b2f91f37f9037eb26c182c2125 (diff)
move hw into subdirectory
Diffstat (limited to 'clef/nix/panel.nix')
-rw-r--r--clef/nix/panel.nix46
1 files changed, 0 insertions, 46 deletions
diff --git a/clef/nix/panel.nix b/clef/nix/panel.nix
deleted file mode 100644
index 1d88d46..0000000
--- a/clef/nix/panel.nix
+++ /dev/null
@@ -1,46 +0,0 @@
-{
- kikit,
- runCommand,
-
- nix-filter,
- lib,
-
- panelizeConfigs,
- src,
- pcb_path,
-
- boardName ? (lib.removeSuffix ".kicad_pcb" (builtins.baseNameOf pcb_path)),
-}: let
- sharePath = "share/npry/clef/panel";
-
- panelSrc = nix-filter {
- root = src;
-
- include = [
- (nix-filter.matchExt "kicad_pcb")
- ];
- };
-
-in runCommand "${boardName}.panel" {
- nativeBuildInputs = [
- kikit
- ];
-
- allowedRequisites = [];
-} ''
- set -e
- export HOME=$(mktemp -d)
-
- mkdir -p "$out/${sharePath}"
-
- # do the panelize here rather than in $out because it creates junk we don't want
- cd $HOME
-
- kikit panelize \
- ${lib.concatMapStrings (conf: "-p ${conf} \\\n") panelizeConfigs} \
- "${panelSrc}/${pcb_path}" \
- "panel.kicad_pcb"
-
- cp -v panel.kicad_{pcb,pro} "$out/${sharePath}"
- cp -v "${src}/"*.kicad_{sch,pro} "$out/${sharePath}"
-''