From 34404ddf6b52703128c806102806012c999cbe15 Mon Sep 17 00:00:00 2001 From: adisbladis Date: Wed, 22 Apr 2020 09:35:05 +0100 Subject: [PATCH] Switch impure mode to parameter --- artiq-fast/windows/README.md | 2 +- artiq-fast/windows/build.nix | 7 +++++-- artiq-fast/windows/win.nix | 4 +--- 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/artiq-fast/windows/README.md b/artiq-fast/windows/README.md index d1fb5bb..07962a7 100644 --- a/artiq-fast/windows/README.md +++ b/artiq-fast/windows/README.md @@ -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 diff --git a/artiq-fast/windows/build.nix b/artiq-fast/windows/build.nix index 1d475f4..9cac0d0 100644 --- a/artiq-fast/windows/build.nix +++ b/artiq-fast/windows/build.nix @@ -1,4 +1,7 @@ -{ pkgs ? import {} }: +{ + pkgs ? import {} + , 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" diff --git a/artiq-fast/windows/win.nix b/artiq-fast/windows/win.nix index d4750b9..0cfc0fc 100644 --- a/artiq-fast/windows/win.nix +++ b/artiq-fast/windows/win.nix @@ -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 ]; }