Klimi's new dotfiles with stow.
Non puoi selezionare più di 25 argomenti Gli argomenti devono iniziare con una lettera o un numero, possono includere trattini ('-') e possono essere lunghi fino a 35 caratteri.

32 righe
849 B

  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