summary refs log tree commit diff
path: root/doc/builders/packages
diff options
context:
space:
mode:
authorColin Arnott <colin@urandom.co.uk>2022-12-03 19:49:00 +0000
committerColin Arnott <colin@urandom.co.uk>2022-12-04 06:12:18 +0000
commitbac379f30a6fa1284e48b4224862e0b41ad42199 (patch)
tree0bad9b7cbe730a740ec027e19d34e1c237f058db /doc/builders/packages
parent88ae5d08250e206aad599c1bb9692bd9b3dd54c2 (diff)
downloadnixpkgs-bac379f30a6fa1284e48b4224862e0b41ad42199.tar
nixpkgs-bac379f30a6fa1284e48b4224862e0b41ad42199.tar.gz
nixpkgs-bac379f30a6fa1284e48b4224862e0b41ad42199.tar.bz2
nixpkgs-bac379f30a6fa1284e48b4224862e0b41ad42199.tar.lz
nixpkgs-bac379f30a6fa1284e48b4224862e0b41ad42199.tar.xz
nixpkgs-bac379f30a6fa1284e48b4224862e0b41ad42199.tar.zst
nixpkgs-bac379f30a6fa1284e48b4224862e0b41ad42199.zip
doc: use sri hash syntax
The nixpkgs manual contains references to both sri hash and explicit
sha256 attributes. This is at best confusing to new users. Since the
final destination is exclusive use of sri hashes, see nixos/rfcs#131,
might as well push new users in that direction gently.

Notable exceptions to sri hash support are builtins.fetchTarball,
cataclysm-dda, coq, dockerTools.pullimage, elixir.override, and
fetchCrate. None, other than builtins.fetchTarball, are fundamentally
incompatible, but all currently accept explicit sha256 attributes as
input. Because adding backwards compatibility is out of scope for this
change, they have been left intact, but migration to sri format has been
made for any using old hash formats.

All hashes have been manually tested to be accurate, and updates were
only made for missing upstream artefacts or bugs.
Diffstat (limited to 'doc/builders/packages')
-rw-r--r--doc/builders/packages/cataclysm-dda.section.md2
-rw-r--r--doc/builders/packages/eclipse.section.md6
-rw-r--r--doc/builders/packages/firefox.section.md2
-rw-r--r--doc/builders/packages/weechat.section.md2
4 files changed, 6 insertions, 6 deletions
diff --git a/doc/builders/packages/cataclysm-dda.section.md b/doc/builders/packages/cataclysm-dda.section.md
index bfeacb47fef..f401e9b9efa 100644
--- a/doc/builders/packages/cataclysm-dda.section.md
+++ b/doc/builders/packages/cataclysm-dda.section.md
@@ -103,7 +103,7 @@ let
         owner = "Someone";
         repo = "AwesomeMod";
         rev = "...";
-        sha256 = "...";
+        hash = "...";
       };
       # Path to be installed in the unpacked source (default: ".")
       modRoot = "contents/under/this/path/will/be/installed";
diff --git a/doc/builders/packages/eclipse.section.md b/doc/builders/packages/eclipse.section.md
index 8cf7426833b..e19510e131a 100644
--- a/doc/builders/packages/eclipse.section.md
+++ b/doc/builders/packages/eclipse.section.md
@@ -43,11 +43,11 @@ packageOverrides = pkgs: {
         name = "myplugin1-1.0";
         srcFeature = fetchurl {
           url = "http://…/features/myplugin1.jar";
-          sha256 = "123…";
+          hash = "sha256-123…";
         };
         srcPlugin = fetchurl {
           url = "http://…/plugins/myplugin1.jar";
-          sha256 = "123…";
+          hash = "sha256-123…";
         };
       });
       (plugins.buildEclipseUpdateSite {
@@ -55,7 +55,7 @@ packageOverrides = pkgs: {
         src = fetchurl {
           stripRoot = false;
           url = "http://…/myplugin2.zip";
-          sha256 = "123…";
+          hash = "sha256-123…";
         };
       });
     ];
diff --git a/doc/builders/packages/firefox.section.md b/doc/builders/packages/firefox.section.md
index 0dd786a599d..46bc0457a3d 100644
--- a/doc/builders/packages/firefox.section.md
+++ b/doc/builders/packages/firefox.section.md
@@ -12,7 +12,7 @@ The `wrapFirefox` function allows to pass policies, preferences and extensions t
       (fetchFirefoxAddon {
         name = "ublock"; # Has to be unique!
         url = "https://addons.mozilla.org/firefox/downloads/file/3679754/ublock_origin-1.31.0-an+fx.xpi";
-        sha256 = "1h768ljlh3pi23l27qp961v1hd0nbj2vasgy11bmcrlqp40zgvnr";
+        hash = "sha256-2e73AbmYZlZXCP5ptYVcFjQYdjDp4iPoEPEOSCVF5sA=";
       })
     ];
 
diff --git a/doc/builders/packages/weechat.section.md b/doc/builders/packages/weechat.section.md
index 767cc604ab4..755b6e6ad1e 100644
--- a/doc/builders/packages/weechat.section.md
+++ b/doc/builders/packages/weechat.section.md
@@ -73,7 +73,7 @@ stdenv.mkDerivation {
   name = "exemplary-weechat-script";
   src = fetchurl {
     url = "https://scripts.tld/your-scripts.tar.gz";
-    sha256 = "...";
+    hash = "...";
   };
   passthru.scripts = [ "foo.py" "bar.lua" ];
   installPhase = ''