treewide: rename version attributes
As suggested in https://github.com/NixOS/nixpkgs/pull/39416#discussion_r183845745 the versioning attributes in `lib` should be consistent to `nixos/version` which implicates the following changes: * `lib.trivial.version` -> `lib.trivial.release` * `lib.trivial.suffix` -> `lib.trivial.versionSuffix` * `lib.nixpkgsVersion` -> `lib.version` As `lib.nixpkgsVersion` is referenced several times in `NixOS/nixpkgs`, `NixOS/nix` and probably several user's setups. As the rename will cause a notable impact it's better to keep `lib.nixpkgsVersion` as alias with a warning yielded by `builtins.trace`.
This commit is contained in:
@@ -6,7 +6,7 @@
|
||||
set -e
|
||||
set -o pipefail
|
||||
|
||||
version=$(nix-instantiate --eval --strict '<nixpkgs>' -A lib.nixpkgsVersion | sed s/'"'//g)
|
||||
version=$(nix-instantiate --eval --strict '<nixpkgs>' -A lib.version | sed s/'"'//g)
|
||||
major=${version:0:5}
|
||||
echo "NixOS version is $version ($major)"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user