nixos-build-vms: move to pkgs/by-name
This commit is contained in:
parent
1bf0ffb22e
commit
8353a681b5
@ -17,12 +17,7 @@ let
|
|||||||
'';
|
'';
|
||||||
});
|
});
|
||||||
|
|
||||||
nixos-build-vms = makeProg {
|
inherit (pkgs) nixos-build-vms;
|
||||||
name = "nixos-build-vms";
|
|
||||||
src = ./nixos-build-vms/nixos-build-vms.sh;
|
|
||||||
inherit (pkgs) runtimeShell;
|
|
||||||
manPage = ./manpages/nixos-build-vms.8;
|
|
||||||
};
|
|
||||||
|
|
||||||
nixos-install = makeProg {
|
nixos-install = makeProg {
|
||||||
name = "nixos-install";
|
name = "nixos-install";
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
{ system ? builtins.currentSystem
|
{ system ? builtins.currentSystem
|
||||||
, config ? {}
|
, config ? {}
|
||||||
|
, nixpkgs
|
||||||
, networkExpr
|
, networkExpr
|
||||||
}:
|
}:
|
||||||
|
|
||||||
@ -9,9 +10,9 @@ let
|
|||||||
imports = [ module ];
|
imports = [ module ];
|
||||||
}) (import networkExpr);
|
}) (import networkExpr);
|
||||||
|
|
||||||
pkgs = import ../../../../.. { inherit system config; };
|
pkgs = import nixpkgs { inherit system config; };
|
||||||
|
|
||||||
testing = import ../../../../lib/testing-python.nix {
|
testing = import "${pkgs.path}/nixos/lib/testing-python.nix" {
|
||||||
inherit system pkgs;
|
inherit system pkgs;
|
||||||
};
|
};
|
||||||
|
|
@ -49,5 +49,6 @@ then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# Build a network of VMs
|
# Build a network of VMs
|
||||||
nix-build '<nixpkgs/nixos/modules/installer/tools/nixos-build-vms/build-vms.nix>' \
|
nix-build @buildVms@ \
|
||||||
--argstr networkExpr "$networkExpr" "${nixBuildArgs[@]}"
|
--argstr networkExpr "$networkExpr" "${nixBuildArgs[@]}" \
|
||||||
|
--arg nixpkgs "<nixpkgs>"
|
22
pkgs/by-name/ni/nixos-build-vms/package.nix
Normal file
22
pkgs/by-name/ni/nixos-build-vms/package.nix
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
{
|
||||||
|
substituteAll,
|
||||||
|
runtimeShell,
|
||||||
|
installShellFiles,
|
||||||
|
}:
|
||||||
|
substituteAll {
|
||||||
|
name = "nixos-build-vms";
|
||||||
|
src = ./nixos-build-vms.sh;
|
||||||
|
inherit runtimeShell;
|
||||||
|
buildVms = ./build-vms.nix;
|
||||||
|
|
||||||
|
dir = "bin";
|
||||||
|
isExecutable = true;
|
||||||
|
|
||||||
|
nativeBuildInputs = [ installShellFiles ];
|
||||||
|
|
||||||
|
postInstall = ''
|
||||||
|
installManPage ${./nixos-build-vms.8}
|
||||||
|
'';
|
||||||
|
|
||||||
|
meta.mainProgram = "nixos-build-vms";
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user