nix3-hash-convert(1)
π nix3-hash-convert(1) β General Commands Manual π
Warning β οΈ bestie, this program is experimental and its interface is subject to change. Like, it might get a glow-up and ghost you. Proceed with that in mind, fr fr.
β¨ Name β¨
nix hash convert β convert between hash formats π¦
πΈ Synopsis πΈ
nix hash convert [optionβ¦] hashesβ¦
π Examples π
- Convert a hash to nix32 (Nix's variant of Base32 encoding). iconic behaviour, honestly.
$ nix hash convert --hash-algo sha1 --to nix32 800d59cfcd3c05e900cb4e214be48f6b886a08df
vw46m23bizj4n8afrc0fj19wrp7mj3c0
- Convert a hash to the sri format that includes an algorithm specification. it's giving certified with provenance π
# nix hash convert --hash-algo sha1 800d59cfcd3c05e900cb4e214be48f6b886a08df
sha1-gA1Zz808BekAy04hS+SPa4hqCN8=
or with an explicit --to format:
# nix hash convert --hash-algo sha1 --to sri 800d59cfcd3c05e900cb4e214be48f6b886a08df
sha1-gA1Zz808BekAy04hS+SPa4hqCN8=
- Assert the input format of the hash. vibe check time β if the hash doesn't match, it WILL call it out π
# nix hash convert --hash-algo sha256 --from nix32 ungWv48Bz+pBQUDeXa4iI7ADYaOWF3qctBD/YfIAFa0=
error: input hash 'ungWv48Bz+pBQUDeXa4iI7ADYaOWF3qctBD/YfIAFa0=' has format 'base64', but '--from nix32' was specified
# nix hash convert --hash-algo sha256 --from nix32 1b8m03r63zqhnjf7l5wnldhh7c134ap5vpj0850ymkq1iyzicy5s
sha256-ungWv48Bz+pBQUDeXa4iI7ADYaOWF3qctBD/YfIAFa0=
π«Ά Description π«Ά
nix hash convert converts hashes from one encoding to another. that's the whole job. glow-up for your hashes, no cap. β¨
π Options π
--fromhash-format β Hash format (base16,nix32,base64,sri).--hash-algohash-algo β Hash algorithm (blake3,md5,sha1,sha256, orsha512). Can be omitted for SRI hashes, she's flexible like that πββοΈ--tohash-format β Hash format (base16,nix32,base64,sri). Default:sri.
π Logging-related options π
--debugβ Set the logging verbosity level to 'debug'. she's telling you EVERYTHING.--log-formatformat β Set the format of log output; one ofraw,internal-json,barorbar-with-logs.--print-build-logs,-Lβ Print full build logs on standard error.--quietβ Decrease the logging verbosity level. shhh π€«--verbose,-vβ Increase the logging verbosity level.
π Miscellaneous global options π
--helpβ Show usage information.--offlineβ Disable substituters and consider all previously downloaded files up-to-date.--optionname value β Set the Nix configuration setting name to value (overridingnix.conf).--refreshβ Consider all previously downloaded files out-of-date.--versionβ Show version information.
Note π See man nix.conf for overriding configuration settings with command line flags.
and that's the whole page, bestie β tysm for reading, mwah π this was nix3-hash-convert(1), from the General Commands Manual, and it ate, no crumbs left π
β¨
π¦ where this page comes from
- fedora 44: nix-core 2.35.3-2.fc44 Β· LGPL-2.1-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms