Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

nixd: url prefetching #461

Open
inclyc opened this issue Apr 25, 2024 · 4 comments
Open

nixd: url prefetching #461

inclyc opened this issue Apr 25, 2024 · 4 comments
Labels
enhancement New feature or request nixd:controller

Comments

@inclyc
Copy link
Member

inclyc commented Apr 25, 2024

Provide URL prefetchers. Automatically fill hash section.

fetchurl {

}
@inclyc inclyc added enhancement New feature or request nixd:controller labels Apr 25, 2024
@inclyc inclyc pinned this issue Jun 22, 2024
@Origami404
Copy link
Collaborator

Should this feature be implemented as a "code action" that requires manual triggering? The files to be downloaded may be quite large.

@inclyc
Copy link
Member Author

inclyc commented Jun 23, 2024

Should this feature be implemented as a "code action" that requires manual triggering? The files to be downloaded may be quite large.

Yes. I'd like to do this in Code Lens, with workspace/executeCommand

@inclyc
Copy link
Member Author

inclyc commented Jun 26, 2024

@MangoIV #536 (comment)

offer to augment the passed attribute set with the hash computed from prefetching it.

Note that things like fetchFromGithub are actually FODs, not just "fetchers", and require some evaluation.
I'm currently on design-review about how to balance between evaluation and fetching by idioms.

I also searched nixpkgs and see there are quite some expressions like:

fetchFromGitHub {
  rev = "v${version}";
}

And thus "version" needs to be evaluated. And...

finalAttrs.version may needs some cross-file analysis.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request nixd:controller
Projects
None yet
Development

No branches or pull requests

2 participants