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

Allow to disable global flake-registry with "" #5420

Merged
merged 1 commit into from
Dec 12, 2022

Conversation

bew
Copy link
Contributor

@bew bew commented Oct 23, 2021

Closes #4874

I'm not sure why the implementation of getGlobalRegistry was wrapped in a lambda, but returning nullptr from it made the compiler not able to find a type for both nullptr and Registry for the lambda..
So I simply removed the lambda, problem solved AFAI can see.

@bew
Copy link
Contributor Author

bew commented Oct 23, 2021

Could this be added/back-ported to the coming 2.4 release?
I'd really like to use it, and tell people to use it if they want better control (without going full unstable).

If yes, do I need to do something specific?

@edolstra
Copy link
Member

It's wrapped in a static to ensure it's evaluated only once. This PR makes getGlobalRegistry call downloadFile every time.

@edolstra edolstra closed this Oct 26, 2021
@edolstra edolstra reopened this Oct 26, 2021
@bew
Copy link
Contributor Author

bew commented Oct 27, 2021

It's wrapped in a static to ensure it's evaluated only once. This PR makes getGlobalRegistry call downloadFile every time.

Okay thank you, I see it now, I will revert it back to a static

@bew bew force-pushed the allow-disable-global-registry branch from c04d98e to b115283 Compare October 27, 2021 22:56
@bew
Copy link
Contributor Author

bew commented Oct 28, 2021

It should be better now

@stale
Copy link

stale bot commented Apr 27, 2022

I marked this as stale due to inactivity. → More info

@bew bew force-pushed the allow-disable-global-registry branch 2 times, most recently from 8ceb7b9 to 4d21f04 Compare April 28, 2022 17:37
@stale stale bot added the stale label Oct 29, 2022
@bew bew force-pushed the allow-disable-global-registry branch from 4d21f04 to 586ee1b Compare December 12, 2022 14:22
@bew
Copy link
Contributor Author

bew commented Dec 12, 2022

Ok, I've rebased on latest master & updated the code!

@bew bew force-pushed the allow-disable-global-registry branch from 586ee1b to a456630 Compare December 12, 2022 14:32
Copy link
Member

@thufschmitt thufschmitt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great, thanks!

@thufschmitt thufschmitt merged commit a642b10 into NixOS:master Dec 12, 2022
@bew bew deleted the allow-disable-global-registry branch December 12, 2022 18:05
@asymmetric
Copy link
Contributor

Shouldn't there be an entry in the release notes for this? Happy to create it if that's the consensus.

@thufschmitt
Copy link
Member

Shouldn't there be an entry in the release notes for this? Happy to create it if that's the consensus.

Indeed, thanks for pointing that out. Happy to review it if you create one

@nixos-discourse
Copy link

This pull request has been mentioned on NixOS Discourse. There might be relevant details there:

https://discourse.nixos.org/t/nix-2-13-0-released/24729/5

asymmetric added a commit to asymmetric/nix that referenced this pull request Jan 18, 2023
github-actions bot pushed a commit that referenced this pull request Jan 18, 2023
Introduced in #5420

(cherry picked from commit 913782a)
iFreilicht pushed a commit to iFreilicht/nix that referenced this pull request Jan 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Allow empty config flake-registry = "", to disable default global flakes
5 participants