Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: NixOS/nix
base: c37e6d77ea86
Choose a base ref
...
head repository: NixOS/nix
compare: 6024dc1d9721
Choose a head ref
  • 1 commit
  • 8 files changed
  • 1 contributor

Commits on Dec 13, 2018

  1. 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.
    edolstra committed Dec 13, 2018
    8
    Copy the full SHA
    6024dc1 View commit details
    Browse the repository at this point in the history