Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Miscellaneous fixes for nix-dev-shell #134102

Merged
merged 3 commits into from
Dec 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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]}";
}
Loading