Skip to content

Commit 792de8b

Browse files
committed
squash! feat: Add a function for building ELPA-compatible archives
1 parent b35c563 commit 792de8b

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

pkgs/build-support/elisp/convertToElpaArchive.nix

+6-2
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
ename,
88
version,
99
meta,
10-
sourceInfo,
10+
sourceInfo ? null,
1111
packageRequires,
1212
# There are some missing attributes desired for the package description, but
1313
# omit them for now.
@@ -25,6 +25,10 @@ let
2525
+ ")";
2626

2727
hasInfo = builtins.elem "info" drv.outputs;
28+
29+
commitInfo = lib.optionalString (sourceInfo != null && sourceInfo ? rev) ''
30+
:commit "${sourceInfo.rev}"
31+
'';
2832
in
2933
runCommand "${ename}-${version}"
3034
{
@@ -33,7 +37,7 @@ runCommand "${ename}-${version}"
3337
pkgDescription = ''
3438
(define-package "${ename}" "${version}" "${meta.description}"
3539
'${attrsToLispAlist packageRequires}
36-
:commit "${sourceInfo.rev}")
40+
${commitInfo})
3741
;; Local Variables:
3842
;; no-byte-compile: t
3943
;; End:

0 commit comments

Comments
 (0)