about summary refs log tree commit diff
diff options
context:
space:
mode:
authorWaffle Lapkin <waffle.lapkin@gmail.com>2024-12-10 00:19:29 +0100
committerWaffle Lapkin <waffle.lapkin@gmail.com>2024-12-10 00:24:21 +0100
commit05d83185c3faac682a8a1d8a674a58afa180f292 (patch)
tree0febc383d1c5c86f03e9607897800f57225b5c61
parent6058cdcccc4fcfa3c2ae2ce878cf229dae776041 (diff)
downloadrust-05d83185c3faac682a8a1d8a674a58afa180f292.tar.gz
rust-05d83185c3faac682a8a1d8a674a58afa180f292.zip
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:
<https://github.com/NixOS/nixpkgs/issues/92946>
-rw-r--r--src/tools/nix-dev-shell/flake.nix5
-rw-r--r--src/tools/nix-dev-shell/shell.nix5
2 files changed, 4 insertions, 6 deletions
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]}";
 }