-
Notifications
You must be signed in to change notification settings - Fork 12.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add an option of using nix-shell instead of nix flake
- Loading branch information
1 parent
a31ef10
commit 002a6b1
Showing
4 changed files
with
34 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
# 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 && echo .envrc >> .git/info/exclude | ||
|
||
if nix flake show path:./src/tools/nix-dev-shell &> /dev/null; then | ||
use flake path:./src/tools/nix-dev-shell | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +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 | ||
|
||
use nix ./src/tools/nix-dev-shell/shell.nix | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
{ pkgs ? import <nixpkgs> {} }: | ||
let | ||
x = import ./x { inherit pkgs; }; | ||
in | ||
pkgs.mkShell { | ||
name = "rustc"; | ||
nativeBuildInputs = with pkgs; [ | ||
binutils cmake ninja pkg-config python3 git curl cacert patchelf nix | ||
]; | ||
buildInputs = with pkgs; [ | ||
openssl glibc.out glibc.static x | ||
]; | ||
# 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 | ||
]}"; | ||
} |