Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

nix flake {update,metadata,...}: shows input's narHash #10249

Open
Kranzes opened this issue Mar 15, 2024 · 2 comments
Open

nix flake {update,metadata,...}: shows input's narHash #10249

Kranzes opened this issue Mar 15, 2024 · 2 comments

Comments

@Kranzes
Copy link
Member

Kranzes commented Mar 15, 2024

Describe the bug

In a recent release the format of the input displayed in nix flake {update,metadata,...} was changed to include the input's narHash, I think that's a bit too verbose for something like the metadata/update commands. I'd like to have the previous format back.

[kranzes@pongo ~/devel/pastebin]$ (master) nix flake metadata
Resolved URL:  git+file:///home/kranzes/devel/pastebin
Locked URL:    git+file:///home/kranzes/devel/pastebin?ref=refs/heads/master&rev=ebca230487b48c895c9ee2a88689a9112e869648
Path:          /nix/store/xnvrrcs1g61gbxvj7jxfrq3453s3clz9-source
Revision:      ebca230487b48c895c9ee2a88689a9112e869648
Revisions:     5
Last modified: 2024-03-07 17:02:08
Inputs:
├───flake-parts: github:hercules-ci/flake-parts/b253292d9c0a5ead9bc98c4e9a26c6312e27d69f?narHash=sha256-a0NYyp%2Bh9hlb7ddVz4LUn1vT/PLwqfrWYcHMvFB1xYg%3D (2024-02-01 23:40:56)
│   └───nixpkgs-lib follows input 'nixpkgs'
├───nixpkgs: github:NixOS/nixpkgs/d53c2037394da6fe98decca417fc8fda64bf2443?narHash=sha256-TsySgcWm/GlbYdL3AEva49ceeI2BdPQ7muwfYNr1fwo%3D (2024-02-28 06:32:26)
└───treefmt-nix: github:numtide/treefmt-nix/e497a9ddecff769c2a7cbab51e1ed7a8501e7a3a?narHash=sha256-QECZB%2BHgz/2F/8lWvHNk05N6NU/rD9bWzuNn6Cv8oUk%3D (2024-02-25 21:40:13)
    └───nixpkgs follows input 'nixpkgs'
[kranzes@pongo ~/devel/pastebin]$ (master) nix shell nixpkgs\#nixVersions.nix_2_20
[kranzes@pongo ~/devel/pastebin]$ (master) nix flake metadata
Resolved URL:  git+file:///home/kranzes/devel/pastebin
Locked URL:    git+file:///home/kranzes/devel/pastebin?ref=refs/heads/master&rev=ebca230487b48c895c9ee2a88689a9112e869648
Path:          /nix/store/xnvrrcs1g61gbxvj7jxfrq3453s3clz9-source
Revision:      ebca230487b48c895c9ee2a88689a9112e869648
Revisions:     5
Last modified: 2024-03-07 17:02:08
Inputs:
├───flake-parts: github:hercules-ci/flake-parts/b253292d9c0a5ead9bc98c4e9a26c6312e27d69f (2024-02-01 23:40:56)
│   └───nixpkgs-lib follows input 'nixpkgs'
├───nixpkgs: github:NixOS/nixpkgs/d53c2037394da6fe98decca417fc8fda64bf2443 (2024-02-28 06:32:26)
└───treefmt-nix: github:numtide/treefmt-nix/e497a9ddecff769c2a7cbab51e1ed7a8501e7a3a (2024-02-25 21:40:13)
    └───nixpkgs follows input 'nixpkgs'

Priorities

Add 👍 to issues you find important.

@Kranzes Kranzes added the bug label Mar 15, 2024
@roberth roberth added the flakes label Mar 22, 2024
@roberth
Copy link
Member

roberth commented Mar 22, 2024

NAR hashes for inputs are on their way out with #10252 or #6530, so sgtm.

@edolstra
Copy link
Member

NAR hashes for inputs are on their way out with #10252 or #6530, so sgtm.

To properly lock a GitHub input, we either need the narHash or treeHash, so those PRs won't solve the verbosity problem unfortunately.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants