Skip to content

Conversation

@winterqt
Copy link
Member

As discussed at NixCon, now a simple building of the drvs will check that the output hashes are all correct!

…tput hash validity

As discussed at NixCon, now a simple building of the drvs will check that
the output hashes are all correct!
@djacu
Copy link
Member

djacu commented Sep 18, 2025

Focusing just on the FODs

% nix run .\#nixos-branding.verification.verify-nixos-branding-fods -- --rebuild
...
┏━ Dependency Graph showing 26 of 96 roots:
┃ ...
┣━━━ Builds          
┗━ ∑ ⏵ 0 │ ✔ 96 │ ⏸ 0 │ Finished at 18:42:28 after 41s

Changes made to force a hash mismatch.

% git diff         
diff --git a/package-sets/python-packages/nixoslogo/nixoslogo/logomark.py b/package-sets/python-packages/nixoslogo/nixoslogo/logomark.py
index 3a8d89d..20233af 100644
--- a/package-sets/python-packages/nixoslogo/nixoslogo/logomark.py
+++ b/package-sets/python-packages/nixoslogo/nixoslogo/logomark.py
@@ -117,7 +117,7 @@ class Lambda(BaseRenderable):
         ]
 
         # Need to negate the y-axis so the lambda is not upside down
-        points = Points([Point((point.x, -point.y)) for point in points])
+        points = Points([Point((round(point.x, 3), round(-point.y, 3))) for point in points])
         return points
 
     def make_named_lambda_points(

After the changes to the source code.

% nix run .\#nixos-branding.verification.verify-nixos-branding-fods
...
error: hash mismatch in fixed-output derivation '/nix/store/s5b65sn89y52vsnkwp5w90bssn28dygz-nixos-lambda-background-salted-cn2pqbfw1c53.drv':
         specified: sha256-C0/jGIbmVr+/0P2zwOart741jCDTf/8sBva5cVy0P3c=
            got:    sha256-RJ+WwPtzKgqMHeiqh6g97GSn9REQfiEgH5Dl1A9yG0Y=
error: hash mismatch in fixed-output derivation '/nix/store/rw1nfbnb0qsspqnwinnlvm37xihmw8s8-nixos-lambda-dimensioned-angular-salted-q0885k1sl9j6.drv':
         specified: sha256-bKwUdEq0RDft5O8hEJTznPPppIK7xwUhx4FWCe8aXvg=
            got:    sha256-yTJMuNufTlfzfa0Kdp/qwsuhUBDd9lZUXJHYcd4Baj4=
error: hash mismatch in fixed-output derivation '/nix/store/nhpcp9si1f2jpkkp4xcjm9dc77y9im4b-nixos-lambda-dimensioned-annotated-parameters-salted-b9nq6j7rcyg1.drv':
         specified: sha256-l+FhSHMKZIOwe1xw0gccMBJ5SQD3VT10zgSRssZZ40k=
            got:    sha256-bby2j/qPQoGxnXcptnpwSnIBmwUg5JGfP/vPJiJTuEc=
error: hash mismatch in fixed-output derivation '/nix/store/2kb0qvka8jgba4wg608ri9j33h8wsdwa-nixos-lambda-dimensioned-annotated-vertices-salted-6zd30pyw1dch.drv':
         specified: sha256-VU3oJJOi6+43lC/XYMzGtXkrxeRGvaG9KV2IDlbclA0=
            got:    sha256-kSNfhBwbs64/cVoffMtg9Hpu9QBQm/Rz17NAUySfcvI=
...
┏━ 83 Errors: 
 ⋮ 
┣━━━                                                       
┗━ ∑ ⚠ Exited after 82 build failures at 18:43:57 after 36s

Not sure why it's only showing 82/83 failures instead of 96.

% nix run .\#nixos-branding.verification.verify-artifacts-clearspace
┗━ ∑ ⚠ Exited after 2 build failures at 18:48:00 after 2s
% nix run .\#nixos-branding.verification.verify-artifacts-dimensioned
┗━ ∑ ⚠ Exited after 8 build failures at 18:49:01 after 5s
% nix run .\#nixos-branding.verification.verify-artifacts-internal
┗━ ∑ ⚠ Exited after 22 build failures at 18:49:41 after 10s
% nix run .\#nixos-branding.verification.verify-artifacts-media-kit
┗━ ∑ ⚠ Exited after 44 build failures at 18:50:29 after 20s
% nix run .\#nixos-branding.verification.verify-artifacts-miscellaneous
┗━ ∑ ⚠ Exited after 1 build failures at 18:50:59 after 2s
% nix run .\#nixos-branding.verification.verify-artifacts-misuse
┗━ ∑ ⚠ Exited after 5 build failures at 18:51:27 after 3s

2 + 8 + 22 + 44 + 1 + 5 = 82

@djacu
Copy link
Member

djacu commented Sep 18, 2025

Oh duh I need to mess up the logotype module as well for SVG files that are just the logotype.

% git diff     
diff --git a/package-sets/python-packages/nixoslogo/nixoslogo/logomark.py b/package-sets/python-packages/nixoslogo/nixoslogo/logomark.py
index 3a8d89d..20233af 100644
--- a/package-sets/python-packages/nixoslogo/nixoslogo/logomark.py
+++ b/package-sets/python-packages/nixoslogo/nixoslogo/logomark.py
@@ -117,7 +117,7 @@ class Lambda(BaseRenderable):
         ]
 
         # Need to negate the y-axis so the lambda is not upside down
-        points = Points([Point((point.x, -point.y)) for point in points])
+        points = Points([Point((round(point.x, 3), round(-point.y, 3))) for point in points])
         return points
 
     def make_named_lambda_points(
diff --git a/package-sets/python-packages/nixoslogo/nixoslogo/logotype.py b/package-sets/python-packages/nixoslogo/nixoslogo/logotype.py
index cf5c39f..76865f8 100644
--- a/package-sets/python-packages/nixoslogo/nixoslogo/logotype.py
+++ b/package-sets/python-packages/nixoslogo/nixoslogo/logotype.py
@@ -193,7 +193,7 @@ class Glyph(BaseRenderable):
                     points_bezier = [
                         elem
                         for pair in (
-                            (point.x, point.y)
+                            (point.x, point.y + 0.001)
                             for point in (points.pop(0) for _ in range(2))
                         )
                         for elem in pair
@@ -206,7 +206,7 @@ class Glyph(BaseRenderable):
                     points_bezier = [
                         elem
                         for pair in (
-                            (point.x, point.y)
+                            (point.x, point.y + 0.001)
                             for point in (points.pop(0) for _ in range(3))
                         )
                         for elem in pair
% nix run .\#nixos-branding.verification.verify-nixos-branding-fods
┗━ ∑ ⏵ 0 │ ✔ 2 │ ⏸ 0 │ ⚠ Exited after 96 build failures at 19:12:53 after 48s

There we go. Everything fails as expected. :)

@djacu djacu merged commit d1b5e1c into NixOS:main Sep 18, 2025
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants