Closed eclairevoyant closed 2 weeks ago
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
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.
having a subcommand nix prefetch-url with --as-sri as the default behavior would be nice
nix prefetch-url
--as-sri
nix store prefetch-file prints an SRI hash, maybe that works for you?
nix store prefetch-file
Is your feature request related to a problem? Please describe. Currently, using SRI hashes with
nix-prefetch-url
require an invocation such as:Describe the solution you'd like It'd be far more convenient to have a flag to output SRI hashes directly, e.g.
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.