forked from M-Labs/nix-scripts
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
|
If in pure mode
|
||||||
```shell
|
```shell
|
||||||
nix-build
|
nix-build build.nix
|
||||||
ls -la ./result
|
ls -la ./result
|
||||||
```
|
```
|
||||||
Results in a symlink to the image in the nix store
|
Results in a symlink to the image in the nix store
|
||||||
|
@ -1,4 +1,7 @@
|
|||||||
{ pkgs ? import <nixpkgs> {} }:
|
{
|
||||||
|
pkgs ? import <nixpkgs> {}
|
||||||
|
, impureMode ? false
|
||||||
|
}:
|
||||||
|
|
||||||
let
|
let
|
||||||
win = (import ./default.nix { inherit pkgs; });
|
win = (import ./default.nix { inherit pkgs; });
|
||||||
@ -25,7 +28,7 @@ win.makeWindowsImage {
|
|||||||
};
|
};
|
||||||
|
|
||||||
# Build install script & skip building iso
|
# Build install script & skip building iso
|
||||||
impureMode = false;
|
inherit impureMode;
|
||||||
|
|
||||||
# impureShellCommands = [
|
# impureShellCommands = [
|
||||||
# "powershell.exe echo Hello"
|
# "powershell.exe echo Hello"
|
||||||
|
@ -12,9 +12,7 @@
|
|||||||
let
|
let
|
||||||
# qemu_test is a smaller closure only building for a single system arch
|
# qemu_test is a smaller closure only building for a single system arch
|
||||||
qemu = pkgs.qemu_test;
|
qemu = pkgs.qemu_test;
|
||||||
libguestfs = pkgs.libguestfs-with-appliance.override {
|
libguestfs = pkgs.libguestfs-with-appliance;
|
||||||
inherit qemu;
|
|
||||||
};
|
|
||||||
|
|
||||||
runQemuCommand = name: command: (
|
runQemuCommand = name: command: (
|
||||||
pkgs.runCommandNoCC name { buildInputs = [ pkgs.p7zip qemu libguestfs ]; }
|
pkgs.runCommandNoCC name { buildInputs = [ pkgs.p7zip qemu libguestfs ]; }
|
||||||
|
Loading…
Reference in New Issue
Block a user