Skip to content

Commit

Permalink
Merge pull request #171 from emacs-twist/hotfix-persist-headers-2
Browse files Browse the repository at this point in the history
Handle null Author header case
  • Loading branch information
akirak authored Jul 21, 2024
2 parents 10d699b + a281e72 commit 41b30c0
Showing 1 changed file with 7 additions and 10 deletions.
17 changes: 7 additions & 10 deletions pkgs/emacs/lock/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -32,16 +32,13 @@ assert (flakeNix || archiveLock); let
];

packageMetadata =
mapAttrs (_: {
src,
version,
packageRequires,
meta,
author,
...
}: {
inherit (src) narHash;
inherit version packageRequires meta author;
mapAttrs (name: attrs: {
inherit (attrs.src) narHash;
inherit (attrs) version packageRequires meta;
# There can be packages that lack Author header, so set null in that case.
author =
attrs.author
or (builtins.trace "Warning: Package ${name} lacks Author header. This still works, but it is considered a bad practice." null);
})
packageInputs;

Expand Down

0 comments on commit 41b30c0

Please sign in to comment.