Skip to content

Commit

Permalink
lib flake: Fix version
Browse files Browse the repository at this point in the history
Manually tested with

nix-repl> :lf path:lib
nix-repl> lib.version
  • Loading branch information
roberth committed Feb 26, 2024
1 parent 31c53f1 commit 17117cf
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 1 deletion.
1 change: 1 addition & 0 deletions lib/.version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
24.05
9 changes: 9 additions & 0 deletions lib/tests/test-with-nix.nix
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,15 @@ pkgs.runCommand "nixpkgs-lib-tests-nix-${nix.version}" {
nix-store --init
# nixpkgs/lib/.version is a copy of nixpkgs/.version, so that the lib
# subtree is valid in isolation (except for the tests, but that's ok)
cp ${../../.version} nixpkgs-.version
cp ${../.version} nixpkgs-lib-.version
diff -U3 nixpkgs-.version nixpkgs-lib-.version || {
echo '<nixpkgs/.version> and <nixpkgs/lib/.version> must match.'
exit 1
}
cp -r ${../.} lib
echo "Running lib/tests/modules.sh"
bash lib/tests/modules.sh
Expand Down
2 changes: 1 addition & 1 deletion lib/trivial.nix
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,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.
Expand Down

0 comments on commit 17117cf

Please sign in to comment.