1
0
Fork 1
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:
Bernardo Meurer 2021-11-09 20:13:14 -08:00
parent 04cf6dc67f
commit 546d60c5e6
No known key found for this signature in database
GPG key ID: F4C0D53B8D14C246

View file

@ -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")