Shell : Add rust env.
This commit is contained in:
parent
ad0cbb12f3
commit
197f7bcb0a
|
@ -71,6 +71,7 @@ function nix_shell() {
|
||||||
|
|
||||||
nix_shell="${name}" nix-shell ~/.config/linux/shell/"${name^}".nix
|
nix_shell="${name}" nix-shell ~/.config/linux/shell/"${name^}".nix
|
||||||
}
|
}
|
||||||
|
alias shell="nix_shell"
|
||||||
|
|
||||||
# Autocomplete with available hosts.
|
# Autocomplete with available hosts.
|
||||||
function _comp_hosts() {
|
function _comp_hosts() {
|
||||||
|
@ -90,4 +91,4 @@ function _comp_shells() {
|
||||||
}
|
}
|
||||||
|
|
||||||
complete -F _comp_hosts nix_update nix_upgrade
|
complete -F _comp_hosts nix_update nix_upgrade
|
||||||
complete -F _comp_shells nix_shell
|
complete -F _comp_shells nix_shell shell
|
||||||
|
|
|
@ -5,7 +5,7 @@ function tmp() {
|
||||||
|
|
||||||
case "${host}" in
|
case "${host}" in
|
||||||
"desktop"|"home")
|
"desktop"|"home")
|
||||||
tmp_path="/var/mnt/storage/hot/tmp"
|
tmp_path="/storage/hot/tmp"
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
tmp_path="${HOME}/tmp"
|
tmp_path="${HOME}/tmp"
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
with import <nixpkgs> {};
|
with import <nixpkgs> {};
|
||||||
|
|
||||||
mkShell {
|
mkShell {
|
||||||
NIX_LD_LIBRARY_PATH = lib.makeLibraryPath [
|
NIX_LD_LIBRARY_PATH = lib.makeLibraryPath [
|
||||||
alsa-lib
|
alsa-lib
|
||||||
|
|
13
.config/linux/shell/Rust.nix
Normal file
13
.config/linux/shell/Rust.nix
Normal file
|
@ -0,0 +1,13 @@
|
||||||
|
with import <nixpkgs> {};
|
||||||
|
|
||||||
|
mkShell {
|
||||||
|
NIX_LD_LIBRARY_PATH = lib.makeLibraryPath [
|
||||||
|
stdenv.cc.cc
|
||||||
|
];
|
||||||
|
NIX_LD = lib.fileContents "${stdenv.cc}/nix-support/dynamic-linker";
|
||||||
|
|
||||||
|
buildInputs = [
|
||||||
|
cargo
|
||||||
|
rustc
|
||||||
|
];
|
||||||
|
}
|
Reference in a new issue