From ab08bffbec3f50bb80a1a781ffe75415d28eca4d Mon Sep 17 00:00:00 2001 From: Sebastian Ullrich Date: Thu, 9 Jun 2022 09:45:30 +0200 Subject: [PATCH] chore: Nix: fix stage0-from-input --- doc/make/nix.md | 2 +- flake.nix | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) 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; };