aboutsummaryrefslogtreecommitdiff
path: root/flake.nix
diff options
context:
space:
mode:
authoreldritch horrors <pennae@lix.systems>2024-03-25 22:16:38 +0100
committereldritch horrors <pennae@lix.systems>2024-03-25 21:48:55 +0000
commitc3a5f937d374d9b2e6aee93bbec7b6786b7c1457 (patch)
treef0d33f0b0ae798cbfdcc2891da76f47a8d4f3a6d /flake.nix
parent787c4397f11931e26f10792846ff81f6b26c4e7d (diff)
flake.nix: linearize meson builds
parallel meson builds need too much ram. linearize them for now, and hopefully we can remove the make build system and this hack soonish. Change-Id: I42c092db8b0c63680e77da2263cdfe9e7f6575be
Diffstat (limited to 'flake.nix')
-rw-r--r--flake.nix17
1 files changed, 12 insertions, 5 deletions
diff --git a/flake.nix b/flake.nix
index 5ab36408b..21d6de9e8 100644
--- a/flake.nix
+++ b/flake.nix
@@ -205,13 +205,20 @@
build = forAllSystems (system: self.packages.${system}.nix);
# FIXME(Qyriad): remove this when the migration to Meson has been completed.
- mesonBuild = forAllSystems (system: self.packages.${system}.nix.override {
- buildWithMeson = true;
- });
+ # NOTE: mesonBuildClang depends on mesonBuild depends on build to avoid OOMs
+ # on aarch64 builders caused by too many parallel compiler/linker processes.
+ mesonBuild = forAllSystems (system:
+ (self.packages.${system}.nix.override {
+ buildWithMeson = true;
+ }).overrideAttrs (prev: {
+ buildInputs = prev.buildInputs ++ [ self.packages.${system}.nix ];
+ }));
mesonBuildClang = forAllSystems (system:
- nixpkgsFor.${system}.stdenvs.clangStdenvPackages.nix.override {
+ (nixpkgsFor.${system}.stdenvs.clangStdenvPackages.nix.override {
buildWithMeson = true;
- }
+ }).overrideAttrs (prev: {
+ buildInputs = prev.buildInputs ++ [ self.hydraJobs.mesonBuild.${system} ];
+ })
);
# Perl bindings for various platforms.