commonPoetryArgs = { pyproject = ./pyproject.toml; poetrylock = ./poetry.lock; }; app = pkgs.poetry2nix.mkPoetryApplication (commonPoetryArgs // { src = ./.; }); # This is an environment that exports all binaries of all dependencies, # wrapped such that they know about the apps python modules env = (pkgs.poetry2nix.mkPoetryEnv commonPoetryArgs).override (old: { extraLibs = [ (app.python.pkgs.toPythonModule app) ]; });