nix icon indicating copy to clipboard operation
nix copied to clipboard

nix-prefetch-url: support SRI hashes directly

Open eclairevoyant opened this issue 1 year ago • 0 comments

Is your feature request related to a problem? Please describe. Currently, using SRI hashes with nix-prefetch-url require an invocation such as:

nix-prefetch-url <url> --type sha256 | xargs nix hash convert --hash-algo sha256

Describe the solution you'd like It'd be far more convenient to have a flag to output SRI hashes directly, e.g.

nix-prefetch-url <url> --type sha256 --as-sri

Or alternatively, use SRI hashes by default, since they're the preferred type in nixpkgs anyway.

Describe alternatives you've considered see above

Additional context

Priorities

Add :+1: to issues you find important.

eclairevoyant avatar Jun 29 '24 07:06 eclairevoyant