Skip to content

Commit e0cf766

Browse files
committed
fix: Handle null author case
1 parent 657bcb5 commit e0cf766

File tree

1 file changed

+7
-10
lines changed

1 file changed

+7
-10
lines changed

pkgs/emacs/lock/default.nix

+7-10
Original file line numberDiff line numberDiff line change
@@ -32,16 +32,13 @@ assert (flakeNix || archiveLock); let
3232
];
3333

3434
packageMetadata =
35-
mapAttrs (_: {
36-
src,
37-
version,
38-
packageRequires,
39-
meta,
40-
author,
41-
...
42-
}: {
43-
inherit (src) narHash;
44-
inherit version packageRequires meta author;
35+
mapAttrs (name: attrs: {
36+
inherit (attrs.src) narHash;
37+
inherit (attrs) version packageRequires meta;
38+
# There can be packages that lack Author header, so set null in that case.
39+
author =
40+
attrs.author
41+
or (builtins.trace "warning: Package ${name} lacks Author header." null);
4542
})
4643
packageInputs;
4744

0 commit comments

Comments
 (0)