Switch impure mode to parameter
This commit is contained in:
parent
895359eade
commit
34404ddf6b
|
@ -14,7 +14,7 @@ Results in a file called c.img
|
|||
|
||||
If in pure mode
|
||||
```shell
|
||||
nix-build
|
||||
nix-build build.nix
|
||||
ls -la ./result
|
||||
```
|
||||
Results in a symlink to the image in the nix store
|
||||
|
|
|
@ -1,4 +1,7 @@
|
|||
{ pkgs ? import <nixpkgs> {} }:
|
||||
{
|
||||
pkgs ? import <nixpkgs> {}
|
||||
, impureMode ? false
|
||||
}:
|
||||
|
||||
let
|
||||
win = (import ./default.nix { inherit pkgs; });
|
||||
|
@ -25,7 +28,7 @@ win.makeWindowsImage {
|
|||
};
|
||||
|
||||
# Build install script & skip building iso
|
||||
impureMode = false;
|
||||
inherit impureMode;
|
||||
|
||||
# impureShellCommands = [
|
||||
# "powershell.exe echo Hello"
|
||||
|
|
|
@ -12,9 +12,7 @@
|
|||
let
|
||||
# qemu_test is a smaller closure only building for a single system arch
|
||||
qemu = pkgs.qemu_test;
|
||||
libguestfs = pkgs.libguestfs-with-appliance.override {
|
||||
inherit qemu;
|
||||
};
|
||||
libguestfs = pkgs.libguestfs-with-appliance;
|
||||
|
||||
runQemuCommand = name: command: (
|
||||
pkgs.runCommandNoCC name { buildInputs = [ pkgs.p7zip qemu libguestfs ]; }
|
||||
|
|
Loading…
Reference in New Issue