这是indexloc提供的服务,不要输入任何密码
Skip to content

yesudeep/rules_elisp

 
 

Repository files navigation

Bazel rules for Emacs Lisp

This repository provides a Bazel integration for Emacs Lisp. It is modeled after the rules definitions for other languages, like the C++ rules.

This is not an officially supported Google product.

Usage

Add a snippet like the following to your Bazel WORKSPACE file:

load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")

http_archive(
    name = "phst_rules_elisp",
    sha256 = "8754266deb5166671d02729457cba167d56bb546fc84e74919f474ebd58b1345",
    strip_prefix = "rules_elisp-743433f5bfd98e611b061f987c412b5ea6622ba9",
    urls = [
        "https://github.com/phst/rules_elisp/archive/743433f5bfd98e611b061f987c412b5ea6622ba9.zip",  # 2021-05-16
    ],
)

load(
    "@phst_rules_elisp//elisp:repositories.bzl",
    "rules_elisp_dependencies",
    "rules_elisp_toolchains",
)

rules_elisp_dependencies()

rules_elisp_toolchains()

Then you can use the elisp_library, elisp_binary, and elisp_test rules. See the generated documentation and the examples in the examples directory for details.

Load path management

The Emacs Lisp rules by default only add the workspace root directories to the load path. However, many Emacs Lisp libraries assume that their immediate parent directory is present in the load path. To support such libraries, the elisp_library rule supports an optional load_path attribute. You can specify additional load path directories using this attribute. Relative directories are relative to the Bazel package directory; absolute directories are relative to the workspace root. A typical use case is to specify load_path = ["."] to add the current package to the load path.

Runfiles

This repository also includes a library to access runfiles. To use it, add a build dependency on @phst_rules_elisp//elisp/runfiles. See the header comments in runfiles.el for further usage hints.


The following symbols are defined in //elisp:defs.bzl:

{% include_relative elisp.md %}


The following symbols are defined in //elisp:repositories.bzl:

{% include_relative repositories.md %}


The following symbols are defined in //emacs:defs.bzl:

{% include_relative emacs.md %}

About

Bazel rules for Emacs Lisp

Resources

License

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Starlark 38.4%
  • Emacs Lisp 37.1%
  • Python 8.6%
  • C++ 8.1%
  • Go 5.0%
  • Makefile 1.7%
  • Shell 1.1%