boostrap fetchurl: Add SRI support

Changed files
+15 -3
lib
nixos
doc
manual
from_md
release-notes
release-notes
pkgs
build-support
fetchurl
+1 -1
lib/minver.nix
···
# Expose the minimum required version for evaluating Nixpkgs
-
"2.2"
···
# Expose the minimum required version for evaluating Nixpkgs
+
"2.3"
+5
nixos/doc/manual/from_md/release-notes/rl-2211.section.xml
···
<itemizedlist>
<listitem>
<para>
The <literal>isCompatible</literal> predicate checking CPU
compatibility is no longer exposed by the platform sets
generated using <literal>lib.systems.elaborate</literal>. In
···
<itemizedlist>
<listitem>
<para>
+
Nixpkgs now requires Nix 2.3 or newer.
+
</para>
+
</listitem>
+
<listitem>
+
<para>
The <literal>isCompatible</literal> predicate checking CPU
compatibility is no longer exposed by the platform sets
generated using <literal>lib.systems.elaborate</literal>. In
+2
nixos/doc/manual/release-notes/rl-2211.section.md
···
## Backward Incompatibilities {#sec-release-22.11-incompatibilities}
- The `isCompatible` predicate checking CPU compatibility is no longer exposed
by the platform sets generated using `lib.systems.elaborate`. In most cases
you will want to use the new `canExecute` predicate instead which also
···
## Backward Incompatibilities {#sec-release-22.11-incompatibilities}
+
- Nixpkgs now requires Nix 2.3 or newer.
+
- The `isCompatible` predicate checking CPU compatibility is no longer exposed
by the platform sets generated using `lib.systems.elaborate`. In most cases
you will want to use the new `canExecute` predicate instead which also
+7 -2
pkgs/build-support/fetchurl/boot.nix
···
{ url ? builtins.head urls
, urls ? []
-
, sha256
, name ? baseNameOf (toString url)
}:
import <nix/fetchurl.nix> {
-
inherit system sha256 name;
url =
# Handle mirror:// URIs. Since <nix/fetchurl.nix> currently
···
{ url ? builtins.head urls
, urls ? []
+
, sha256 ? ""
+
, hash ? ""
, name ? baseNameOf (toString url)
}:
+
# assert exactly one hash is set
+
assert hash != "" || sha256 != "";
+
assert hash != "" -> sha256 == "";
+
import <nix/fetchurl.nix> {
+
inherit system hash sha256 name;
url =
# Handle mirror:// URIs. Since <nix/fetchurl.nix> currently