diff --git a/hyprctl/meson.build b/hyprctl/meson.build
index 455f57393..d6769b84a 100644
--- a/hyprctl/meson.build
+++ b/hyprctl/meson.build
@@ -3,6 +3,7 @@ executable(
   'main.cpp',
   dependencies: [
     dependency('hyprutils', version: '>= 0.1.1'),
+    dependency('re2', required: true)
   ],
   install: true,
 )
diff --git a/meson.build b/meson.build
index c46b199c9..d79a28459 100644
--- a/meson.build
+++ b/meson.build
@@ -59,6 +59,8 @@ endif
 backtrace_dep = cpp_compiler.find_library('execinfo', required: false)
 epoll_dep = dependency('epoll-shim', required: false) # timerfd on BSDs
 
+re2 = dependency('re2', required: true)
+
 # Handle options
 systemd_option = get_option('systemd')
 systemd = dependency('systemd', required: systemd_option)
diff --git a/nix/default.nix b/nix/default.nix
index aeb4a4bbd..50f0560f3 100644
--- a/nix/default.nix
+++ b/nix/default.nix
@@ -27,6 +27,7 @@
   mesa,
   pango,
   pciutils,
+  re2,
   systemd,
   tomlplusplus,
   udis86-hyprland,
@@ -128,6 +129,7 @@ in
           mesa
           pango
           pciutils
+          re2
           tomlplusplus
           udis86-hyprland
           wayland
diff --git a/src/meson.build b/src/meson.build
index 754cd55a7..2efc2213b 100644
--- a/src/meson.build
+++ b/src/meson.build
@@ -22,6 +22,7 @@ executable(
     dependency('egl'),
     dependency('xkbcommon'),
     dependency('libinput'),
+    dependency('re2'),
     xcb_dep,
     xcb_composite_dep,
     xcb_errors_dep,