From d64c83953e10cdfa0079d8c33c78feebfea13c17 Mon Sep 17 00:00:00 2001 From: atse Date: Mon, 28 Oct 2024 18:05:59 +0800 Subject: [PATCH] flake: Add pythermostat to PYTHONPATH in devshell For easier testing of PyThermostat client code in the development shell, so that the following is possible right in the repo root: ``` $ python Python 3.11.9 (main, Apr 2 2024, 08:25:04) [GCC 13.2.0] on linux Type "help", "copyright", "credits" or "license" for more information. >>> from pythermostat.client import Client >>> c = Client() >>> ``` --- flake.nix | 3 +++ 1 file changed, 3 insertions(+) diff --git a/flake.nix b/flake.nix index c846d21..f342daf 100644 --- a/flake.nix +++ b/flake.nix @@ -95,6 +95,9 @@ numpy matplotlib ]); + shellHook = '' + export PYTHONPATH=`git rev-parse --show-toplevel`/pythermostat:$PYTHONPATH + ''; }; formatter.x86_64-linux = nixpkgs.legacyPackages.x86_64-linux.nixfmt-rfc-style;