Merge pull request #288812 from hercules-ci/lib-flake-version
`lib/` flake: fix `lib.version`
This commit is contained in:
commit
39327e4cf2
5 changed files with 13 additions and 2 deletions
|
@ -17,6 +17,10 @@ end_of_line = unset
|
|||
insert_final_newline = unset
|
||||
trim_trailing_whitespace = unset
|
||||
|
||||
# We want readFile .version to return the version without a newline.
|
||||
[.version]
|
||||
insert_final_newline = false
|
||||
|
||||
# see https://nixos.org/nixpkgs/manual/#chap-conventions
|
||||
|
||||
# Match json/lockfiles/markdown/nix/perl/python/ruby/shell/docbook files, set indent to spaces
|
||||
|
|
1
.version
1
.version
|
@ -1 +0,0 @@
|
|||
24.05
|
1
.version
Symbolic link
1
.version
Symbolic link
|
@ -0,0 +1 @@
|
|||
lib/.version
|
1
lib/.version
Normal file
1
lib/.version
Normal file
|
@ -0,0 +1 @@
|
|||
24.05
|
|
@ -53,6 +53,12 @@ pkgs.runCommand "nixpkgs-lib-tests-nix-${nix.version}" {
|
|||
echo "Running lib/tests/modules.sh"
|
||||
bash lib/tests/modules.sh
|
||||
|
||||
echo "Checking lib.version"
|
||||
nix-instantiate lib -A version --eval || {
|
||||
echo "lib.version does not evaluate when lib is isolated from the rest of the nixpkgs tree"
|
||||
exit 1
|
||||
}
|
||||
|
||||
echo "Running lib/tests/filesystem.sh"
|
||||
TEST_LIB=$PWD/lib bash lib/tests/filesystem.sh
|
||||
|
||||
|
|
|
@ -159,7 +159,7 @@ in {
|
|||
version = release + versionSuffix;
|
||||
|
||||
/* Returns the current nixpkgs release number as string. */
|
||||
release = lib.strings.fileContents ../.version;
|
||||
release = lib.strings.fileContents ./.version;
|
||||
|
||||
/* The latest release that is supported, at the time of release branch-off,
|
||||
if applicable.
|
||||
|
|
Loading…
Reference in a new issue