Skip to content

feat: Add description to nix flake show#11129

Closed
fzakaria wants to merge 1 commit intoNixOS:masterfrom
fzakaria:issue-10977
Closed

feat: Add description to nix flake show#11129
fzakaria wants to merge 1 commit intoNixOS:masterfrom
fzakaria:issue-10977

Conversation

@fzakaria
Copy link
Copy Markdown
Contributor

Motivation

Descriptions for nix flake show are already present in the json output but not in the plaintext one.

This adds the analogous description for the non-JSON output.

[fmzakari@nyx:~/code/github.com/NixOS/nix]$ nix flake show /tmp/description/flake.nix
warning: Path '/tmp/description/flake.nix' should point at the directory containing the 'flake.nix' file, not the file itself. Pretending that you meant '/tmp/description'
path:/tmp/description?lastModified=1721160542&narHash=sha256-MXUkJfx4%2B3K8BhShkWGiic/xkzYiO3NCIjuKs2Ji5Xg%3D
└───packages
    └───x86_64-linux
        └───hello-world: package 'hello-world' - A package that emits a file with the words 'hello world'

Context

fixes #10977

Priorities and Process

Add 👍 to pull requests you find important.

The Nix maintainer team uses a GitHub project board to schedule and track reviews.

Descriptions for `nix flake show` are already present in the json output
but not in the plaintext one.

This adds the analogous description for the non-JSON output.
```
[fmzakari@nyx:~/code/github.com/NixOS/nix]$ nix flake show /tmp/description/flake.nix
warning: Path '/tmp/description/flake.nix' should point at the directory containing the 'flake.nix' file, not the file itself. Pretending that you meant '/tmp/description'
path:/tmp/description?lastModified=1721160542&narHash=sha256-MXUkJfx4%2B3K8BhShkWGiic/xkzYiO3NCIjuKs2Ji5Xg%3D
└───packages
    └───x86_64-linux
        └───hello-world: package 'hello-world' - A package that emits a file with the words 'hello world'
```

fixes NixOS#10977
@fzakaria fzakaria requested a review from edolstra as a code owner July 17, 2024 16:08
@github-actions github-actions bot added the new-cli Relating to the "nix" command label Jul 17, 2024
@cole-h
Copy link
Copy Markdown
Member

cole-h commented Jul 17, 2024

Related: #10980

@fzakaria
Copy link
Copy Markdown
Contributor Author

Ah I didn't see an implementation already...
I guess I can close this in favor of @kjeremy PR

@fzakaria fzakaria closed this Jul 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

new-cli Relating to the "nix" command

Projects

None yet

Development

Successfully merging this pull request may close these issues.

nix flake show should show package descriptions if available

2 participants