Update Emacs packages
This is a massive diff that I had to do in a hurry - when leaving Urbint. I'm pretty sure that most of these are updating Emacs packages, but I'm not positive.
This commit is contained in:
parent
de97c7bcd0
commit
9da3ffee41
1361 changed files with 16539 additions and 16483 deletions
|
|
@ -0,0 +1,36 @@
|
|||
;;; nix-log.el -- run nix commands in Emacs -*- lexical-binding: t -*-
|
||||
|
||||
;; Author: Matthew Bauer <mjbauer95@gmail.com>
|
||||
;; Homepage: https://github.com/NixOS/nix-mode
|
||||
;; Keywords: nix
|
||||
|
||||
;; This file is NOT part of GNU Emacs.
|
||||
|
||||
;;; Commentary:
|
||||
|
||||
;;; Code:
|
||||
|
||||
(require 'nix)
|
||||
(require 'nix-search)
|
||||
(require 'nix-instantiate)
|
||||
|
||||
(defun nix-log (file attr)
|
||||
"Open the nix log.
|
||||
FILE nix file to parse.
|
||||
ATTR attribute to load the log of."
|
||||
(interactive (list (nix-read-file) nil))
|
||||
(unless attr (setq attr (nix-read-attr file)))
|
||||
|
||||
(let* ((drv-file (nix-instantiate file attr))
|
||||
(drv-name (progn
|
||||
(string-match (format "^%s/\\(.*\\)$" nix-store-dir) drv-file)
|
||||
(match-string 1 drv-file)))
|
||||
(log-file (format "%s/log/nix/drvs/%s/%s.bz2"
|
||||
nix-state-dir
|
||||
(substring drv-name 0 2) drv-name)))
|
||||
(if (file-exists-p log-file)
|
||||
(find-file log-file)
|
||||
(error "No log is available for derivation"))))
|
||||
|
||||
(provide 'nix-log)
|
||||
;;; nix-log.el ends here
|
||||
Loading…
Add table
Add a link
Reference in a new issue