-
-
Notifications
You must be signed in to change notification settings - Fork 18.1k
Description
It seems like there isn't a tracking issue about this long-term effort yet (e.g. to mention in commit messages and to make it sprintable).
Nixpkgs moved to an explicit versioning scheme, with the plan to change all packages like so:
-name = "mypackage-1.2.3";
+pname = "mypackage";
+version = "1.2.3";See the sprint checkbox list for the remaining packages: #103997 (comment)
This obviates meta.version and meta.tag; they should be removed (as discussed in #12156).
Tangentially related: Where to put unstable versions / package names (see #68518).
Details on what's right and what isn't
Note that the following pattern is not good because it still uses name:
let
pname = "mypackage";
version = "1.2.3";
in
mkDerivation {
name = "${pname}-${version}";
}
In the new approach, pname and version have to be given directly to mkDerivation.
You can use mkDerivation rec to be able to re-use e.g. version in src or other fields:
mkDerivation rec {
pname = "mypackage";
version = "1.2.3";
src = {
... expression using `version` variable here ...
};
}
Automation
You can link big treewide efforts/PRs here (tick merged ones):
- treewide: name -> pname #67513
- treewide: name -> pname #66751
- [bot] name -> pname (easy cases) #66585
Tasks
- Move all packages from "name" to "pname"+"version", remove all uses of meta.version and meta.tag
- See Change all packages from "name" to "pname"+"version", remove all uses of meta.version and meta.tag #103997 (comment) for the sprint checkbox list remaining packages
- Somebody confirm that
meta.tagshould indeed be removed as well - Remove
update-walker.shscript? Ask @7c6f434c: meta.updateWalker: remove because it is not used #151363 - Remove nixpkgs manual entry about
updateWalkerbecause it's the last reference toupdate-walker.sh: meta.updateWalker: remove because it is not used #151363