Klimi's new dotfiles with stow.
Вы не можете выбрать более 25 тем Темы должны начинаться с буквы или цифры, могут содержать дефисы(-) и должны содержать не более 35 символов.

32 строки
849 B

4 лет назад
  1. ;;; nix-build.el -- run nix commands in Emacs -*- lexical-binding: t -*-
  2. ;; Author: Matthew Bauer <mjbauer95@gmail.com>
  3. ;; Homepage: https://github.com/NixOS/nix-mode
  4. ;; Keywords: nix
  5. ;; This file is NOT part of GNU Emacs.
  6. ;;; Commentary:
  7. ;;; Code:
  8. (require 'nix)
  9. (require 'nix-search)
  10. (defun nix-build (&optional file attr)
  11. "Run nix-build in a compilation buffer.
  12. FILE the file to parse.
  13. ATTR the attribute to build."
  14. (interactive (list (nix-read-file) nil))
  15. (unless attr (setq attr (nix-read-attr file)))
  16. (setq compile-command (format "%s %s -A '%s'" nix-build-executable
  17. file attr))
  18. (setq-default compilation-directory default-directory)
  19. (compilation-start compile-command nil
  20. (apply-partially (lambda (attr _)
  21. (format "*nix-build*<%s>" attr))
  22. attr)))
  23. (provide 'nix-build)
  24. ;;; nix-build.el ends here