about summary refs log tree commit diff
diff options
context:
space:
mode:
authorLeón Orell Valerian Liehr <me@fmease.dev>2024-12-10 08:56:01 +0100
committerGitHub <noreply@github.com>2024-12-10 08:56:01 +0100
commit8434a6e2bbb3c4855f24e1a86de960dca26cadf9 (patch)
tree5d8d7143fa78ad49b28d46d7d75dc6f6356e96fc
parent79a824cdebe81a7e7149e9fa118fd4282da31bce (diff)
parent05d83185c3faac682a8a1d8a674a58afa180f292 (diff)
downloadrust-8434a6e2bbb3c4855f24e1a86de960dca26cadf9.tar.gz
rust-8434a6e2bbb3c4855f24e1a86de960dca26cadf9.zip
Rollup merge of #134102 - WaffleLapkin:nix-dev-shell-fixups-2024-12-10, r=Noratrieb
Miscellaneous fixes for nix-dev-shell

this makes it so files in `src/nix-dev-shell` are *not* ignored, as they
should not be. note that `flake.lock` is still ignored globally.

r? `@Noratrieb`

See individual commits for more info.

cc #131176 (it added gitignore entries I'm changing).
-rw-r--r--.gitignore8
-rw-r--r--src/tools/nix-dev-shell/envrc-flake2
-rw-r--r--src/tools/nix-dev-shell/envrc-shell2
-rw-r--r--src/tools/nix-dev-shell/flake.nix5
-rw-r--r--src/tools/nix-dev-shell/shell.nix5
5 files changed, 10 insertions, 12 deletions
diff --git a/.gitignore b/.gitignore
index ce9db8b861d..f84a3704ca9 100644
--- a/.gitignore
+++ b/.gitignore
@@ -88,12 +88,12 @@ package.json
 tests/rustdoc-gui/src/**.lock
 
 ## direnv
-.envrc
-.direnv/
+/.envrc
+/.direnv/
 
 ## nix
-flake.nix
+/flake.nix
 flake.lock
-default.nix
+/default.nix
 
 # Before adding new lines, see the comment at the top.
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
   
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]}";
 }