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
This commit is contained in:
eldritch horrors 2024-03-25 22:16:38 +01:00
parent 787c4397f1
commit c3a5f937d3

View file

@ -205,13 +205,20 @@
build = forAllSystems (system: self.packages.${system}.nix); build = forAllSystems (system: self.packages.${system}.nix);
# FIXME(Qyriad): remove this when the migration to Meson has been completed. # FIXME(Qyriad): remove this when the migration to Meson has been completed.
mesonBuild = forAllSystems (system: self.packages.${system}.nix.override { # NOTE: mesonBuildClang depends on mesonBuild depends on build to avoid OOMs
buildWithMeson = true; # 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: mesonBuildClang = forAllSystems (system:
nixpkgsFor.${system}.stdenvs.clangStdenvPackages.nix.override { (nixpkgsFor.${system}.stdenvs.clangStdenvPackages.nix.override {
buildWithMeson = true; buildWithMeson = true;
} }).overrideAttrs (prev: {
buildInputs = prev.buildInputs ++ [ self.hydraJobs.mesonBuild.${system} ];
})
); );
# Perl bindings for various platforms. # Perl bindings for various platforms.