-
-
Notifications
You must be signed in to change notification settings - Fork 14.4k
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
doc: add instructions to rename a package #142873
Comments
I marked this as stale due to inactivity. → More info |
For renaming modules there exist
that is a good user experience since it continues to work, but they are warned that they should update their config. We need something similar for packages! The code of
So here is some unfinished code:
Can someone complete it? I'm not experienced enough with nixlang for it. |
@ckiee could that be implemented similar to #170992? Those packages have no metadata indicating that they are renamed. Could that be interpolated or added in some way when we have the alias definitions in a So:
|
@davidak sure, but interpreting comments probably wouldn't be very nice. You could write a little wrapper around mkRename = old: new: date: builtins.trace "${old.pname} was renamed to ${new.pname} on ${date} and the old name is now deprecated and will be removed in a future release" Some more code missing there that I haven't bothered to write, but I'll probably make a PR for this eventually, got a lot of stuff to work on at the moment. |
Awesome! When we have the general infrastructure to do it i can add the packages, so you can do more meaningful work. |
Awesome! When we have the general infrastructure to do it i can add the packages, so you can do more meaningful work.
the work is equally meaningful, it's just a matter of different skillsets I guess ❤️
|
This issue has been mentioned on NixOS Discourse. There might be relevant details there: https://discourse.nixos.org/t/how-to-introduce-a-breaking-version-bump/46746/9 |
Issue description
how to handle a renamed package?
currently there are examples in nixpkgs that add an alias, but also throw an error with "was renamed to X"
https://github.com/NixOS/nixpkgs/blob/master/pkgs/top-level/aliases.nix#L53
which is better UX? maybe it should work like options aliases? (warn on rebuild)
when there is a consensus, i can document it, as done with #116475 (but feel free to grab the task if you like)
Steps to reproduce
this topic came up in #141264 (comment)
The text was updated successfully, but these errors were encountered: