From 91c4f54a6d8a84aa302ba7d20deefd74e9b96074 Mon Sep 17 00:00:00 2001 From: Rebecca Turner Date: Fri, 29 Mar 2024 19:48:24 -0700 Subject: [PATCH] Add a `justfile` to make `meson` friendly :) Change-Id: Id6e4528392266c6f2444e030b67293abe297ed17 --- flake.nix | 4 +++- justfile | 19 +++++++++++++++++++ 2 files changed, 22 insertions(+), 1 deletion(-) create mode 100644 justfile diff --git a/flake.nix b/flake.nix index 8c967aaa2..3a4d355ed 100644 --- a/flake.nix +++ b/flake.nix @@ -346,7 +346,9 @@ officialRelease = false; }).overrideAttrs (prev: { # Required for clang-tidy checks - buildInputs = prev.buildInputs ++ lib.optionals (stdenv.cc.isClang) [ pkgs.llvmPackages.llvm pkgs.llvmPackages.clang-unwrapped.dev ]; + buildInputs = prev.buildInputs + ++ [pkgs.just] + ++ lib.optionals (stdenv.cc.isClang) [ pkgs.llvmPackages.llvm pkgs.llvmPackages.clang-unwrapped.dev ]; nativeBuildInputs = prev.nativeBuildInputs ++ lib.optional (stdenv.cc.isClang && !stdenv.buildPlatform.isDarwin) pkgs.buildPackages.bear # Required for clang-tidy checks diff --git a/justfile b/justfile new file mode 100644 index 000000000..8c81867f0 --- /dev/null +++ b/justfile @@ -0,0 +1,19 @@ +# https://just.systems/man/en/ + +clean: + rm -rf build + +setup: + meson setup build --prefix="$PWD/outputs/out" + +build: + meson compile -C build + +compile: + just build + +install: + meson install -C build + +test *OPTIONS: + meson test -C build --print-errorlogs --quiet {{ OPTIONS }}