Skip to content

Commit

Permalink
Merge pull request #1 from hacklschorsch/add-nix-shell
Browse files Browse the repository at this point in the history
Add shell.nix to install build requirements using Nix
  • Loading branch information
gweiworld authored Feb 16, 2024
2 parents 4ec8a19 + 2b9f0ed commit 9fd3cd6
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions shell.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# This installs the build requirements using Nix.
# Enter environment using `nix-shell` and continue from README.md's '## Setup Steps'

let
rust_overlay = import (builtins.fetchTarball "https://github.com/oxalica/rust-overlay/archive/master.tar.gz");
pkgs = import <nixpkgs> { overlays = [ rust_overlay ]; };
in
with pkgs;
mkShell {
buildInputs = [
nodejs
wasm-pack
pkg-config
openssl
binaryen # For wasm-opt (optional, but nice to have no warnings)
(rust-bin.fromRustupToolchain {
channel = "stable";
components = [ "cargo" ];
targets = [ "wasm32-unknown-unknown" ];
})
];
}

0 comments on commit 9fd3cd6

Please sign in to comment.