diff options
author | Bobby Rong <rjl931189261@126.com> | 2022-02-25 23:58:50 +0800 |
---|---|---|
committer | Bobby Rong <rjl931189261@126.com> | 2022-03-02 11:28:29 +0800 |
commit | 2bfd5cee8160576e0ceb92a55898aff3b696ae34 (patch) | |
tree | 927e340f0bd23d28bc1dcfbf6e4a0ce9aa519daa /pkgs/development/libraries/appstream/qt.nix | |
parent | b3d4c1d48f4bb8ac17ff5252707f960c0a06a07f (diff) | |
download | nixpkgs-2bfd5cee8160576e0ceb92a55898aff3b696ae34.tar nixpkgs-2bfd5cee8160576e0ceb92a55898aff3b696ae34.tar.gz nixpkgs-2bfd5cee8160576e0ceb92a55898aff3b696ae34.tar.bz2 nixpkgs-2bfd5cee8160576e0ceb92a55898aff3b696ae34.tar.lz nixpkgs-2bfd5cee8160576e0ceb92a55898aff3b696ae34.tar.xz nixpkgs-2bfd5cee8160576e0ceb92a55898aff3b696ae34.tar.zst nixpkgs-2bfd5cee8160576e0ceb92a55898aff3b696ae34.zip |
libsForQt5.appstream-qt: fix darwin build
Diffstat (limited to 'pkgs/development/libraries/appstream/qt.nix')
-rw-r--r-- | pkgs/development/libraries/appstream/qt.nix | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/pkgs/development/libraries/appstream/qt.nix b/pkgs/development/libraries/appstream/qt.nix index 6a673a0a264..3704332119e 100644 --- a/pkgs/development/libraries/appstream/qt.nix +++ b/pkgs/development/libraries/appstream/qt.nix @@ -1,10 +1,10 @@ -{ mkDerivation, appstream, qtbase, qttools, nixosTests }: +{ lib, mkDerivation, appstream, qtbase, qttools, nixosTests }: # 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; + inherit (appstream) version src; outputs = [ "out" "dev" "installedTests" ]; @@ -14,6 +14,15 @@ mkDerivation { mesonFlags = appstream.mesonFlags ++ [ "-Dqt=true" ]; + patches = (appstream.patches or []) ++ lib.optionals (lib.versionOlder qtbase.version "5.14") [ + # Fix darwin build for libsForQt5.appstream-qt + # Old Qt moc doesn't know about fancy C++14 features + # ../qt/component.h:93: Parse error at "UrlTranslate" + # Remove both this patch and related comment in default.nix + # once Qt 5.14 or later becomes default on darwin + ./fix-build-for-qt-olderthan-514.patch + ]; + postFixup = '' sed -i "$dev/lib/cmake/AppStreamQt/AppStreamQtConfig.cmake" \ -e "/INTERFACE_INCLUDE_DIRECTORIES/ s@\''${PACKAGE_PREFIX_DIR}@$dev@" |