nixos-config/mqtt/shell.nix
2021-03-16 22:14:50 +01:00

15 lines
319 B
Nix

{ pkgs ? import <nixpkgs> { } }:
let
myPython = pkgs.python3.withPackages
(python-packages: with python-packages; [ paho-mqtt ]);
startServer = pkgs.writers.writeBashBin "start-server" ''
${myPython}/bin/python ./heater.py
'';
in pkgs.mkShell {
buildInputs = with pkgs; [ myPython startServer ];
}