-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathflake.nix
More file actions
23 lines (22 loc) · 775 Bytes
/
flake.nix
File metadata and controls
23 lines (22 loc) · 775 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
{
# https://www.tomhoule.com/2021/building-rust-wasm-with-nix-flakes/
inputs = {
flake-utils.url = "github:numtide/flake-utils";
nixpkgs.url = "nixpkgs/nixos-unstable";
rust-overlay = {
url = "github:oxalica/rust-overlay";
inputs.nixpkgs.follows = "nixpkgs";
};
};
outputs = { self, nixpkgs, flake-utils, rust-overlay }:
flake-utils.lib.eachDefaultSystem (system:
let
overlays = [ rust-overlay.overlays.default ];
pkgs = import nixpkgs { inherit overlays system; };
rust = pkgs.rust-bin.fromRustupToolchainFile ./rust-toolchain.toml;
in {
devShell = pkgs.mkShell {
packages = [ pkgs.wasm-pack rust pkgs.openssl pkgs.pkg-config pkgs.nodejs-16_x pkgs.yarn ];
};
});
}