diff --git a/flake.nix b/flake.nix index f342daf..416bc39 100644 --- a/flake.nix +++ b/flake.nix @@ -69,6 +69,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/thermostat_$progname + echo "#!${pkgs.bash}/bin/bash" >> $outname + echo "exec python -m $progname \"\$@\"" >> $outname + chmod 755 $outname + fi + done + ''; in { packages.x86_64-linux = { @@ -90,6 +103,7 @@ openocd dfu-util rlwrap + pythermostat-dev-wrappers ] ++ (with python3Packages; [ numpy diff --git a/pythermostat/pythermostat/autotune.py b/pythermostat/pythermostat/autotune.py old mode 100644 new mode 100755 diff --git a/pythermostat/pythermostat/plot.py b/pythermostat/pythermostat/plot.py old mode 100644 new mode 100755 diff --git a/pythermostat/pythermostat/test.py b/pythermostat/pythermostat/test.py old mode 100644 new mode 100755