-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathflake.nix
50 lines (47 loc) · 1.28 KB
/
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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
{
inputs = {
unstable.url = "github:nixos/nixpkgs/nixos-unstable";
flake-utils.url = "github:numtide/flake-utils";
};
outputs = {
unstable,
flake-utils,
...
}:
flake-utils.lib.eachDefaultSystem (system: let
pkgs = import unstable {
inherit system;
};
in {
devShell = pkgs.mkShell {
RUST_BACKTRACE = 1;
TS_RS_EXPORT_DIR = "../web/src/bindings";
shellHook = ''
PATH="$HOME/.rustup/bin:$PATH"
if ! type -p cargo-watch &>/dev/null; then
cargo install cargo-watch
fi
export APISIX_CONFIG_FILE="$PWD/scripts/apisix_conf.yaml"
'';
packages = with pkgs;
[
bun
openssl
pkg-config
rustup
wasm-bindgen-cli
wasm-pack
]
++ lib.optionals pkgs.stdenv.isDarwin [
iconv
# Required for cargo-watch
darwin.apple_sdk.frameworks.SystemConfiguration
darwin.apple_sdk.frameworks.Security
darwin.apple_sdk.frameworks.CoreFoundation
darwin.apple_sdk.frameworks.CoreServices
darwin.apple_sdk.frameworks.Foundation
darwin.apple_sdk.frameworks.Cocoa
];
};
});
}