summaryrefslogtreecommitdiffstats
path: root/src/detection/packages/packages_haiku.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/detection/packages/packages_haiku.c')
-rw-r--r--src/detection/packages/packages_haiku.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/detection/packages/packages_haiku.c b/src/detection/packages/packages_haiku.c
new file mode 100644
index 0000000..eee14cf
--- /dev/null
+++ b/src/detection/packages/packages_haiku.c
@@ -0,0 +1,12 @@
+#include "packages.h"
+
+#include "common/io.h"
+
+void ffDetectPackagesImpl(FFPackagesResult* result, FFPackagesOptions* options) {
+ // TODO: Use the Package Kit C++ API instead (would account for disabled packages)
+
+ if (FF_PACKAGES_IS_ENABLED(options, HPKG)) {
+ result->hpkgSystem = ffPackagesGetNumElements(FASTFETCH_TARGET_DIR_ROOT "/system/packages", false);
+ result->hpkgUser = ffPackagesGetNumElements(FASTFETCH_TARGET_DIR_ROOT "/boot/home/config/packages", false);
+ }
+}