diff --git a/sys-boot/rpi-imager/files/1.7.3-move-DRIVELIST_FILTER_SYSTEM_DRIVES-to-cmake-arg.patch b/sys-boot/rpi-imager/files/1.7.3-move-DRIVELIST_FILTER_SYSTEM_DRIVES-to-cmake-arg.patch
new file mode 100644
index 0000000..d7e151b
--- /dev/null
+++ b/sys-boot/rpi-imager/files/1.7.3-move-DRIVELIST_FILTER_SYSTEM_DRIVES-to-cmake-arg.patch
@@ -0,0 +1,37 @@
+# Expose drivelist filtering as cmake variable
+
+--- a/src/CMakeLists.txt
++++ b/src/CMakeLists.txt
+@@ -134,6 +134,17 @@ else()
+ add_definitions(-DTELEMETRY_ENABLED_DEFAULT=false)
+ endif()
+
++if(DEFINED DRIVELIST_FILTER_SYSTEM_DRIVES)
++ if(DRIVELIST_FILTER_SYSTEM_DRIVES)
++ # Hide system drives from list
++ add_definitions(-DDRIVELIST_FILTER_SYSTEM_DRIVES=true)
++ else()
++ add_definitions(-DDRIVELIST_FILTER_SYSTEM_DRIVES=false)
++ endif()
++else()
++ add_definitions(-DDRIVELIST_FILTER_SYSTEM_DRIVES=true)
++endif()
++
+ if(ENABLE_CHECK_VERSION)
+ add_definitions(-DCHECK_VERSION_DEFAULT=true)
+ else()
+--- a/src/config.h
++++ b/src/config.h
+@@ -19,9 +19,6 @@
+ /* Hash algorithm for verifying (uncompressed image) checksum */
+ #define OSLIST_HASH_ALGORITHM QCryptographicHash::Sha256
+
+-/* Hide system drives from list */
+-#define DRIVELIST_FILTER_SYSTEM_DRIVES true
+-
+ /* Update progressbar every 0.1 second */
+ #define PROGRESS_UPDATE_INTERVAL 100
+
+--
+2.38.2
+
diff --git a/sys-boot/rpi-imager/metadata.xml b/sys-boot/rpi-imager/metadata.xml
index 242fa75..1499cdb 100644
--- a/sys-boot/rpi-imager/metadata.xml
+++ b/sys-boot/rpi-imager/metadata.xml
@@ -8,4 +8,8 @@
raspberrypi/rpi-imager
+
+
diff --git a/sys-boot/rpi-imager/rpi-imager-1.7.3.ebuild b/sys-boot/rpi-imager/rpi-imager-1.7.3.ebuild
index 279dd03..06665c7 100644
--- a/sys-boot/rpi-imager/rpi-imager-1.7.3.ebuild
+++ b/sys-boot/rpi-imager/rpi-imager-1.7.3.ebuild
@@ -42,10 +42,17 @@ DEPEND="
${RDEPEND}
"
+IUSE="+filter-drivelist"
+
+PATCHES=(
+ "${FILESDIR}/${PV}-move-DRIVELIST_FILTER_SYSTEM_DRIVES-to-cmake-arg.patch"
+)
+
src_configure() {
local mycmakeargs=(
-DENABLE_CHECK_VERSION=OFF
-DENABLE_TELEMETRY=OFF
+ -DDRIVELIST_FILTER_SYSTEM_DRIVES=$(usex filter-drivelist)
)
cmake_src_configure