From c52d952a6aae3c850dba192a79662b990eb8dc11 Mon Sep 17 00:00:00 2001 From: Maybe Lapkin Date: Thu, 28 Nov 2024 20:31:08 +0100 Subject: add instructions for generating `flake.lock` to `envrc-flake` Previous setup instructions did not work without. (i.e. the envrc would not do anything, `nix flake show..` would provide unhelpful error) --- src/tools/nix-dev-shell/envrc-flake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/tools/nix-dev-shell') diff --git a/src/tools/nix-dev-shell/envrc-flake b/src/tools/nix-dev-shell/envrc-flake index 218d88d8721..9def420f05c 100644 --- a/src/tools/nix-dev-shell/envrc-flake +++ b/src/tools/nix-dev-shell/envrc-flake @@ -1,7 +1,7 @@ # If you want to use this as an .envrc file to create a shell with necessery components # to develop rustc, use the following command in the root of the rusr checkout: # -# ln -s ./src/tools/nix-dev-shell/envrc-flake ./.envrc && echo .envrc >> .git/info/exclude +# ln -s ./src/tools/nix-dev-shell/envrc-flake ./.envrc && nix flake update --flake ./src/tools/nix-dev-shell && echo .envrc >> .git/info/exclude if nix flake show path:./src/tools/nix-dev-shell &> /dev/null; then use flake path:./src/tools/nix-dev-shell -- cgit 1.4.1-3-g733a5 From 6058cdcccc4fcfa3c2ae2ce878cf229dae776041 Mon Sep 17 00:00:00 2001 From: Waffle Lapkin Date: Tue, 10 Dec 2024 00:09:40 +0100 Subject: remove instructions to git exclude files in `src/nix-dev-shell/envrc-*` this is no longer needed as `.gitignore` contains both `/.envrc` and `flake.lock` (and also `/.direnv/`) --- src/tools/nix-dev-shell/envrc-flake | 2 +- src/tools/nix-dev-shell/envrc-shell | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'src/tools/nix-dev-shell') diff --git a/src/tools/nix-dev-shell/envrc-flake b/src/tools/nix-dev-shell/envrc-flake index 9def420f05c..849ed1f4fc5 100644 --- a/src/tools/nix-dev-shell/envrc-flake +++ b/src/tools/nix-dev-shell/envrc-flake @@ -1,7 +1,7 @@ # If you want to use this as an .envrc file to create a shell with necessery components # to develop rustc, use the following command in the root of the rusr checkout: # -# ln -s ./src/tools/nix-dev-shell/envrc-flake ./.envrc && nix flake update --flake ./src/tools/nix-dev-shell && echo .envrc >> .git/info/exclude +# ln -s ./src/tools/nix-dev-shell/envrc-flake ./.envrc && nix flake update --flake ./src/tools/nix-dev-shell if nix flake show path:./src/tools/nix-dev-shell &> /dev/null; then use flake path:./src/tools/nix-dev-shell diff --git a/src/tools/nix-dev-shell/envrc-shell b/src/tools/nix-dev-shell/envrc-shell index fb7231a6c30..d8f900fe86a 100644 --- a/src/tools/nix-dev-shell/envrc-shell +++ b/src/tools/nix-dev-shell/envrc-shell @@ -1,7 +1,7 @@ # If you want to use this as an .envrc file to create a shell with necessery components # to develop rustc, use the following command in the root of the rusr checkout: # -# ln -s ./src/tools/nix-dev-shell/envrc-shell ./.envrc && echo .envrc >> .git/info/exclude +# ln -s ./src/tools/nix-dev-shell/envrc-shell ./.envrc use nix ./src/tools/nix-dev-shell/shell.nix -- cgit 1.4.1-3-g733a5 From 05d83185c3faac682a8a1d8a674a58afa180f292 Mon Sep 17 00:00:00 2001 From: Waffle Lapkin Date: Tue, 10 Dec 2024 00:19:29 +0100 Subject: provide `libz.so.1` in the `nix-dev-shell` `libz.so.1` is needed for some (?) things... i personally found myself in need of it when running `x t linkchecker`, which failed when running cargo build script or something. although there are also mentions of rustc itself needing it: --- src/tools/nix-dev-shell/flake.nix | 5 ++--- src/tools/nix-dev-shell/shell.nix | 5 ++--- 2 files changed, 4 insertions(+), 6 deletions(-) (limited to 'src/tools/nix-dev-shell') diff --git a/src/tools/nix-dev-shell/flake.nix b/src/tools/nix-dev-shell/flake.nix index 8ab5e097427..1b838bd2f7b 100644 --- a/src/tools/nix-dev-shell/flake.nix +++ b/src/tools/nix-dev-shell/flake.nix @@ -24,9 +24,8 @@ # Avoid creating text files for ICEs. RUSTC_ICE = "0"; # Provide `libstdc++.so.6` for the self-contained lld. - LD_LIBRARY_PATH = "${with pkgs; lib.makeLibraryPath [ - stdenv.cc.cc.lib - ]}"; + # Provide `libz.so.1`. + LD_LIBRARY_PATH = "${with pkgs; lib.makeLibraryPath [stdenv.cc.cc.lib zlib]}"; }; } ); diff --git a/src/tools/nix-dev-shell/shell.nix b/src/tools/nix-dev-shell/shell.nix index 8a5cbb7c89e..a3f5969bd81 100644 --- a/src/tools/nix-dev-shell/shell.nix +++ b/src/tools/nix-dev-shell/shell.nix @@ -13,7 +13,6 @@ pkgs.mkShell { # Avoid creating text files for ICEs. RUSTC_ICE = "0"; # Provide `libstdc++.so.6` for the self-contained lld. - LD_LIBRARY_PATH = "${with pkgs; lib.makeLibraryPath [ - stdenv.cc.cc.lib - ]}"; + # Provide `libz.so.1` + LD_LIBRARY_PATH = "${with pkgs; lib.makeLibraryPath [stdenv.cc.cc.lib zlib]}"; } -- cgit 1.4.1-3-g733a5