2021-03-16 21:09:22 +01:00
|
|
|
{ pkgs ? import <nixpkgs> { } }:
|
|
|
|
let
|
|
|
|
|
2021-03-16 22:14:50 +01:00
|
|
|
myPython = pkgs.python3.withPackages
|
|
|
|
(python-packages: with python-packages; [ paho-mqtt ]);
|
2021-03-16 21:09:22 +01:00
|
|
|
|
|
|
|
startServer = pkgs.writers.writeBashBin "start-server" ''
|
2021-03-16 22:14:50 +01:00
|
|
|
${myPython}/bin/python ./heater.py
|
2021-03-16 21:09:22 +01:00
|
|
|
'';
|
|
|
|
|
|
|
|
in pkgs.mkShell {
|
|
|
|
|
2021-03-16 22:14:50 +01:00
|
|
|
buildInputs = with pkgs; [ myPython startServer ];
|
2021-03-16 21:09:22 +01:00
|
|
|
|
|
|
|
}
|