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 {
|
||||
name = "nixos-build-vms";
|
||||
src = ./nixos-build-vms/nixos-build-vms.sh;
|
||||
inherit (pkgs) runtimeShell;
|
||||
manPage = ./manpages/nixos-build-vms.8;
|
||||
};
|
||||
inherit (pkgs) nixos-build-vms;
|
||||
|
||||
nixos-install = makeProg {
|
||||
name = "nixos-install";
|
||||
|
@ -1,5 +1,6 @@
|
||||
{ system ? builtins.currentSystem
|
||||
, config ? {}
|
||||
, nixpkgs
|
||||
, networkExpr
|
||||
}:
|
||||
|
||||
@ -9,9 +10,9 @@ let
|
||||
imports = [ module ];
|
||||
}) (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;
|
||||
};
|
||||
|
@ -49,5 +49,6 @@ then
|
||||
fi
|
||||
|
||||
# Build a network of VMs
|
||||
nix-build '<nixpkgs/nixos/modules/installer/tools/nixos-build-vms/build-vms.nix>' \
|
||||
--argstr networkExpr "$networkExpr" "${nixBuildArgs[@]}"
|
||||
nix-build @buildVms@ \
|
||||
--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