-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdevenv.nix
56 lines (43 loc) · 1.02 KB
/
devenv.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
51
52
53
54
55
56
{ pkgs, inputs, ... }:
{
# https://devenv.sh/basics/
# FIXME: trows error, uncomment when fixed
# env.RUSTC_WRAPPER = "${pkgs.sccache}/bin/sccache";
# don't clash with rust-analyzer
env.CARGO_TARGET_DIR = "target/t";
dotenv.enable = true;
# https://devenv.sh/packages/
packages = with pkgs;
[
protobuf
buf
nodejs
cargo
cargo-watch
cargo-tarpaulin
grpcurl
sccache
openapi-generator-cli
git
yq
openssl
pkg-config
(pkgs.callPackage ./nix/protoc-gen-prost-crate.nix { })
] ++ (lib.optionals pkgs.stdenv.isDarwin (with pkgs.darwin.apple_sdk.frameworks; [
CoreFoundation
SystemConfiguration
Security
]));
# https://devenv.sh/languages/
languages.nix.enable = true;
languages.rust.enable = true;
scripts.ci.exec = ''
set -e
cargo run -p haqq-build
if ! git diff --exit-code; then
echo "Directory is not clean after code generation"
exit 1
fi
cargo test --workspace
'';
}