Devops stuff
This commit is contained in:
32
shell.nix
Normal file
32
shell.nix
Normal file
@@ -0,0 +1,32 @@
|
||||
{
|
||||
pkgs ? import <nixpkgs> { },
|
||||
}:
|
||||
|
||||
pkgs.mkShell {
|
||||
nativeBuildInputs = with pkgs; [
|
||||
cargo
|
||||
rustc
|
||||
|
||||
(rust-std.override {
|
||||
targets = [ "wasm32-unknown-unknown" ];
|
||||
})
|
||||
|
||||
wasm-bindgen-cli
|
||||
wasm-pack
|
||||
bun
|
||||
|
||||
clang
|
||||
pkg-config
|
||||
openssl
|
||||
];
|
||||
|
||||
shellHook = ''
|
||||
# Set the linker for the wasm target to clang to avoid potential issues on NixOS
|
||||
export CARGO_TARGET_WASM32_UNKNOWN_UNKNOWN_LINKER="${pkgs.clang}/bin/clang"
|
||||
|
||||
# The rust-src path is needed by some tools like rust-analyzer
|
||||
export RUST_SRC_PATH="${pkgs.rustPlatform.rustLibSrc}"
|
||||
|
||||
echo "Nix shell is ready with Rust (wasm target), wasm-bindgen, and Bun."
|
||||
'';
|
||||
}
|
||||
Reference in New Issue
Block a user