Skip to content

Commit

Permalink
Use nix 2.18 instead of 2.10 for invalid nixpkgs test
Browse files Browse the repository at this point in the history
nix versions < 2.18 have been marked as insecure, because of CVE-2024-27297.
  • Loading branch information
avdv committed Jul 9, 2024
1 parent 3a62ecd commit 9b563b0
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions WORKSPACE
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ load(
)

nixpkgs_package(
name = "nix_2_10",
attribute_path = "nixVersions.nix_2_10",
name = "nix_2_18",
attribute_path = "nixVersions.nix_2_18",
repositories = {"nixpkgs": "@nixpkgs"},
)

Expand Down
2 changes: 1 addition & 1 deletion tests/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ sh_test(
"//nixpkgs:srcs",
"//tests/invalid_nixpkgs_package:srcs",
"@coreutils_static//:bin",
"@nix_2_10//:bin",
"@nix_2_18//:bin",
"@rules_nixpkgs_cc//:srcs",
"@rules_nixpkgs_core//:srcs",
"@rules_nixpkgs_java//:srcs",
Expand Down
2 changes: 1 addition & 1 deletion tests/test_invalid_nixpkgs_package.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ sed -i.bak "s;COREUTILS-ABS-PATH;${PWD}/external/coreutils_static/bin/;g" defaul

# Bring a specific version of Nix which can be executed in the Bazel
# linux sandbox.
export PATH=$PWD/external/nix_2_10/bin:$PATH
export PATH=$PWD/external/nix_2_18/bin:$PATH

# This is a create all directories required to run Nix locally.
mkdir -p ${TEST_TMPDIR}/nix/{store,var/nix,etc/nix}
Expand Down

0 comments on commit 9b563b0

Please sign in to comment.