Skip to content

Commit 8434a6e

Browse files
authored
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).
2 parents 79a824c + 05d8318 commit 8434a6e

File tree

5 files changed

+10
-12
lines changed

5 files changed

+10
-12
lines changed

.gitignore

+4-4
Original file line numberDiff line numberDiff line change
@@ -88,12 +88,12 @@ package.json
8888
tests/rustdoc-gui/src/**.lock
8989

9090
## direnv
91-
.envrc
92-
.direnv/
91+
/.envrc
92+
/.direnv/
9393

9494
## nix
95-
flake.nix
95+
/flake.nix
9696
flake.lock
97-
default.nix
97+
/default.nix
9898

9999
# Before adding new lines, see the comment at the top.

src/tools/nix-dev-shell/envrc-flake

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# If you want to use this as an .envrc file to create a shell with necessery components
22
# to develop rustc, use the following command in the root of the rusr checkout:
33
#
4-
# ln -s ./src/tools/nix-dev-shell/envrc-flake ./.envrc && nix flake update --flake ./src/tools/nix-dev-shell && echo .envrc >> .git/info/exclude
4+
# ln -s ./src/tools/nix-dev-shell/envrc-flake ./.envrc && nix flake update --flake ./src/tools/nix-dev-shell
55

66
if nix flake show path:./src/tools/nix-dev-shell &> /dev/null; then
77
use flake path:./src/tools/nix-dev-shell

src/tools/nix-dev-shell/envrc-shell

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# If you want to use this as an .envrc file to create a shell with necessery components
22
# to develop rustc, use the following command in the root of the rusr checkout:
33
#
4-
# ln -s ./src/tools/nix-dev-shell/envrc-shell ./.envrc && echo .envrc >> .git/info/exclude
4+
# ln -s ./src/tools/nix-dev-shell/envrc-shell ./.envrc
55

66
use nix ./src/tools/nix-dev-shell/shell.nix
77

src/tools/nix-dev-shell/flake.nix

+2-3
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,8 @@
2424
# Avoid creating text files for ICEs.
2525
RUSTC_ICE = "0";
2626
# Provide `libstdc++.so.6` for the self-contained lld.
27-
LD_LIBRARY_PATH = "${with pkgs; lib.makeLibraryPath [
28-
stdenv.cc.cc.lib
29-
]}";
27+
# Provide `libz.so.1`.
28+
LD_LIBRARY_PATH = "${with pkgs; lib.makeLibraryPath [stdenv.cc.cc.lib zlib]}";
3029
};
3130
}
3231
);

src/tools/nix-dev-shell/shell.nix

+2-3
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ pkgs.mkShell {
1313
# Avoid creating text files for ICEs.
1414
RUSTC_ICE = "0";
1515
# Provide `libstdc++.so.6` for the self-contained lld.
16-
LD_LIBRARY_PATH = "${with pkgs; lib.makeLibraryPath [
17-
stdenv.cc.cc.lib
18-
]}";
16+
# Provide `libz.so.1`
17+
LD_LIBRARY_PATH = "${with pkgs; lib.makeLibraryPath [stdenv.cc.cc.lib zlib]}";
1918
}

0 commit comments

Comments
 (0)