Closed rmcgibbo closed 3 years ago
Weird, that the attributes do not have position:
nix-repl> builtins.filter (attr: builtins.unsafeGetAttrPos attr warsow-engine == null) (builtins.attrNames warsow-engine)
[ "curl" "freetype" "libjpeg" "libogg" "libpng" "libtheora" "libvorbis" "zlib" ]
nix-repl> builtins.unsafeGetAttrPos "foo" (builtins.listToAttrs [{name = "foo"; value = 1; }])
{ column = 71; file = "builtins.unsafeGetAttrPos \"foo\" (builtins.listToAttrs [{name = \"foo\"; value = 1; }])\n"; line = 1; }
nix-repl> builtins.unsafeGetAttrPos "foo" (builtins.mapAttrs (n: v: v) { foo = 1; })
null
It looks like mapAttrs
can strip it.
Fixed warsow in https://github.com/NixOS/nixpkgs/pull/114330
Thanks.
Fixes the following crash, against nixpkgs edb5000ea3e02c8fe1caba17c6c329066d6d8ae9