-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathflake.nix
More file actions
202 lines (170 loc) · 4.6 KB
/
Copy pathflake.nix
File metadata and controls
202 lines (170 loc) · 4.6 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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
{
description = "wayfind";
inputs = {
nixpkgs = {
url = "github:NixOS/nixpkgs/nixpkgs-unstable";
};
rust-overlay = {
url = "github:oxalica/rust-overlay";
inputs = {
nixpkgs.follows = "nixpkgs";
};
};
};
# nix flake show
outputs =
{
nixpkgs,
rust-overlay,
...
}:
let
perSystem = nixpkgs.lib.genAttrs nixpkgs.lib.systems.flakeExposed;
systemPkgs = perSystem (
system:
import nixpkgs {
inherit system;
overlays = [
rust-overlay.overlays.default
];
}
);
perSystemPkgs = f: perSystem (system: f (systemPkgs.${system}));
in
{
devShells = perSystemPkgs (pkgs: {
# nix develop
default = pkgs.mkShell.override { stdenv = pkgs.useWildLinker pkgs.stdenv; } {
name = "wayfind-shell";
env = {
# Nix
NIX_PATH = "nixpkgs=${nixpkgs.outPath}";
# Rust
RUSTFLAGS = pkgs.lib.concatStringsSep " " [
"-C target-cpu=native"
"-Z threads=0"
];
# Cargo
CARGO_UNSTABLE_CODEGEN_BACKEND = "true";
CARGO_PROFILE_DEV_CODEGEN_BACKEND = "cranelift";
CARGO_UNSTABLE_FEATURE_UNIFICATION = "true";
CARGO_RESOLVER_FEATURE_UNIFICATION = "workspace";
CARGO_UNSTABLE_PROFILE_HINT_MOSTLY_UNUSED = "true";
};
buildInputs = with pkgs; [
# Rust
(rust-bin.nightly.latest.minimal.override {
targets = [
"thumbv6m-none-eabi"
"wasm32-unknown-unknown"
];
extensions = [
"clippy"
"llvm-tools"
"rust-analyzer"
"rust-src"
"rustc-codegen-cranelift"
"rustfmt"
];
})
sccache
cargo-codspeed
cargo-deny
cargo-expand
cargo-features-manager
cargo-fuzz
cargo-insta
cargo-llvm-cov
cargo-llvm-lines
cargo-nextest
cargo-outdated
cargo-semver-checks
cargo-shear
cargo-show-asm
release-plz
# Git
committed
# GitHub
gh
zizmor
# Spellchecking
typos
typos-lsp
# TOML
tombi
# Nix
nixfmt
nixd
nil
];
};
# nix develop .#ci
ci = pkgs.mkShell.override { stdenv = pkgs.useWildLinker pkgs.stdenv; } {
name = "wayfind-ci-shell";
env = {
# Rust
RUSTC_WRAPPER = "sccache";
RUSTFLAGS = pkgs.lib.concatStringsSep " " [
"-Z threads=0"
];
# Cargo
CARGO_INCREMENTAL = "0";
CARGO_UNSTABLE_CODEGEN_BACKEND = "true";
CARGO_PROFILE_DEV_CODEGEN_BACKEND = "cranelift";
CARGO_UNSTABLE_FEATURE_UNIFICATION = "true";
CARGO_RESOLVER_FEATURE_UNIFICATION = "workspace";
CARGO_UNSTABLE_PROFILE_HINT_MOSTLY_UNUSED = "true";
};
buildInputs = with pkgs; [
# Rust
(rust-bin.nightly.latest.minimal.override {
extensions = [
"clippy"
"llvm-tools"
"rustc-codegen-cranelift"
"rustfmt"
];
})
sccache
cargo-codspeed
cargo-deny
cargo-fuzz
cargo-llvm-cov
cargo-nextest
cargo-shear
release-plz
# Git
committed
# GitHub
zizmor
# Spellchecking
typos
# TOML
tombi
# Nix
nixfmt
];
};
# nix develop .#ci-compatibility
ci-compatibility = pkgs.mkShell.override { stdenv = pkgs.useWildLinker pkgs.stdenv; } {
name = "wayfind-ci-compatibility-shell";
env = {
# Rust
RUSTC_WRAPPER = "sccache";
# Cargo
CARGO_INCREMENTAL = "0";
};
buildInputs = with pkgs; [
# Rust
(rust-bin.stable."1.85.0".minimal.override {
targets = [
"thumbv6m-none-eabi"
"wasm32-unknown-unknown"
];
})
sccache
];
};
});
};
}