From be7a7a5b78d11e49d0edf55ca7d7ae1de7a9b965 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Wed, 27 Apr 2011 13:01:42 +0000 Subject: [PATCH] * nixos-build-vms/build-vms.nix: drop the "nixos" function argument, since the path to the NixOS source tree is known. svn path=/nixos/trunk/; revision=26989 --- modules/installer/tools/nixos-build-vms/build-vms.nix | 9 ++++----- .../installer/tools/nixos-build-vms/nixos-build-vms.sh | 8 ++------ 2 files changed, 6 insertions(+), 11 deletions(-) diff --git a/modules/installer/tools/nixos-build-vms/build-vms.nix b/modules/installer/tools/nixos-build-vms/build-vms.nix index df4152b30d68..f83f68f94391 100644 --- a/modules/installer/tools/nixos-build-vms/build-vms.nix +++ b/modules/installer/tools/nixos-build-vms/build-vms.nix @@ -1,12 +1,11 @@ -{ nixos -, nixpkgs +{ nixpkgs , services ? "/etc/nixos/services" , system ? builtins.currentSystem , networkExpr }: -let nodes = import networkExpr; -in -with import "${nixos}/lib/testing.nix" { inherit nixpkgs services system; }; +let nodes = import networkExpr; in + +with import ../../../../lib/testing.nix { inherit nixpkgs services system; }; (complete { inherit nodes; testScript = ""; }).driver diff --git a/modules/installer/tools/nixos-build-vms/nixos-build-vms.sh b/modules/installer/tools/nixos-build-vms/nixos-build-vms.sh index 70c1ecaf5ac9..8fa9ea925fb0 100644 --- a/modules/installer/tools/nixos-build-vms/nixos-build-vms.sh +++ b/modules/installer/tools/nixos-build-vms/nixos-build-vms.sh @@ -48,11 +48,6 @@ shift # Validate the given options -if [ -z "$NIXOS" ] -then - NIXOS=/etc/nixos/nixos -fi - if [ "$@" = "" ] then echo "ERROR: A network expression must be specified!" >&2 @@ -63,4 +58,5 @@ fi # Build a network of VMs -nix-build $NIXOS/modules/installer/tools/nixos-build-vms/build-vms.nix --argstr networkExpr $networkExpr --argstr nixos $NIXOS --argstr nixpkgs $NIXPKGS_ALL $noOutLinkArg $showTraceArg +nix-build ${NIXOS:-/etc/nixos/nixos}/modules/installer/tools/nixos-build-vms/build-vms.nix \ + --argstr networkExpr $networkExpr --argstr nixpkgs "${NIXPKGS_ALL:-/etc/nixos/nixpkgs}" $noOutLinkArg $showTraceArg