From ca6ad0de389b86cb0a14e3cdadc3cb7c5de90eb9 Mon Sep 17 00:00:00 2001 From: Zhaofeng Li Date: Fri, 4 Feb 2022 20:58:17 -0800 Subject: [PATCH] integration-tests: Fix flakes test in Nix 2.6 Using a symlink to a Nix store path no longer works. --- integration-tests/flakes/default.nix | 2 ++ integration-tests/flakes/flake.nix | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/integration-tests/flakes/default.nix b/integration-tests/flakes/default.nix index 693b17b..00b5e72 100644 --- a/integration-tests/flakes/default.nix +++ b/integration-tests/flakes/default.nix @@ -14,6 +14,8 @@ in tools.makeTest { testScript = '' import re + deployer.succeed("sed -i \"s @nixpkgs@ $(readlink /nixpkgs) g\" /tmp/bundle/flake.nix") + with subtest("Lock flake dependencies"): # --impure required for path:/nixpkgs which is a symlink to a store path deployer.succeed("cd /tmp/bundle && nix --experimental-features \"nix-command flakes\" flake lock --impure") diff --git a/integration-tests/flakes/flake.nix b/integration-tests/flakes/flake.nix index ef89a92..190647c 100644 --- a/integration-tests/flakes/flake.nix +++ b/integration-tests/flakes/flake.nix @@ -2,7 +2,7 @@ description = "A simple deployment"; inputs = { - nixpkgs.url = "path:/nixpkgs"; + nixpkgs.url = "path:@nixpkgs@"; }; outputs = { self, nixpkgs }: let