forked from M-Labs/thermostat
flake: Add pytec runnables to devShell
Makes it possible to directly run `plot` and `autotune` in the devShell.
This commit is contained in:
parent
6ec05808ce
commit
d38864740b
14
flake.nix
14
flake.nix
@ -68,6 +68,19 @@
|
|||||||
matplotlib
|
matplotlib
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
pytec-dev-wrappers = pkgs.runCommandNoCC "pytec-dev-wrappers" { } ''
|
||||||
|
mkdir -p $out/bin
|
||||||
|
for program in ${self}/pytec/*.py; do
|
||||||
|
if [ -x $program ]; then
|
||||||
|
progname=`basename -s .py $program`
|
||||||
|
outname=$out/bin/$progname
|
||||||
|
echo "#!${pkgs.bash}/bin/bash" >> $outname
|
||||||
|
echo "exec python3 -m $progname \"\$@\"" >> $outname
|
||||||
|
chmod 755 $outname
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
'';
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
packages.x86_64-linux = {
|
packages.x86_64-linux = {
|
||||||
@ -89,6 +102,7 @@
|
|||||||
openocd
|
openocd
|
||||||
dfu-util
|
dfu-util
|
||||||
rlwrap
|
rlwrap
|
||||||
|
pytec-dev-wrappers
|
||||||
]
|
]
|
||||||
++ (with python3Packages; [
|
++ (with python3Packages; [
|
||||||
numpy
|
numpy
|
||||||
|
0
pytec/autotune.py
Normal file → Executable file
0
pytec/autotune.py
Normal file → Executable file
0
pytec/plot.py
Normal file → Executable file
0
pytec/plot.py
Normal file → Executable file
Loading…
Reference in New Issue
Block a user