Skip to content

Commit

Permalink
Unrolled build for rust-lang#134102
Browse files Browse the repository at this point in the history
Rollup merge of rust-lang#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 rust-lang#131176 (it added gitignore entries I'm changing).
  • Loading branch information
rust-timer authored Dec 10, 2024
2 parents b597d2a + 05d8318 commit 558ca7e
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 12 deletions.
8 changes: 4 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -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.
2 changes: 1 addition & 1 deletion src/tools/nix-dev-shell/envrc-flake
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/tools/nix-dev-shell/envrc-shell
Original file line number Diff line number Diff line change
@@ -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

5 changes: 2 additions & 3 deletions src/tools/nix-dev-shell/flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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]}";
};
}
);
Expand Down
5 changes: 2 additions & 3 deletions src/tools/nix-dev-shell/shell.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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]}";
}

0 comments on commit 558ca7e

Please sign in to comment.