about summary refs log tree commit diff
path: root/tests/hash.sh
AgeCommit message (Collapse)AuthorFilesLines
2018-12-13 Support SRI hashesEelco Dolstra1-1/+11
SRI hashes (https://www.w3.org/TR/SRI/) combine the hash algorithm and a base-64 hash. This allows more concise and standard hash specifications. For example, instead of import <nix/fetchurl.nl> { url = https://nixos.org/releases/nix/nix-2.1.3/nix-2.1.3.tar.xz; sha256 = "5d22dad058d5c800d65a115f919da22938c50dd6ba98c5e3a183172d149840a4"; }; you can write import <nix/fetchurl.nl> { url = https://nixos.org/releases/nix/nix-2.1.3/nix-2.1.3.tar.xz; hash = "sha256-XSLa0FjVyADWWhFfkZ2iKTjFDda6mMXjoYMXLRSYQKQ="; }; In fixed-output derivations, the outputHashAlgo is no longer mandatory if outputHash specifies the hash (either as an SRI or in the old "<type>:<hash>" format). 'nix hash-{file,path}' now print hashes in SRI format by default. I also reverted them to use SHA-256 by default because that's what we're using most of the time in Nixpkgs. Suggested by @zimbatm.
2017-07-04 Support base-64 hashesEelco Dolstra1-3/+7
Also simplify the Hash API. Fixes #1437.
2015-11-04 Support SHA-512 hashesEelco Dolstra1-4/+15
Fixes #679. Note: on x86_64, SHA-512 is considerably faster than SHA-256 (198 MB/s versus 131 MB/s).
2012-03-19 Replace "make check" with "make installcheck"Eelco Dolstra1-1/+1
Ensuring that the tests work from the build tree requires a growing number of nasty hacks. The tests also don't verify that the installed Nix actually works. Thus, the tests now require "make install" to have been run.
2011-10-10 * Refactoring: remove unnecessary variables from the tests.Eelco Dolstra1-6/+6
2007-12-14 * Mac OS X 10.5 compatibility: `echo -n foo' suddenly prints `-n foo'Eelco Dolstra1-1/+1
instead of `foo' without a newline (with /bin/sh, not /bin/bash, even though /bin/sh is also bash...). So use printf instead.
2006-03-01 * Tests to prevent a repeat of the parseHash32 debacle.Eelco Dolstra1-0/+7
2006-03-01 * Simplification.Eelco Dolstra1-2/+2
2006-03-01 * Make it easy to run individual tests from the command line.Eelco Dolstra1-0/+2
2005-03-23 * Add a test for base-32 encoding of hashes since it seems to beEelco Dolstra1-1/+4
broken on Mac OS X.
2005-01-14 * Missing file.Eelco Dolstra1-0/+50