about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/libraries/appstream/qt.nix
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/development/libraries/appstream/qt.nix')
-rw-r--r--nixpkgs/pkgs/development/libraries/appstream/qt.nix25
1 files changed, 25 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/development/libraries/appstream/qt.nix b/nixpkgs/pkgs/development/libraries/appstream/qt.nix
new file mode 100644
index 000000000000..0bcb4741ff12
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/appstream/qt.nix
@@ -0,0 +1,25 @@
+{ mkDerivation, appstream, qtbase, qttools }:
+
+# TODO: look into using the libraries from the regular appstream derivation as we keep duplicates here
+
+mkDerivation {
+  pname = "appstream-qt";
+  inherit (appstream) version src patches;
+
+  outputs = [ "out" "dev" ];
+
+  buildInputs = appstream.buildInputs ++ [ appstream qtbase ];
+
+  nativeBuildInputs = appstream.nativeBuildInputs ++ [ qttools ];
+
+  mesonFlags = appstream.mesonFlags ++ [ "-Dqt=true" ];
+
+  postFixup = ''
+    sed -i "$dev/lib/cmake/AppStreamQt/AppStreamQtConfig.cmake" \
+      -e "/INTERFACE_INCLUDE_DIRECTORIES/ s@\''${PACKAGE_PREFIX_DIR}@$dev@"
+  '';
+
+  meta = appstream.meta // {
+    description = "Software metadata handling library - Qt";
+ };
+}