From 8cba73cb6813d497cf064cb073b1f733cb4190bd Mon Sep 17 00:00:00 2001 From: adisbladis Date: Wed, 29 Sep 2021 21:21:02 -0500 Subject: [PATCH] Explicitly pass pos to stdenv.mkDerivation So `meta.position` will resolve to where the package is defined instead of pointing to Poetry2nix internals. --- default.nix | 3 +++ 1 file changed, 3 insertions(+) diff --git a/default.nix b/default.nix index 22ab121..ae0efbf 100644 --- a/default.nix +++ b/default.nix @@ -339,6 +339,9 @@ lib.makeScope pkgs.newScope (self: { ) { inherit app; }; }; + # Extract position from explicitly passed attrs so meta.position won't point to poetry2nix internals + pos = builtins.unsafeGetAttrPos (lib.elemAt (lib.attrNames attrs) 0) attrs; + meta = lib.optionalAttrs (lib.hasAttr "description" pyProject.tool.poetry) { inherit (pyProject.tool.poetry) description;