Skip to content

Conversation

@Ericson2314
Copy link
Member

Motivation

Fix #14532.

Context

As discussed on the call today:

  1. We'll stick with format = "base16" and hash = "<hash>", not do base16 = "<hash>", in order to be forward compatible with supporting more versioning formats.

    The motivation we discussed for someday possibly doing this is making it easier to write very slap-dash lang2nix tools that create (not consume) derivations with dynamic derivations.

  2. We will remove support for non-base16 (and make that the default, not base64) in Hash, so this is strictly forward contingency, not yet something we support. (And also not something we have concrete plans to start supporting.)


Add 👍 to pull requests you find important.

The Nix maintainer team uses a GitHub project board to schedule and track reviews.

@github-actions github-actions bot added documentation with-tests Issues related to testing. PRs with tests have some priority labels Nov 10, 2025
@roberth
Copy link
Member

roberth commented Nov 11, 2025

Did we accidentally duplicate the derivation outputs fixed output output format earlier?

...
    "name": "bash-5.3.tar.gz",
    "outputs": {
      "out": {
        "hash": {
          // howdy
          "algorithm": "sha256",
          "format": "base64",
          "hash": "DVzYaWX4aaJs9k9Lcb57lvkKO6iz104n6OnZ1VUPMbo="
        },
        "method": "flat"
      }
    },

@Ericson2314
Copy link
Member Author

That was intentional, though I am open to better names.

it is supposed to be a pair of a method and a hash, and hashes contains a field called hash now.

@edolstra edolstra added this pull request to the merge queue Dec 3, 2025
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Dec 3, 2025
@Ericson2314 Ericson2314 force-pushed the clamp-down-hash branch 2 times, most recently from b9f7f04 to 9ac6527 Compare December 3, 2025 20:44
Fix #14532.

As discussed on the call today:

1. We'll stick with `format = "base16"` and `hash = "<hash>"`, not do
   `base16 = "<hash>"`, in order to be forward compatible with
   supporting more versioning formats.

   The motivation we discussed for someday *possibly* doing this is
   making it easier to write very slap-dash lang2nix tools that create
   (not consume) derivations with dynamic derivations.

2. We will remove support for non-base16 (and make that the default, not
   base64) in `Hash`, so this is strictly forward contingency, *not*
   yet something we support. (And also not something we have concrete
   plans to start supporting.)
@Ericson2314 Ericson2314 enabled auto-merge December 3, 2025 21:34
@Ericson2314 Ericson2314 added this pull request to the merge queue Dec 3, 2025
Merged via the queue into master with commit 69920f9 Dec 3, 2025
20 checks passed
@Ericson2314 Ericson2314 deleted the clamp-down-hash branch December 3, 2025 22:28
@edolstra edolstra mentioned this pull request Dec 9, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation with-tests Issues related to testing. PRs with tests have some priority

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Tighten down Hash JSON format

3 participants