Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
## Unreleased (1.6.0)

* Introduce nix-store-path-omit-self customization option.
* Build logs can now be viewed from `.drv` store buffers as well.

## 1.5.0

Expand Down
5 changes: 4 additions & 1 deletion nix-store.el
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,10 @@ It uses \\[nix-store-show-path] to display the store path."
(defun nix-store-show-log ()
"Opens the log file for the derivation of the nix-store path."
(interactive)
(if-let ((drv-path (car (nix-store-path-derivers nix-buffer-store-path))))
(if-let ((drv-path
(if (string-suffix-p ".drv" (nix-store-path-path nix-buffer-store-path))
(nix-store-path-path nix-buffer-store-path)
(car (nix-store-path-derivers nix-buffer-store-path)))))
(find-file (nix-log-path drv-path))
(user-error "This store path has no associated derivation.")))

Expand Down