Skip to content

Conversation

wolfgangwalther
Copy link
Contributor

This reverts commit 1cf3103 introduced in #324789.

The commit implemented a "nice to have" TODO, which ultimately causes hash differences between Lix and Nix. We can't conditionally use the convertHash builtin, because we don't have an alternative to produce the same results.

We could, alternatively, only use the fallback path with builtins.hashString "sha256" name; and keep writeTextFile, if that's desirable.

Required to do #451926.

Things done


Add a 👍 reaction to pull requests you find important.

…e basename"

This reverts commit 1cf3103.

The commit implemented a "nice to have" TODO, which ultimately causes
hash differences between Lix and Nix. We can't conditionally use the
`convertHash` builtin, because we don't have an alternative to produce
the same results.
@nixpkgs-ci nixpkgs-ci bot added 10.rebuild-linux: 1-10 This PR causes between 1 and 10 packages to rebuild on Linux. 10.rebuild-darwin: 1-10 This PR causes between 1 and 10 packages to rebuild on Darwin. labels Oct 14, 2025
@nix-owners nix-owners bot requested a review from philiptaron October 14, 2025 11:49
@nixpkgs-ci nixpkgs-ci bot added the 12.approvals: 1 This PR was reviewed and approved by one person. label Oct 14, 2025
@roberth
Copy link
Member

roberth commented Oct 14, 2025

So I gather Lix doesn't have that builtin. I did not expect that.
I'd prefer to deal with optional features like this through Nixpkgs config, i.e. make it conditional on config.enableConvertHash or false and then fail nicely on evaluators that don't support it. (I guess we don't want to resort to IFD)
That way we don't have the builtins?${foo} impurity, and no loss of functionality either.
It also aligns with other features including build features like ca-derivations.

Copy link
Contributor

@MattSturgeon MattSturgeon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

make it conditional on config.enableConvertHash or false and then fail nicely on evaluators that don't support it.

This sounds reasonable on first glance.

I guess we can discuss more in depth on a reapply PR, for now I approve of reverting.

@nixpkgs-ci nixpkgs-ci bot added 12.approvals: 2 This PR was reviewed and approved by two persons. and removed 12.approvals: 1 This PR was reviewed and approved by one person. labels Oct 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

10.rebuild-darwin: 1-10 This PR causes between 1 and 10 packages to rebuild on Darwin. 10.rebuild-linux: 1-10 This PR causes between 1 and 10 packages to rebuild on Linux. 12.approvals: 2 This PR was reviewed and approved by two persons.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants