Skip to content

Commit 41b30c0

Browse files
authored
Merge pull request #171 from emacs-twist/hotfix-persist-headers-2
Handle null Author header case
2 parents 10d699b + a281e72 commit 41b30c0

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. This still works, but it is considered a bad practice." null);
4542
})
4643
packageInputs;
4744

0 commit comments

Comments
 (0)