-
-
Notifications
You must be signed in to change notification settings - Fork 159
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
[RFC 0123] Flake names #123
base: master
Are you sure you want to change the base?
Conversation
rfcs/0123-flake-names.md
Outdated
# Examples and Interactions | ||
[examples-and-interactions]: #examples-and-interactions | ||
|
||
A flake that is in the registry should have its name match the registry identifier. |
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.
Wouldn't that prevent the use of alternate names, or having multiple versions of the same flake in the registry?
(I use both)
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.
That’s a good point
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.
Maybe it’d be a good rule for the global registry, though, but it’d probably be followed anyways, and would only hinder edge-cases
Note that flakes had a name field but it was removed (80c36d4562af71a90c67b3adb886a1003834890e) because there was no clear use case / semantics. It also raises questions like whether names should be globally unique, and what should happen if they're not. The RFC mentions discoverability but doesn't really explain how a See also NixOS/nix#5879 - we thought about bringing back
This has the problem described here, namely that it reduces content-addressability by duplicating identical source trees when fetched from different flakes/tags. |
|
… tags for easier future removal
Are flakes not still an experimental feature that we're waiting for an RFC to formalise? It seems odd for this to come first. |
I don’t know how else it would be possible to suggest this feature. |
This RFC is now open for shepherd nominations! |
@schuelermine maybe you have some people in mind who would be suitable as shepherds? Feel free to nominate them, if so :) |
@lheckemann I think I’m not familiar enough with the Nix development team & community to confidently nominate anyone in particular. The only people I know are ones I’ve more “seen” than “met”, and I don’t know of their specialties. How would I go about nominating someone? |
This pull request has been mentioned on NixOS Discourse. There might be relevant details there: https://discourse.nixos.org/t/pre-rfc-discussion-making-flakes-discoverable/18834/2 |
Minor use case: flake-help I use |
Coming from the related nix-discourse (making flakes indexable/discoverable), I'd like to propose simple change to make this forward-compatible and modular.
So, I'd like to propose a {
static = {
name = "anything";
description = "blah blah blah";
# arbitrary additional data
license = "GPLv3";
keywords = [ "image" "photo" "app" "image-editing" "image-viewing" "python" ];
code-source = "https://github.com/some_user/some_repo";
cve-reports = "";
bug-reports = "";
homepage = "";
icon = "https://";
latest-sha256 = "";
bin-names = [ "pip" "python" "python3" ]; # not guaranteed to match outputs, but for searching for a bin-name when package name is unknown
};
inputs = {
nixpkgs = { url = "github:nixos/nixpkgs/nixos-unstable"; };
};
outputs = inputs : { };
} The important aspects being;
|
Just bike-shedding on the name (because it’s too tempting), this kinda matches the (And regardless of the color of the bike, I agree that keeping this things scoped is a good idea, if only to keep the schema tidy) |
Haha yeah, I actually wanted to call it metadata (and would still like to). I avoided it since The idea of |
|
||
- Flakes generate store paths named “source”, and it’s difficult to navigate this when manually inspecting the store. | ||
- This metadata can be used to make flakes more approachable and usable, in particular, it can be output instead or with the URI, making the nix commands friendlier. | ||
|
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.
- Unique names are useful for the purpose of finding duplicate things caused by diamond dependencies. (E.g. `a -> b -> d1`, `a -> c -> d2`. Without a unique name (`d`), it is not possible to correlate `d1` and `d2` reliably.) | |
- Most relevant when Flakes: Make avoiding dependency diamonds easier somehow. nix#5570 remains unimplemented. "Userspace" experimentation may yield some insights into solutions for 5570.
I had and still have an interest in this and may volunteer to join the shepherds. May the author reactivate the momentum? I'd be also interested in exposing |
I am still interested in this RFC. This RFC was put into the draft state because I could not produce RFC shepherds. If you’d like to be a shepherd, I can nominate you. I’m not sure how to “reactivate momentum” on this RFC. |
All that it takes to reopen this RFC is to find shepherds. Since we have a nomination it may make sense to bring out of draft and try to find a few more. |
@blaggacao would you be interested in being a shepherd for this proposal? |
With https://discourse.nixos.org/t/why-is-there-a-default-overlay-in-flakes/24422/2 in my backpack, I would. 👍 |
I nominate @blaggacao to be a shepherd of this RFC! |
[RFC 0123] Flake names
Rendered