{ lib, stdenv, pkgs, withDebug ? false, ... }: stdenv.mkDerivation { pname = "rtti"; version = "0.0.1"; src = ./..; nativeBuildInputs = with pkgs; [ meson ninja pkg-config which unity_test_with_color ]; build-system = [ pkgs.meson ]; dontStrip = withDebug; separateDebugInfo = withDebug; impureEnvVars = [ "HOME" ]; mesonFlags = [ (lib.optional withDebug "--buildtype=debug -Db_sanitize=address -Dwith_debug=true ") # (lib.optional (!with_debug) "-Dbuildtype=release") ]; }