From ad4cb865693d2b21ad9b48cdd5aa82b2a765d52f Mon Sep 17 00:00:00 2001 From: DavHau Date: Mon, 11 Sep 2023 22:21:54 +0200 Subject: [PATCH] fix(pip): fix namespace packages collision error --- modules/dream2nix/pip/default.nix | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/modules/dream2nix/pip/default.nix b/modules/dream2nix/pip/default.nix index 25933412..674f7880 100644 --- a/modules/dream2nix/pip/default.nix +++ b/modules/dream2nix/pip/default.nix @@ -147,12 +147,14 @@ in { l.attrValues (l.mapAttrs (name: _: cfg.drvs.${name}.public.out) rootDeps); }; - public.devShell = config.deps.mkShell { - inherit (config.mkDerivation) buildInputs nativeBuildInputs; - packages = [ - (config.deps.python.withPackages - (ps: config.mkDerivation.propagatedBuildInputs)) - ]; - }; + public.devShell = let + pyEnv' = config.deps.python.withPackages (ps: config.mkDerivation.propagatedBuildInputs); + pyEnv = pyEnv'.override (old: { + # namespaced packages are triggering a collision error, but this can be + # safely ignored. They are still set up correctly and can be imported. + ignoreCollisions = true; + }); + in + pyEnv.env; }; }