aboutsummaryrefslogtreecommitdiff
path: root/flake.nix
diff options
context:
space:
mode:
authorQyriad <qyriad@qyriad.me>2024-03-21 13:41:23 -0600
committerQyriad <qyriad@qyriad.me>2024-03-22 08:36:50 -0600
commitb4d07656ff2c43b1144eb97658b9528dd39418ce (patch)
treed6aeb04613749884ca328f41bdbab16a4585e17f /flake.nix
parenta7161b6c0f6f9640acc065f0bd18579babacb0cf (diff)
build: optionally build and install with meson
This commit adds several meson.build, which successfully build and install Lix executables, libraries, and headers. Meson does not yet build docs, Perl bindings, or run tests, which will be added in following commits. As such, this commit does not remove the existing build system, or make it the default, and also as such, this commit has several FIXMEs and TODOs as notes for what should be done before the existing autoconf + make buildsystem can be removed and Meson made the default. This commit does not modify any source files. A Meson-enabled build is also added as a Hydra job, and to `nix flake check`. Change-Id: I667c8685b13b7bab91e281053f807a11616ae3d4
Diffstat (limited to 'flake.nix')
-rw-r--r--flake.nix20
1 files changed, 19 insertions, 1 deletions
diff --git a/flake.nix b/flake.nix
index cd5727415..5ab36408b 100644
--- a/flake.nix
+++ b/flake.nix
@@ -204,6 +204,16 @@
# Binary package for various platforms.
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;
+ });
+ mesonBuildClang = forAllSystems (system:
+ nixpkgsFor.${system}.stdenvs.clangStdenvPackages.nix.override {
+ buildWithMeson = true;
+ }
+ );
+
# Perl bindings for various platforms.
perlBindings = forAllSystems (system: nixpkgsFor.${system}.native.nix.perl-bindings);
@@ -262,6 +272,9 @@
};
checks = forAllSystems (system: {
+ # FIXME(Qyriad): remove this when the migration to Meson has been completed.
+ mesonBuild = self.hydraJobs.mesonBuild.${system};
+ mesonBuildClang = self.hydraJobs.mesonBuildClang.${system};
binaryTarball = self.hydraJobs.binaryTarball.${system};
perlBindings = self.hydraJobs.perlBindings.${system};
nixpkgsLibTests = self.hydraJobs.tests.nixpkgsLibTests.${system};
@@ -328,7 +341,12 @@
# for some reason that seems accidental and was changed in
# NixOS 24.05-pre, clang-tools is pinned to LLVM 14 when
# default LLVM is newer.
- (pkgs.buildPackages.clang-tools.override { inherit (pkgs.buildPackages) llvmPackages; });
+ (pkgs.buildPackages.clang-tools.override { inherit (pkgs.buildPackages) llvmPackages; })
+ ++ [
+ # FIXME(Qyriad): remove once the migration to Meson is complete.
+ pkgs.buildPackages.meson
+ pkgs.buildPackages.ninja
+ ];
src = null;