-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathflake.nix
34 lines (31 loc) · 855 Bytes
/
flake.nix
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
{
description = "wasm-pack setup";
inputs = {
nixpkgs = { url = "github:nixos/nixpkgs/nixos-unstable"; };
rust-overlay = { url = "github:oxalica/rust-overlay"; };
};
outputs = { nixpkgs, rust-overlay, ... }:
let system = "x86_64-linux";
in {
devShell.${system} = let
pkgs = import nixpkgs {
inherit system;
overlays = [ rust-overlay.overlay ];
};
in (({ pkgs, ... }:
pkgs.mkShell {
buildInputs = with pkgs; [
cargo
cargo-watch
trunk
rust-analyzer
wasm-pack
(rust-bin.stable.latest.default.override {
extensions = [ "rust-src" ];
targets = [ "wasm32-unknown-unknown" ];
})
];
shellHook = "";
}) { pkgs = pkgs; });
};
}