flake: Create TMP dir and use it for $HOME PATH
This commit is contained in:
parent
4d9302a218
commit
ee2e86d796
|
@ -19,7 +19,8 @@
|
||||||
|
|
||||||
buildPhase = ''
|
buildPhase = ''
|
||||||
# kicad-cli requires the use of $HOME
|
# kicad-cli requires the use of $HOME
|
||||||
export HOME=/tmp
|
TMP_DIR="$(pwd)/$(mktemp -d tmp.XXXX)"
|
||||||
|
export HOME=$TMP_DIR
|
||||||
|
|
||||||
if [ "${variant}" != "copper_plate" ]; then
|
if [ "${variant}" != "copper_plate" ]; then
|
||||||
SCH=kirdy_LD_adapter_${variant}.kicad_sch
|
SCH=kirdy_LD_adapter_${variant}.kicad_sch
|
||||||
|
@ -56,6 +57,7 @@
|
||||||
export KICAD7_3DMODEL_DIR=${pkgs.kicad.libraries.packages3d}/share/kicad/3dmodels
|
export KICAD7_3DMODEL_DIR=${pkgs.kicad.libraries.packages3d}/share/kicad/3dmodels
|
||||||
kicad-cli pcb export step $PCB --subst-models --force -o $PREFIX.step
|
kicad-cli pcb export step $PCB --subst-models --force -o $PREFIX.step
|
||||||
fi
|
fi
|
||||||
|
rm -r $TMP_DIR
|
||||||
'';
|
'';
|
||||||
|
|
||||||
installPhase = ''
|
installPhase = ''
|
||||||
|
|
Loading…
Reference in New Issue