diff --git a/doc/make/nix.md b/doc/make/nix.md index bd792177da..8c57b138fe 100644 --- a/doc/make/nix.md +++ b/doc/make/nix.md @@ -89,7 +89,7 @@ nix run .#HEAD-as-stage0.emacs-dev& ``` To run `nix build` on the second stage outside of the second editor, use ```bash -nix build .#stage0-from-input +nix build .#stage0-from-input --override-input lean-stage0 .\?rev=$(git rev-parse HEAD) ``` This setup will inadvertently change your `flake.lock` file, which you can revert when you are done. diff --git a/flake.nix b/flake.nix index d3203a4a99..0733c36cfd 100644 --- a/flake.nix +++ b/flake.nix @@ -41,7 +41,9 @@ }; tsandebug = tsan.override { debug = true; }; stage0-from-input = lean-packages.override { - stage0 = lean-stage0.packages.${system}.lean; + stage0 = pkgs.writeShellScriptBin "lean" '' + exec ${lean-stage0.packages.${system}.lean}/bin/lean -Dinterpreter.prefer_native=false "$@" + ''; }; inherit self; };