diff options
| author | Nathan Perry <np@nathanperry.dev> | 2024-08-13 22:30:33 -0400 |
|---|---|---|
| committer | Nathan Perry <np@nathanperry.dev> | 2024-08-14 01:33:04 -0400 |
| commit | 7f5e8f7d7d467f6dd3321cfa7eb276396a21dc69 (patch) | |
| tree | d64184ea5aa538d463cf8f51a67f6daa7f063372 /nix/board.nix | |
| parent | 37a3b0286918bdb02864b6b57aeb059d6061bc2c (diff) | |
nix: rewrite expressions to be generic
Diffstat (limited to 'nix/board.nix')
| -rw-r--r-- | nix/board.nix | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/nix/board.nix b/nix/board.nix new file mode 100644 index 0000000..49418f0 --- /dev/null +++ b/nix/board.nix @@ -0,0 +1,34 @@ +{ + runCommand, + + svg, + model, + fabrication, + schematic, + panel, + panelSrc, + + name, + outPath, +}: let + pkg = runCommand name {} '' + set -e + + mkdir -p "$out/${outPath}" + cd "$out/${outPath}" + + echo "populating $(pwd)" + + cp --reflink=auto -vr "${schematic}/share/npry/clef/schematic" ./ + cp --reflink=auto -vr "${svg}/share/npry/clef/svg" ./ + cp --reflink=auto -vr "${fabrication}/share/npry/clef/fab" ./ + cp --reflink=auto -vr "${model}/share/npry/clef/model" ./ + cp --reflink=auto -vr "${panelSrc}/share/npry/clef/panel" ./ + ''; + +in pkg.overrideAttrs (prevAttrs: { + passthru = (prevAttrs.passthru or {}) // { + inherit schematic fabrication svg model panel panelSrc; + fab = fabrication; + }; +}) |
