Skip to content

Commit a07e045

Browse files
committed
docs(readme): Update
1 parent dcbf539 commit a07e045

File tree

1 file changed

+15
-6
lines changed

1 file changed

+15
-6
lines changed

README.org

Lines changed: 15 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -134,30 +134,39 @@ Note: Nixpkgs includes an equivalent function in =pkgs/applications/editors/emac
134134
Note that this function may not completely support all of the reference specs.
135135

136136
**** Expanding the files spec a MELPA recipe
137-
=expandMelpaRecipeFiles= function expands =:files= spec in a recipe under a given directory:
137+
=expandMelpaRecipeFiles= function expands =:files= spec in a recipe under a given directory.
138+
This is equivalent to =package-build-expand-file-specs= function in [[https://github.com/melpa/package-build][package-build]], which is used to build packages on MELPA:
138139

139140
#+begin_src nix
140141
expandMelpaRecipeFiles ./. ["*.el" [":excludes" ".dir-locals.el" "*-test.el"]]
141142
#+end_src
142143

143-
It returns a list of matching files relative from the directory:
144+
The first argument must be a path to a directory, and the second argument can be either a list or =null=. When =null= is given as a spec, the default spec of MELPA is used.
145+
146+
It returns an attribute set of matching files relative from the directory:
144147

145148
#+begin_src nix
146-
["hello.el" "hello-utils.el"]
149+
{
150+
"hello.el" = "hello.el";
151+
"hello-utils.el" = "hello-utils.el";
152+
}
147153
#+end_src
148154

149-
The first argument must be a path to a directory, and the second argument can be either a list or =null=. When =null= is given as a spec, the default spec of MELPA is used.
150-
151155
It can be combined with =parseMelpaRecipe=:
152156

153157
#+begin_src nix
154158
let
155159
package = parseMelpaRecipe (builtins.readFile ./awesome-package);
156160
files = expandMelpaRecipeFiles ./. package.files;
157161
in
158-
assert (files == ["awesome-package.el" "awesome-package-utils.el"]);
162+
assert (files == {
163+
"awesome-package.el" = "awesome-package.el";
164+
"awesome-package-utils.el" = "awesome-package-utils.el";
165+
});
159166
...
160167
#+end_src
168+
169+
*Note: This function returned a result in the past, but it now returns an attribute set.*
161170
**** Notes on MELPA recipes
162171
***** Supported recipe specs
163172
:PROPERTIES:

0 commit comments

Comments
 (0)