Devops stuff
This commit is contained in:
31
shell.nix
Normal file
31
shell.nix
Normal file
@@ -0,0 +1,31 @@
|
||||
{
|
||||
pkgs ? import <nixpkgs> { },
|
||||
}:
|
||||
|
||||
let
|
||||
rust-toolchain = pkgs.rust-bin.stable."1.73.0".default;
|
||||
|
||||
rust-with-wasm-target = rust-toolchain.override {
|
||||
targets = [ "wasm32-unknown-unknown" ];
|
||||
};
|
||||
|
||||
in
|
||||
pkgs.mkShell {
|
||||
buildInputs = with pkgs; [
|
||||
rust-with-wasm-target
|
||||
|
||||
wasm-bindgen-cli
|
||||
wasm-pack
|
||||
|
||||
bun
|
||||
clang
|
||||
pkg-config
|
||||
openssl
|
||||
];
|
||||
|
||||
shellHook = ''
|
||||
# Set the linker for the wasm target to clang to avoid potential issues
|
||||
export CARGO_TARGET_WASM32_UNKNOWN_UNKNOWN_LINKER="${pkgs.clang}/bin/clang"
|
||||
echo "Nix shell is ready with Cargo, wasm-bindgen, and Bun."
|
||||
'';
|
||||
}
|
||||
Reference in New Issue
Block a user