Skip to content

dub-to-nix: fetch submodules for git dependencies - #548514

Merged
TomaSajt merged 2 commits into
NixOS:masterfrom
ap-1:dub-to-nix-fetch-submodules
Aug 2, 2026
Merged

TomaSajt merged 2 commits into
NixOS:masterfrom
ap-1:dub-to-nix-fetch-submodules

Conversation

@ap-1

@ap-1 ap-1 commented Aug 2, 2026

Copy link
Copy Markdown
Contributor

dub-to-nix records hashes for git+ dependencies by running nix-prefetch-git without --fetch-submodules. The consumer, importDubLock, fetches those same dependencies with fetchgit, whose fetchSubmodules argument defaults to true. This makes the generated hashes disagree.

This should be backwards-compatible because for git dependencies without submodules, --fetch-submodules should fetch nothing extra and yield the same NAR hash.

Things done

@ap-1
ap-1 requested a review from TomaSajt August 2, 2026 19:06
@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. 10.rebuild-darwin: 1 This PR causes 1 package to rebuild on Darwin. 10.rebuild-linux: 1 This PR causes 1 package to rebuild on Linux. labels Aug 2, 2026
@TomaSajt

TomaSajt commented Aug 2, 2026

Copy link
Copy Markdown
Contributor

Oh, wow, I don't know how I missed this...
I'll try to merge this when I get to my computer.

@ap-1 ap-1 mentioned this pull request Aug 2, 2026
7 of 13 tasks
@TomaSajt

TomaSajt commented Aug 2, 2026

Copy link
Copy Markdown
Contributor

I pushed an extra commit, just making the value of fetchSubmodules more explicit

@TomaSajt TomaSajt added the backport release-26.05 Backport PR automatically label Aug 2, 2026
@TomaSajt
TomaSajt added this pull request to the merge queue Aug 2, 2026
Merged via the queue into NixOS:master with commit 13d6d1f Aug 2, 2026
24 checks passed
@nixpkgs-ci

nixpkgs-ci Bot commented Aug 2, 2026

Copy link
Copy Markdown
Contributor

Successfully created backport PR for release-26.05:

@github-actions github-actions Bot added the 8.has: port to stable This PR already has a backport to the stable release. label Aug 2, 2026
@ap-1
ap-1 deleted the dub-to-nix-fetch-submodules branch August 2, 2026 20:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

8.has: port to stable This PR already has a backport to the stable release. 10.rebuild-darwin: 1-10 This PR causes between 1 and 10 packages to rebuild on Darwin. 10.rebuild-darwin: 1 This PR causes 1 package to rebuild on Darwin. 10.rebuild-linux: 1-10 This PR causes between 1 and 10 packages to rebuild on Linux. 10.rebuild-linux: 1 This PR causes 1 package to rebuild on Linux. backport release-26.05 Backport PR automatically

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants