feat: add tack loader#14
Merged
Merged
Conversation
from.tack loads sources from .tack/pins.lock.json (github/git/tarball via builtin fetchers, fixed pins via builtin:fetchurl), honors pins.toml type/dir/unpack (fetch pins get flake = false), and translates [all_follow] rows into alias source entries so sub-inputs resolve by name like the tack resolver does.
Member
|
Awesome, thanks! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds a tack loader, as the flake-file tack backend's "other half" (vic's suggestion on denful/flake-file#120): loading flake-likes straight from tack pins, with no dependency on flake-file.
from.tackReads
.tack/pins.toml+.tack/pins.lock.jsonand produces a with-inputssourcesset:fetchTarballfor github/tarball nodes withnarHash,fetchGitfor git nodes, and tack'sbuiltin:fetchurl/builtin:unpack-channelderivation pair forfixedpins) — nofetchTree, no experimental features.type = "fetch"(or legacyflake = false) marks the sourceflake = falseso with-inputs won't flake-load it;dirappends a subdirectory to the source path;unpackselects the fixed-pin layout.[all_follow]rows translate to alias source entries (bothalias = "target"andtarget = ["aliases"]forms). Since with-inputs already resolves sub-inputs by name fromallInputs, an alias entry sharing the target's source reproduces the tack resolver's follows-everywhere behavior with no extra machinery.Per-pin
followstables are left to the standardfollows.nixoverride mechanism.Template
templates/tackmirrors the lon template (sameden.nix/outputs.nix/follows.nix), withwith-inputs.nixbootstrapping with-inputs itself from the lock and a vendored.tack/(pins + lock, no resolver — with-inputs replaces it).Verification
just loader tackpasses (evaluatesnixosConfigurations.igloo...tux.home.username→tuxthrough the real lock).nix-unit ./tests.nix: 36/36.treefmt --ciclean.🤖 Generated with Claude Code