Skip to content

Conversation

@domenkozar
Copy link
Member

@domenkozar domenkozar commented May 1, 2025

The goal is to implement builtins.fetchTree as it currently behaves in CppNix.

domenkozar added 2 commits May 1, 2025 19:00
This adds builtins.fetchgit and the backing git import based on
gitoxide.

The implementation uses a temporary directory to clone a bare git
repository in a separate thread. gitoxide does not yet have full async
support for cloning ssh-based repositories, which is why a separate
thread is used.

builtins.fetchgit has more requirements than the Nix equivalent. rev is
always required and a sha256 to check is not supported at this time.

Change-Id: I035756c300bd694ab4ca4640ba941e4603925523
- Add support for Nix flake references parsing and URL handling
- Most of the implementation resides in the glue module for builtins
- Preserve unrecognized URL parameters when extracting known parameters
- Add comprehensive tests for URL handling
- Fetch eagerly, but block on results only upon evaluating thunk

Change-Id: Ibc09c98c24b470fa321459c9ee32f373454dd0ad
@domenkozar domenkozar force-pushed the builtins.fetchTree branch from bcc0ba3 to 883c40d Compare May 1, 2025 18:00
@domenkozar domenkozar changed the title Builtins.fetchTree builtins.fetchGit & builtins.fetchTree May 2, 2025
@nrdxp
Copy link

nrdxp commented Oct 4, 2025

I recently rebased your changes on the latest canon of snix here:
https://github.com/nrdxp/snix/tree/fetchTree

I commented in the original upstream cl to see if maybe I can push to get it merged as I need the feature for my own work, so happy to help where I can. Feel free to hard reset on my branch if it looks good to you.

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.

3 participants