Nix shell with python env with libqtile for qtile config hacking

In the source tree of my system/home flake I thought to be smart and wanted to spawn a dev shell with direnv pointing to the following shell.nix:

{ pkgs ? import <nixpkgs> { } }:

pkgs.mkShell {
  name = "qtile-dev-shell";
  # just take the list from
  buildInputs = with pkgs.qtile; propagatedBuildInputs ++ buildInputs ++ nativeBuildInputs;

with the (naive?) expectation that the python in this shell would have everything I need (including references to the correct site-packages picked up by pylance).

But this doesn’t seem to be the case. Is there a trivial/idiomatic way to get a dev shell that gets me the correct env for a qtile config?

Instead you might want to use inputsFrom = [ qtile ]

1 Like

Thanks, didn’t yet know that one.

However, I seem to have made a mistake at another level in this case, since apparently libqtile is an integral part of qtile (and not an input), there’s even no such thing as a separate libqtile it appears…

That means qtile itself has to be an input of the shell, then it works…