diff options
author | Alyssa Ross <hi@alyssa.is> | 2022-03-15 10:36:38 +0000 |
---|---|---|
committer | Alyssa Ross <hi@alyssa.is> | 2022-03-16 11:37:19 +0000 |
commit | d435710923ac6e6f9fc155534800745004f2ce93 (patch) | |
tree | 386f9401476f96bdc6ec25173a090198942b5d5b /nixpkgs/pkgs/development/libraries/appstream | |
parent | c725f0011e91ae49d351b981690eb66b862b6104 (diff) | |
parent | 3239fd2b8f728106491154b44625662e10259af2 (diff) | |
download | nixlib-d435710923ac6e6f9fc155534800745004f2ce93.tar nixlib-d435710923ac6e6f9fc155534800745004f2ce93.tar.gz nixlib-d435710923ac6e6f9fc155534800745004f2ce93.tar.bz2 nixlib-d435710923ac6e6f9fc155534800745004f2ce93.tar.lz nixlib-d435710923ac6e6f9fc155534800745004f2ce93.tar.xz nixlib-d435710923ac6e6f9fc155534800745004f2ce93.tar.zst nixlib-d435710923ac6e6f9fc155534800745004f2ce93.zip |
Merge commit '3239fd2b8f728106491154b44625662e10259af2'
Conflicts: nixpkgs/pkgs/applications/window-managers/sway/default.nix
Diffstat (limited to 'nixpkgs/pkgs/development/libraries/appstream')
5 files changed, 118 insertions, 16 deletions
diff --git a/nixpkgs/pkgs/development/libraries/appstream/default.nix b/nixpkgs/pkgs/development/libraries/appstream/default.nix index c39ea78a7757..9b07697a6a9a 100644 --- a/nixpkgs/pkgs/development/libraries/appstream/default.nix +++ b/nixpkgs/pkgs/development/libraries/appstream/default.nix @@ -14,27 +14,31 @@ , glib , xapian , libxml2 +, libxmlb , libyaml , gobject-introspection , pcre , itstool , gperf , vala -, lmdb , curl +, nixosTests }: stdenv.mkDerivation rec { pname = "appstream"; - version = "0.14.4"; + version = "0.15.2"; + # When bumping this package, please also check whether + # fix-build-for-qt-olderthan-514.patch still applies by + # building libsForQt512.appstream-qt. - outputs = [ "out" "dev" ]; + outputs = [ "out" "dev" "installedTests" ]; src = fetchFromGitHub { owner = "ximion"; repo = "appstream"; rev = "v${version}"; - sha256 = "sha256-DJXCw50f+8c58bJw6xx0ECfkc9/KcWaeA+ne2zmTyhg="; + sha256 = "sha256-/JZ49wjtcInbGUOVVjevVSrLCHcA60FMT165rhfb78Q="; }; patches = [ @@ -43,6 +47,9 @@ stdenv.mkDerivation rec { src = ./fix-paths.patch; libstemmer_includedir = "${lib.getDev libstemmer}/include"; }) + + # Allow installing installed tests to a separate output. + ./installed-tests-path.patch ]; nativeBuildInputs = [ @@ -65,9 +72,9 @@ stdenv.mkDerivation rec { glib xapian libxml2 + libxmlb libyaml gperf - lmdb curl ]; @@ -75,8 +82,15 @@ stdenv.mkDerivation rec { "-Dapidocs=false" "-Ddocs=false" "-Dvapi=true" + "-Dinstalled_test_prefix=${placeholder "installedTests"}" ]; + passthru = { + tests = { + installed-tests = nixosTests.installed-tests.appstream; + }; + }; + meta = with lib; { description = "Software metadata handling library"; homepage = "https://www.freedesktop.org/wiki/Distributions/AppStream/"; @@ -88,5 +102,5 @@ stdenv.mkDerivation rec { ''; license = licenses.lgpl21Plus; platforms = platforms.unix; - }; + }; } diff --git a/nixpkgs/pkgs/development/libraries/appstream/fix-build-for-qt-olderthan-514.patch b/nixpkgs/pkgs/development/libraries/appstream/fix-build-for-qt-olderthan-514.patch new file mode 100644 index 000000000000..35db2bec914e --- /dev/null +++ b/nixpkgs/pkgs/development/libraries/appstream/fix-build-for-qt-olderthan-514.patch @@ -0,0 +1,43 @@ +diff --git a/qt/component.h b/qt/component.h +index 47abd1f3..74de943c 100644 +--- a/qt/component.h ++++ b/qt/component.h +@@ -90,7 +90,7 @@ class APPSTREAMQT_EXPORT Component { + UrlKindContact, + + // deprecated +- UrlTranslate [[deprecated]] = UrlKindTranslate, ++ UrlTranslate = UrlKindTranslate, + }; + Q_ENUM(UrlKind) + +diff --git a/qt/pool.h b/qt/pool.h +index b59829b7..5237f613 100644 +--- a/qt/pool.h ++++ b/qt/pool.h +@@ -70,9 +70,9 @@ public: + FlagMonitor = 1 << 7, + + // deprecated +- FlagReadCollection [[deprecated]] = FlagLoadOsCollection, +- FlagReadMetainfo [[deprecated]] = FlagLoadOsMetainfo, +- FlagReadDesktopFiles [[deprecated]] = FlagLoadOsDesktopFiles, ++ FlagReadCollection = FlagLoadOsCollection, ++ FlagReadMetainfo = FlagLoadOsMetainfo, ++ FlagReadDesktopFiles = FlagLoadOsDesktopFiles, + }; + + /** +@@ -84,9 +84,9 @@ public: + * Flags on how caching should be used. + **/ + enum CacheFlags { +- CacheFlagNone [[deprecated]] = 0, +- CacheFlagUseUser [[deprecated]] = 1 << 0, +- CacheFlagUseSystem [[deprecated]] = 1 << 1, ++ CacheFlagNone = 0, ++ CacheFlagUseUser = 1 << 0, ++ CacheFlagUseSystem = 1 << 1, + }; + + /** diff --git a/nixpkgs/pkgs/development/libraries/appstream/fix-paths.patch b/nixpkgs/pkgs/development/libraries/appstream/fix-paths.patch index 0da72a78cbcf..2f1249daef41 100644 --- a/nixpkgs/pkgs/development/libraries/appstream/fix-paths.patch +++ b/nixpkgs/pkgs/development/libraries/appstream/fix-paths.patch @@ -1,18 +1,21 @@ diff --git a/data/meson.build b/data/meson.build -index 1eb3dfb0..623b66ec 100644 +index 53f31cb4..90f40e77 100644 --- a/data/meson.build +++ b/data/meson.build -@@ -26,4 +26,4 @@ i18n.merge_file ( +@@ -68,7 +68,7 @@ test('as-validate_metainfo.cli', ) - install_data ('appstream.conf', -- install_dir: get_option('sysconfdir')) -+ install_dir: get_option('prefix') / 'etc') + install_data('appstream.conf', +- install_dir: get_option('sysconfdir')) ++ install_dir: get_option('prefix') / 'etc') + + if get_option('compose') + ascompose_metainfo = 'org.freedesktop.appstream.compose.metainfo.xml' diff --git a/meson.build b/meson.build -index dc1fb1a5..5ee03b73 100644 +index 2efe86b7..9dc79e28 100644 --- a/meson.build +++ b/meson.build -@@ -108,12 +108,12 @@ if get_option ('gir') +@@ -107,12 +107,12 @@ if get_option ('gir') dependency('gobject-introspection-1.0', version: '>=1.56') endif diff --git a/nixpkgs/pkgs/development/libraries/appstream/installed-tests-path.patch b/nixpkgs/pkgs/development/libraries/appstream/installed-tests-path.patch new file mode 100644 index 000000000000..188c1e525890 --- /dev/null +++ b/nixpkgs/pkgs/development/libraries/appstream/installed-tests-path.patch @@ -0,0 +1,27 @@ +diff --git a/meson_options.txt b/meson_options.txt +index 8dd8e0c7..e2a30b06 100644 +--- a/meson_options.txt ++++ b/meson_options.txt +@@ -44,6 +44,11 @@ option('install-docs', + value : true, + description : 'Install documentation for API and specification' + ) ++option('installed_test_prefix', ++ type : 'string', ++ value : '', ++ description : 'Prefix for installed tests' ++) + + # + # For development +diff --git a/tests/installed-tests/meson.build b/tests/installed-tests/meson.build +index 405820ce..f592a753 100644 +--- a/tests/installed-tests/meson.build ++++ b/tests/installed-tests/meson.build +@@ -10,5 +10,5 @@ configure_file( + output : 'metainfo-validate.test', + configuration : itconf, + install: true, +- install_dir: join_paths('share', 'installed-tests', 'appstream'), ++ install_dir: join_paths(get_option('installed_test_prefix'), 'share', 'installed-tests', 'appstream'), + ) diff --git a/nixpkgs/pkgs/development/libraries/appstream/qt.nix b/nixpkgs/pkgs/development/libraries/appstream/qt.nix index 0bcb4741ff12..3704332119e2 100644 --- a/nixpkgs/pkgs/development/libraries/appstream/qt.nix +++ b/nixpkgs/pkgs/development/libraries/appstream/qt.nix @@ -1,12 +1,12 @@ -{ mkDerivation, appstream, qtbase, qttools }: +{ 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" ]; + outputs = [ "out" "dev" "installedTests" ]; buildInputs = appstream.buildInputs ++ [ appstream qtbase ]; @@ -14,11 +14,26 @@ 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@" ''; + passthru = appstream.passthru // { + tests = { + installed-tests = nixosTests.installed-tests.appstream-qt; + }; + }; + meta = appstream.meta // { description = "Software metadata handling library - Qt"; }; |