2024-01-13 08:15:51 +00:00
|
|
|
{ lib, stdenv, appstream, qtbase, qttools, nixosTests }:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
# TODO: look into using the libraries from the regular appstream derivation as we keep duplicates here
|
|
|
|
|
2024-01-13 08:15:51 +00:00
|
|
|
let
|
|
|
|
qtSuffix = lib.optionalString (lib.versions.major qtbase.version == "5") "5";
|
|
|
|
in
|
|
|
|
stdenv.mkDerivation {
|
2020-04-24 23:36:52 +00:00
|
|
|
pname = "appstream-qt";
|
2022-03-10 19:12:11 +00:00
|
|
|
inherit (appstream) version src;
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2022-03-10 19:12:11 +00:00
|
|
|
outputs = [ "out" "dev" "installedTests" ];
|
2020-09-25 04:45:31 +00:00
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
buildInputs = appstream.buildInputs ++ [ appstream qtbase ];
|
|
|
|
|
|
|
|
nativeBuildInputs = appstream.nativeBuildInputs ++ [ qttools ];
|
|
|
|
|
2024-04-21 15:54:59 +00:00
|
|
|
mesonFlags = appstream.mesonFlags ++ [
|
|
|
|
(lib.mesonBool "qt" true)
|
|
|
|
(lib.mesonOption "qt-versions" (lib.versions.major qtbase.version))
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2023-03-24 00:07:29 +00:00
|
|
|
patches = appstream.patches;
|
2022-03-10 19:12:11 +00:00
|
|
|
|
2024-01-13 08:15:51 +00:00
|
|
|
dontWrapQtApps = true;
|
|
|
|
|
2020-09-25 04:45:31 +00:00
|
|
|
postFixup = ''
|
2024-01-13 08:15:51 +00:00
|
|
|
sed -i "$dev/lib/cmake/AppStreamQt${qtSuffix}/AppStreamQt${qtSuffix}Config.cmake" \
|
2020-09-25 04:45:31 +00:00
|
|
|
-e "/INTERFACE_INCLUDE_DIRECTORIES/ s@\''${PACKAGE_PREFIX_DIR}@$dev@"
|
|
|
|
'';
|
|
|
|
|
2022-03-10 19:12:11 +00:00
|
|
|
passthru = appstream.passthru // {
|
|
|
|
tests = {
|
|
|
|
installed-tests = nixosTests.installed-tests.appstream-qt;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
meta = appstream.meta // {
|
|
|
|
description = "Software metadata handling library - Qt";
|
|
|
|
};
|
|
|
|
}
|