Skip to content

Commit

Permalink
nix.stable.tests.nix-fallback-paths: Allow cross-compiled store path …
Browse files Browse the repository at this point in the history
…name

Nix 2.24 has a riscv5-linux path that's cross-compiled
e.g. nix-riscv64-unknown-linux-gnu-2.24.2
  • Loading branch information
roberth authored and Mic92 committed Sep 10, 2024
1 parent 5775c25 commit 4584a58
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion pkgs/tools/package-management/nix/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,9 @@ let
runCommand "test-nix-fallback-paths-version-equals-nix-stable" {
paths = lib.concatStringsSep "\n" (builtins.attrValues (import ../../../../nixos/modules/installer/tools/nix-fallback-paths.nix));
} ''
if [[ "" != $(grep -v 'nix-${pkg.version}$' <<< "$paths") ]]; then
# NOTE: name may contain cross compilation details between the pname
# and version this is permitted thanks to ([^-]*-)*
if [[ "" != $(grep -vE 'nix-([^-]*-)*${lib.strings.replaceStrings ["."] ["\\."] pkg.version}$' <<< "$paths") ]]; then
echo "nix-fallback-paths not up to date with nixVersions.stable (nix-${pkg.version})"
echo "The following paths are not up to date:"
grep -v 'nix-${pkg.version}$' <<< "$paths"
Expand Down

0 comments on commit 4584a58

Please sign in to comment.