Skip to content

Fix nix-drv-mode display#209

Closed
daanturo wants to merge 1 commit into
NixOS:masterfrom
daanturo:always-pretty
Closed

Fix nix-drv-mode display#209
daanturo wants to merge 1 commit into
NixOS:masterfrom
daanturo:always-pretty

Conversation

@daanturo

@daanturo daanturo commented Jun 4, 2026

Copy link
Copy Markdown

Currently nix-drv-mode prints an unsightly "warning: 'show-derivation' is a deprecated alias for 'derivation show'" at the top of the file. The output is also all squeezed into a single line.

This PR solves those problem, plus using call-process instead of the SHELL-depedent shell-command-to-string.

For example

before

warning: 'show-derivation' is a deprecated alias for 'derivation show'
{"derivations":{"95bv7fc77k99ngjnbm5idzs2zysi7y9n-emacs-30.2.drv":{}},"version":4}

after

{
  "derivations": {
    "95bv7fc77k99ngjnbm5idzs2zysi7y9n-emacs-30.2.drv": {
      // ...
    }
  },
  "version": 4
}

- Always prettify output
- Remove "warning: 'show-derivation' is a deprecated alias for 'derivation show'"
- Only do replacing when visiting file
@daanturo

daanturo commented Jun 4, 2026

Copy link
Copy Markdown
Author

My apology, I didn't notice duplication of #208. I still think that PR should also add always --pretty and guard replacement to file visiting buffers only.

@daanturo daanturo closed this Jun 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant