From c5e554c1e15aa093cb92938067c3aaefa7cb8580 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A1szl=C3=B3=20Vask=C3=B3?= Date: Tue, 5 Jul 2022 18:31:38 +0200 Subject: [PATCH 1/3] Overrides: remove cryptography 37.0.3 as it has been yanked --- overrides/default.nix | 1 - 1 file changed, 1 deletion(-) diff --git a/overrides/default.nix b/overrides/default.nix index 96afb6a2b..33ffaed45 100644 --- a/overrides/default.nix +++ b/overrides/default.nix @@ -325,7 +325,6 @@ lib.composeManyExtensions [ "36.0.1" = "sha256-kozYXkqt1Wpqyo9GYCwN08J+zV92ZWFJY/f+rulxmeQ="; "36.0.2" = "1a0ni1a3dbv2dvh6gx2i54z8v5j9m6asqg97kkv7gqb1ivihsbp8"; "37.0.2" = "sha256-qvrxvneoBXjP96AnUPyrtfmCnZo+IriHR5HbtWQ5Gk8="; - "37.0.3" = "sha256-Wz3cyyOT+J09a98xyh2N1pxpANdY1u3Z9PboIEwwaIc"; }.${version} or null; sha256 = getCargoHash super.cryptography.version; scrypto = From 7d3d2d7f2286c019669ea16b02def534145f2a45 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A1szl=C3=B3=20Vask=C3=B3?= Date: Tue, 5 Jul 2022 18:23:45 +0200 Subject: [PATCH 2/3] Overrides: cryptography 37.0.4 --- overrides/default.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/overrides/default.nix b/overrides/default.nix index 33ffaed45..2181b26a0 100644 --- a/overrides/default.nix +++ b/overrides/default.nix @@ -325,6 +325,7 @@ lib.composeManyExtensions [ "36.0.1" = "sha256-kozYXkqt1Wpqyo9GYCwN08J+zV92ZWFJY/f+rulxmeQ="; "36.0.2" = "1a0ni1a3dbv2dvh6gx2i54z8v5j9m6asqg97kkv7gqb1ivihsbp8"; "37.0.2" = "sha256-qvrxvneoBXjP96AnUPyrtfmCnZo+IriHR5HbtWQ5Gk8="; + "37.0.4" = "sha256-f8r6QclTwkgK20CNe9i65ZOqvSUeDc4Emv6BFBhh1hI"; }.${version} or null; sha256 = getCargoHash super.cryptography.version; scrypto = From c1e8099d09d1ca0d0a24f7eb54a28aebafd6d367 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A1szl=C3=B3=20Vask=C3=B3?= Date: Tue, 5 Jul 2022 18:24:27 +0200 Subject: [PATCH 3/3] Overrides: use `lib.fakeHash` for unknown cryptography versions When `null` hash is used, a cryptic error is printed for unknown versions: > unpacking source archive > do not know how to unpack source archive With fakeHash, the build continues and we can see an actual hash mismatch error: > error: hash mismatch in fixed-output derivation '/nix/store/m95mjg0rf1w1x6qrxby4dajy3shvn2r9-cryptography-37.0.4-vendor.tar.gz.drv': > specified: sha256-AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA= > got: sha256-f8r6QclTwkgK20CNe9i65ZOqvSUeDc4Emv6BFBhh1hI= --- overrides/default.nix | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/overrides/default.nix b/overrides/default.nix index 2181b26a0..7efb61e98 100644 --- a/overrides/default.nix +++ b/overrides/default.nix @@ -326,7 +326,9 @@ lib.composeManyExtensions [ "36.0.2" = "1a0ni1a3dbv2dvh6gx2i54z8v5j9m6asqg97kkv7gqb1ivihsbp8"; "37.0.2" = "sha256-qvrxvneoBXjP96AnUPyrtfmCnZo+IriHR5HbtWQ5Gk8="; "37.0.4" = "sha256-f8r6QclTwkgK20CNe9i65ZOqvSUeDc4Emv6BFBhh1hI"; - }.${version} or null; + }.${version} or ( + lib.warn "Unknown cryptography version: '${version}'. Please update getCargoHash." lib.fakeHash + ); sha256 = getCargoHash super.cryptography.version; scrypto = if lib.versionAtLeast super.cryptography.version "35" && sha256 == null then