1
0
Fork 0
forked from lix-project/lix
lix/corepkgs
Eelco Dolstra 6024dc1d97
Support SRI hashes
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.
2018-12-13 14:30:52 +01:00
..
buildenv.nix Make <nix/buildenv.nix> a builtin builder 2018-03-20 17:28:09 +01:00
config.nix.in Add nix-perl package for the perl bindings 2017-02-07 15:56:32 -05:00
derivation.nix Revert "Get rid of unicode quotes ()" 2016-11-26 00:38:01 +01:00
fetchurl.nix Support SRI hashes 2018-12-13 14:30:52 +01:00
imported-drv-to-derivation.nix Importing derivations: Add name attribute to make a valid drv 2015-07-23 17:04:07 +02:00
local.mk Remove nar.nix 2016-08-11 17:12:40 +02:00
unpack-channel.nix unpack-channel.nix: fix 'mv' corner case 2017-02-27 10:12:58 +01:00