build(nix): allow overriding TARGET_CPU

This commit is contained in:
aviac
2026-05-11 15:05:57 +02:00
committed by Ellis Git
parent b4e104925d
commit 388cbeb60e
2 changed files with 12 additions and 6 deletions
+7 -5
View File
@@ -22,11 +22,13 @@
rustflags = "--cfg reqwest_unstable";
};
# users may also override this with other cargo profiles to build for other feature sets
#
# other examples include:
#
# - release-high-perf
max-perf = self'.packages.default.override {
# for features configuration see `default` package which enables http3 by default
# example: different compilation profile and different target_cpu
max-perf-haswell = self'.packages.default.override {
# compiles explicitly for haswell arch cpus
target_cpu = "haswell";
# compiles slower but with more thorough optimizations
profile = "release-max-perf";
};
};