nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix
at 22.05 40 lines 1.3 kB view raw
1{ lib, mkDerivation, appstream, qtbase, qttools, nixosTests }: 2 3# TODO: look into using the libraries from the regular appstream derivation as we keep duplicates here 4 5mkDerivation { 6 pname = "appstream-qt"; 7 inherit (appstream) version src; 8 9 outputs = [ "out" "dev" "installedTests" ]; 10 11 buildInputs = appstream.buildInputs ++ [ appstream qtbase ]; 12 13 nativeBuildInputs = appstream.nativeBuildInputs ++ [ qttools ]; 14 15 mesonFlags = appstream.mesonFlags ++ [ "-Dqt=true" ]; 16 17 patches = (appstream.patches or []) ++ lib.optionals (lib.versionOlder qtbase.version "5.14") [ 18 # Fix darwin build for libsForQt5.appstream-qt 19 # Old Qt moc doesn't know about fancy C++14 features 20 # ../qt/component.h:93: Parse error at "UrlTranslate" 21 # Remove both this patch and related comment in default.nix 22 # once Qt 5.14 or later becomes default on darwin 23 ./fix-build-for-qt-olderthan-514.patch 24 ]; 25 26 postFixup = '' 27 sed -i "$dev/lib/cmake/AppStreamQt/AppStreamQtConfig.cmake" \ 28 -e "/INTERFACE_INCLUDE_DIRECTORIES/ s@\''${PACKAGE_PREFIX_DIR}@$dev@" 29 ''; 30 31 passthru = appstream.passthru // { 32 tests = { 33 installed-tests = nixosTests.installed-tests.appstream-qt; 34 }; 35 }; 36 37 meta = appstream.meta // { 38 description = "Software metadata handling library - Qt"; 39 }; 40}