diff --git a/flake.nix b/flake.nix index ad432c6..bd9882a 100644 --- a/flake.nix +++ b/flake.nix @@ -68,6 +68,19 @@ matplotlib ]; }; + + pythermostat-dev-wrappers = pkgs.runCommandNoCC "pythermostat-dev-wrappers" { } '' + mkdir -p $out/bin + for program in ${self}/pythermostat/*.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 { packages.x86_64-linux = { @@ -89,6 +102,7 @@ openocd dfu-util rlwrap + pythermostat-dev-wrappers ] ++ (with python3Packages; [ numpy diff --git a/pythermostat/autotune.py b/pythermostat/autotune.py old mode 100644 new mode 100755 diff --git a/pythermostat/plot.py b/pythermostat/plot.py old mode 100644 new mode 100755 diff --git a/pythermostat/test.py b/pythermostat/test.py old mode 100644 new mode 100755