Cask Domain Specific Language¶
This document provides a reference on the DSL.
- Function package name version description¶
Declare a package with the given name, version and description:
(package "ecukes" "0.2.1" "Cucumber for Emacs.")
All arguments are strings. The version must be a version understood by Emacs’ built-in version-to-list.
- Function package-file file¶
Declare a package by taking the package metadata from the given file. Relative filenames are relative to the directory of the Cask file.
The package name will be the name of the given file, sans directory and extension. The description is taken from the very first line of file. The version and the runtime dependencies are taken from the library headers of file. See Library Headers(elisp) for details about library headers
- Function files &rest patterns¶
Each pattern in patterns is either a simple glob pattern as string or an expression (target pattern...). In the former case, all files matching the pattern (relative to the directory of the Cask file) are included at the top-level of the package.
In the latter case, target is the unqualified target directory within the package, each pattern describes the contents of the package under the target directory recursively.
Hence, the pattern ("*.el" ("resources" ("snippets" "*.snippet"))) would include all .el files from the project root in the package root, and all .snippet files from the project root in the directory resources/snippets under the package root.
- Function depends-on package-name &optional minimum-version¶
- Function depends-on package-name :fetcher repourl &optional :ref hash :branch name :files patterns
Specify a dependency of this package.
package-name is the name of a package which is a dependency of this package.
In the first variant, install the package from a package archive (see source), optionally requiring a minimum-version.
In the second variant, install the package from a VCS repository. Replace fetcher with any of the following: :git, :bzr, :hg, :darcs, :svn or :cvs. repourl is the repository URL to install the package from.
ref and branch specify the commit hash or branch name to install from. If both are omitted, default to the master branch.
files gives the files from the repository to include in the package, in the same format as files. If omitted, try to take the files from the Cask file of the repository.
- Function development &rest body¶
Scope all depends-on expressions in body to development.
- Function source alias¶
- Function source name url
Add a package archive to install dependencies from.
In the first variant, add a built-in package archive. In the second variant, add a package archive with the given name, and the given url.
Cask includes the following built-in package archives:
The standard GNU ELPA archive at http://elpa.gnu.org/.
Unlike an interactive Emacs, Cask does not enable any archive by default. Hence, you must explicitly add the gnu archive if you need it.
- An archive of stable versions built automatically from upstream repositories, at http://melpa-stable.milkbox.net/.
- An archive of VCS snapshots built automatically from upstream repositories, at http://melpa.org/.
- An archive of packages uploaded by users and maintainers, at http://marmalade-repo.org/.
- An archive providing packages for Sunrise Commander, at http://joseito.republika.pl/sunrise-commander/.
Note that unlike the gnu archive, which also provides an org package, this archive provides the org-plus-contrib package, which installs additional extensions for Org Mode maintained by the Org Mode maintainers, which are not included in the standard gnu packages for copyright reasons.