From 78d47efd670aa0a2f0fbe849ef3d269bfafb79db Mon Sep 17 00:00:00 2001 From: Jairo Llopis Date: Tue, 17 Oct 2023 09:46:17 +0100 Subject: [PATCH] feat: allow pip drvs to access config from their parent drv I'm doing custom builds from editable installs in a meta-repo. To get the dirty editable path of a dependency drv, I'd need this patch, to be able to do something like: ```nix {config, ...}: let inherit (config.mkDerivation.passthru) topConfig; fullRelPath = topConfig.lock.content.fetchPipMetadata.sources.${config.name}.path; in ... ``` @moduon MT-1075 --- modules/dream2nix/pip/default.nix | 2 ++ 1 file changed, 2 insertions(+) diff --git a/modules/dream2nix/pip/default.nix b/modules/dream2nix/pip/default.nix index 993a4fac95..0642519443 100644 --- a/modules/dream2nix/pip/default.nix +++ b/modules/dream2nix/pip/default.nix @@ -106,6 +106,8 @@ deps = defaultDeps ++ (l.concatLists (l.map depsByExtra cfg.buildExtras)); in l.map (name: cfg.drvs.${name}.public.out) deps; + + passthru.topConfig = config; }; }; };