Explicitly pass pos to stdenv.mkDerivation

So `meta.position` will resolve to where the package is defined
instead of pointing to Poetry2nix internals.
This commit is contained in:
adisbladis 2021-09-29 21:21:02 -05:00
parent 73f5524223
commit 8cba73cb68
No known key found for this signature in database
GPG key ID: 110BFAD44C6249B7

View file

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