From e6139f503c49ee04cc122ed4d363be91e21d7755 Mon Sep 17 00:00:00 2001 From: Avimitin Date: Wed, 11 Sep 2024 14:46:43 +0800 Subject: [PATCH] [nix] add "--interactive" as default flag for mill Using mill without "-i/--interactive" or "--no-server" will run a mill build server automatically. The build server doesn't inherit or update environment when user invoke mill at command-line, which is hard for developers to debug. As the T1 project doesn't use mill build server for a long time, I decided to add the "-i" flag as default for mill. If someday someone wants to use the unwrapped version, they can use the .mill-unwrapped executable contains in the same package. Signed-off-by: Avimitin --- nix/overlay.nix | 2 ++ 1 file changed, 2 insertions(+) diff --git a/nix/overlay.nix b/nix/overlay.nix index 5d14c6221..d6c81428b 100644 --- a/nix/overlay.nix +++ b/nix/overlay.nix @@ -37,6 +37,8 @@ rec { mill = let jre = final.jdk21; in (prev.mill.override { inherit jre; }).overrideAttrs (_: { passthru = { inherit jre; }; + # --interactive implies --no-server + postInstall = ''wrapProgram $out/bin/mill --add-flags "--interactive"''; }); # some symbols in newlib libgloss uses ecall, which does not work in emulator