-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathflake.nix
More file actions
55 lines (50 loc) · 1.43 KB
/
flake.nix
File metadata and controls
55 lines (50 loc) · 1.43 KB
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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
{
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
fenix.url = "github:nix-community/fenix";
flake-utils.url = "github:numtide/flake-utils";
workerd = {
url = "github:getchoo/workerd-docker";
inputs.nixpkgs.follows = "nixpkgs";
};
wrangler = {
# Use 4.19.1
url = "github:ryand56/wrangler/1141a859c59e05ceb901d14790f0f75a6c5de3f5";
inputs.nixpkgs.follows = "nixpkgs";
};
};
outputs = {
nixpkgs,
flake-utils,
...
} @ inputs:
flake-utils.lib.eachSystem (flake-utils.lib.defaultSystems) (
system: let
pkgs = import nixpkgs { inherit system; };
fenix = inputs.fenix.packages.${system};
workerd = inputs.workerd.packages.${system}.workerd;
wrangler = inputs.wrangler.packages.${system}.wrangler;
# fenix: rustup replacement for reproducible builds
toolchain = fenix.fromToolchainFile {
file = ./rust-toolchain.toml;
sha256 = "sha256-KUm16pHj+cRedf8vxs/Hd2YWxpOrWZ7UOrwhILdSJBU=";
};
in {
# `nix develop`
devShells.default = pkgs.mkShell {
packages = with pkgs; [
pkg-config
git-cliff
wrangler
# Rust
toolchain
cargo-dist
# NodeJs
nodejs_22
bun
];
MINIFLARE_WORKERD_PATH = "${workerd}/bin/workerd";
};
}
);
}