nixos-config/mqtt/shell.nix
Ingolf Wagner 973e3b3305
reformat
2021-11-01 19:30:41 +01:00

20 lines
447 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
'';
reformat = pkgs.writers.writeBashBin "reformat" ''
${pkgs.black}/bin/black --exclude venv ${toString ./.}
'';
in
pkgs.mkShell {
buildInputs = with pkgs; [ myPython startServer reformat ];
}