-
Notifications
You must be signed in to change notification settings - Fork 25
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
Add support for flakes "Lockable HTTP Tarball Protocol" #119
Conversation
6188981
to
c425309
Compare
How does this works for tarballs which don't support that protocol? And would this solve the use case in #44? |
as is currently it errors out about the missing header. i haven't read #44 before but i have been thinking about a similar use case and i think it could be solved by gracefully handling missing "original url" with |
I'm unsure, maybe it would be better to support these two use cases as different pin types and different subcommands? I feel like the lockable tarball protocol is more an obscure implementation detail and that most people won't know about it. |
could be made the other way around, rename the current |
I think the way nix handles tarball inputs by default is by assuming they're always locked and the flakehub protocol exists for using them for ones where flake.nix has a URL that does not return a stable result. This structure could be reused, perhaps. |
i think that's where i have ended up now? now what i'm missing is tests (i'm working on a python script to mock the header) and some command that would easily allow updating the tarballs without i'd also like to propagate the information that a Pin cannot self update to the user interface of |
The currently endorsed way of modifying pins is to simply re-add them with the same name, it would be weird to have a special command just for tarballs.
Hm, that's a tricky one, especially because for tarballs people would mostly expect that such a pin never updates? At the same time, this kinda clashes with an "update" command. Maybe we can weave the UX together with the new "freeze" feature in #78? As in, pins of such kind are always frozen per design or something like that. |
i've finally figured out the integration tests in nix i think^^ the implementation i've tried before broke since i'll mark this as ready for review now. should i clean up the commit history or just squash it into one commit? |
I merged the freeze pins PR so you aren't blocked on it. Though I am unsure if going down that route is still the best idea |
cac0010
to
e85f960
Compare
i know this is off topic on this PR but looking closer at the Pin freezing code after i've rebased on it i've noticed it's going to add |
Neat, would you mind extracting that commit into its own PR? |
sure^^ it's here #122 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry for the back and fourth on the design, it's an iterative process
i don't understand what happened with the test, i didn't touch anything there and they work locally :< |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Almost done now. If you want to squash and clean up the git history before merging, now would be a good time to do so
99d67ed
to
d0bdb07
Compare
d0bdb07
to
ddd65e1
Compare
i've just squashed everything into one commit, i don't think it's complicated enough to warrant splitting up. hopefully now without typos :D |
Hi, i've run into missing support for the "tarball" type of flake input when importing a flake. I've noticed it's been mentioned before in #47 so i gave it a try because it doesn't look very complicated.
This is just a quick experiment, if you want this this feature included in npins i'm happy to write tests and anything else that is missing^^
For now i've tested it only manually on my nixos config using