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.
This commit is contained in:
adisbladis 2022-01-06 04:57:41 +13:00
parent e74bb4c3f5
commit 97acfb6aa0

View file

@ -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;