From 97acfb6aa073af95199db37a80cd141a673a1b59 Mon Sep 17 00:00:00 2001 From: adisbladis Date: Thu, 6 Jan 2022 04:57:41 +1300 Subject: [PATCH] Allow unsetting editable package sources by explicitly setting them to null With the recent addition of develop=true being installed as editable by default we need a way to opt out of installing sources as editable. This is done by explicitly passing an attrset with null as the path value. --- default.nix | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/default.nix b/default.nix index 0d7bab7..e6956c0 100644 --- a/default.nix +++ b/default.nix @@ -133,9 +133,11 @@ lib.makeScope pkgs.newScope (self: { inherit python scripts; }; - hasEditable = editablePackageSources != { }; + editablePackageSources' = lib.filterAttrs (name: path: path != null) editablePackageSources; + hasEditable = editablePackageSources' != { }; editablePackage = self.mkPoetryEditablePackage { - inherit pyProject python editablePackageSources; + inherit pyProject python; + editablePackageSources = editablePackageSources'; }; poetryLock = readTOML poetrylock;