Skip to content

Instantly share code, notes, and snippets.

@atcol
Last active December 30, 2020 09:46
Show Gist options
  • Save atcol/81e7143445e036af389e82b4c959c7a3 to your computer and use it in GitHub Desktop.
Save atcol/81e7143445e036af389e82b4c959c7a3 to your computer and use it in GitHub Desktop.
Rust & Yarn `nix.shell` for consistent development environments
with (import <nixpkgs> {});
mkShell {
buildInputs = [
gcc
glibc
zlib
openssl
rustup
ripgrep
exa
bat
yarn
];
shellHook = ''
export NIX_ENFORCE_PURITY=0
alias ls=exa
cargo update
rustup toolchain install nightly
rustup override set nightly
rustup component add clippy
rustup component add rustfmt
cargo install cargo-watch
cargo install cargo-edit
cargo install cargo-tarpaulin
cargo install cargo-audit
mkdir -p .nix-node
export NODE_PATH=$PWD/.nix-node
export NPM_CONFIG_PREFIX=$PWD/.nix-node
export PATH=$NODE_PATH/bin:$PATH
yarn set version berry
set -o vi
'';
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment