Skip to content

Commit d48bd4a

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

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

pkgs/build-support/elisp/convertToElpaArchive.nix

+5-3
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
}:
66
{
77
ename,
8-
version,
8+
version ? null,
99
meta,
1010
sourceInfo ? null,
1111
packageRequires,
@@ -29,13 +29,15 @@ let
2929
commitInfo = lib.optionalString (sourceInfo != null && sourceInfo ? rev) ''
3030
:commit "${sourceInfo.rev}"
3131
'';
32+
33+
versionString = if version != null then version else "0";
3234
in
33-
runCommand "${ename}-${version}"
35+
runCommand "${ename}-${versionString}"
3436
{
3537
buildInputs = lib.optional hasInfo texinfo;
3638

3739
pkgDescription = ''
38-
(define-package "${ename}" "${version}" "${meta.description}"
40+
(define-package "${ename}" "${versionString}" "${meta.description}"
3941
'${attrsToLispAlist packageRequires}
4042
${commitInfo})
4143
;; Local Variables:

0 commit comments

Comments
 (0)