mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-21 21:21:06 +00:00
nixos/tests/misc: fix nix 2.4 support
This commit is contained in:
parent
04cf6dc67f
commit
546d60c5e6
|
@ -50,17 +50,18 @@ import ./make-test-python.nix ({ pkgs, ...} : rec {
|
|||
|
||||
|
||||
def get_path_info(path):
|
||||
result = machine.succeed(f"nix path-info --json {path}")
|
||||
result = machine.succeed(f"nix --option experimental-features nix-command path-info --json {path}")
|
||||
parsed = json.loads(result)
|
||||
return parsed
|
||||
|
||||
|
||||
with subtest("nix-db"):
|
||||
info = get_path_info("${foo}")
|
||||
print(info)
|
||||
|
||||
if (
|
||||
info[0]["narHash"]
|
||||
!= "sha256:0afw0d9j1hvwiz066z93jiddc33nxg6i6qyp26vnqyglpyfivlq5"
|
||||
!= "sha256-BdMdnb/0eWy3EddjE83rdgzWWpQjfWPAj3zDIFMD3Ck="
|
||||
):
|
||||
raise Exception("narHash not set")
|
||||
|
||||
|
|
Loading…
Reference in a new issue