Add pytec runnables

This commit is contained in:
atse 2024-08-23 11:30:16 +08:00
parent 73c29338af
commit 05d46030b4
4 changed files with 18 additions and 4 deletions

View File

@ -113,6 +113,19 @@
propagatedBuildInputs = [ pyqtgraph pkgs.python3Packages.numpy ];
};
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 pytec.$progname \"\$@\"" >> $outname
chmod 755 $outname
fi
done
'';
thermostat_gui = pkgs.python3Packages.buildPythonPackage {
pname = "thermostat_gui";
version = "0.0.0";
@ -149,7 +162,8 @@
devShell.x86_64-linux = pkgs.mkShell {
name = "thermostat-dev-shell";
buildInputs = with pkgs;
[ rust openocd dfu-util ] ++ (with python3Packages; [
[ rust openocd dfu-util pytec-dev-wrappers ]
++ (with python3Packages; [
numpy
matplotlib
pyqtgraph
@ -159,9 +173,9 @@
pglive
qtextras
]);
shellHook = ''
export PYTHONPATH=`pwd`/pytec:$PYTHONPATH
'';
shellHook = ''
export PYTHONPATH=`pwd`/pytec:$PYTHONPATH
'';
};
defaultPackage.x86_64-linux = thermostat;
};

0
pytec/autotune.py Normal file → Executable file
View File

0
pytec/plot.py Normal file → Executable file
View File

0
pytec/tec_qt.py Normal file → Executable file
View File