diff options
author | Lin Jian <me@linj.tech> | 2024-06-01 06:34:39 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-06-01 06:34:39 +0800 |
commit | 30aa05f59ca528b674bf843c4552ab7a5943d41b (patch) | |
tree | a55b38403d8f7db9565c00d0c0d36d3dd4cd6652 /pkgs | |
parent | c31d449150d7510dfa6dbf170ea8fd418620ad2a (diff) | |
parent | 7f5aedecb5e730321e1715130b904a84c4c60c34 (diff) |
Merge pull request #316107 from linj-fork/pr/improve-melpaBuild-ux
melpaBuild: improve UX
Diffstat (limited to 'pkgs')
-rw-r--r-- | pkgs/build-support/emacs/melpa.nix | 32 |
1 files changed, 24 insertions, 8 deletions
diff --git a/pkgs/build-support/emacs/melpa.nix b/pkgs/build-support/emacs/melpa.nix index 323c6e65d9d90..c8f6567049180 100644 --- a/pkgs/build-support/emacs/melpa.nix +++ b/pkgs/build-support/emacs/melpa.nix @@ -35,25 +35,41 @@ in pname /* ename: Original Emacs package name, possibly containing special symbols. + Default: pname */ -, ename ? null +, ename ? pname , version -, recipe + /* + commit: Optional package history commit. + Default: src.rev or "unknown" + This will be written into the generated package but it is not needed during + the build process. + */ +, commit ? (args.src.rev or "unknown") + /* + files: Optional recipe property specifying the files used to build the package. + If null, do not set it in recipe, keeping the default upstream behaviour. + Default: null + */ +, files ? null + /* + recipe: Optional MELPA recipe. + Default: a minimally functional recipe + */ +, recipe ? (writeText "${pname}-recipe" '' + (${ename} :fetcher git :url "" + ${lib.optionalString (files != null) ":files ${files}"}) + '') , meta ? {} , ... }@args: genericBuild ({ - ename = - if ename == null - then pname - else ename; - elpa2nix = ./elpa2nix.el; melpa2nix = ./melpa2nix.el; - inherit packageBuild; + inherit packageBuild commit ename recipe; preUnpack = '' mkdir -p "$NIX_BUILD_TOP/recipes" |