aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDomen Kožar <domen@dev.si>2020-11-03 11:45:56 +0100
committerGitHub <noreply@github.com>2020-11-03 11:45:56 +0100
commitcf82e14712b3be881b7c880468cd5486e8934638 (patch)
tree9549d0181bbf038d41e60a23d77f39bcc97f23dc
parent550e11f077ae508abde5a33998a9d4029880e7b2 (diff)
parent8cd2ff69c38913d5fcddeb0a012ba0cf34de0686 (diff)
Merge pull request #4214 from grahamc/test-nix-copy-closure
nix-copy-closure: verify it works with drvs
-rw-r--r--tests/nix-copy-closure.nix10
1 files changed, 8 insertions, 2 deletions
diff --git a/tests/nix-copy-closure.nix b/tests/nix-copy-closure.nix
index e5f6a0f12..1b63a3fca 100644
--- a/tests/nix-copy-closure.nix
+++ b/tests/nix-copy-closure.nix
@@ -7,14 +7,14 @@ with import (nixpkgs + "/nixos/lib/testing-python.nix") {
extraConfigurations = [ { nixpkgs.overlays = [ overlay ]; } ];
};
-makeTest (let pkgA = pkgs.cowsay; pkgB = pkgs.wget; pkgC = pkgs.hello; in {
+makeTest (let pkgA = pkgs.cowsay; pkgB = pkgs.wget; pkgC = pkgs.hello; pkgD = pkgs.tmux; in {
name = "nix-copy-closure";
nodes =
{ client =
{ config, lib, pkgs, ... }:
{ virtualisation.writableStore = true;
- virtualisation.pathsInNixDB = [ pkgA ];
+ virtualisation.pathsInNixDB = [ pkgA pkgD.drvPath ];
nix.binaryCaches = lib.mkForce [ ];
};
@@ -60,6 +60,12 @@ makeTest (let pkgA = pkgs.cowsay; pkgB = pkgs.wget; pkgC = pkgs.hello; in {
# Copy the closure of package C via the SSH substituter.
client.fail("nix-store -r ${pkgC}")
+
+ # Copy the derivation of package D's derivation from the client to the server.
+ server.fail("nix-store --check-validity ${pkgD.drvPath}")
+ client.succeed("nix-copy-closure --to server --gzip ${pkgD.drvPath} >&2")
+ server.succeed("nix-store --check-validity ${pkgD.drvPath}")
+
# FIXME
# client.succeed(
# "nix-store --option use-ssh-substituter true"