Unverified Commit 5f70a5cb authored by Bobby Rong's avatar Bobby Rong Committed by GitHub
Browse files

Merge pull request #273297 from bobby285271/upd/appstream

appstream: 0.15.5 → 1.0.1
parents f85e45da fbdd55d9
Loading
Loading
Loading
Loading
+12 −0
Original line number Diff line number Diff line
{ lib
, stdenv
, fetchurl
, fetchpatch
, substituteAll
, pkg-config
, meson
@@ -57,6 +58,17 @@ stdenv.mkDerivation rec {
      src = ./fix-paths.patch;
      inherit isocodes;
    })

    # Add support for AppStream 1.0.
    # https://gitlab.gnome.org/GNOME/gnome-software/-/issues/2393
    (fetchpatch {
      url = "https://gitlab.gnome.org/GNOME/gnome-software/-/commit/0655f358ed0e8455e12d9634f60bc4dbaee434e3.patch";
      hash = "sha256-8IXXUfNeha5yRlRLuxQV8whwQmyNw7Aoi/r5NNFS/zA=";
    })
    (fetchpatch {
      url = "https://gitlab.gnome.org/GNOME/gnome-software/-/commit/e431ab003f3fabf616b6eb7dc93f8967bc9473e5.patch";
      hash = "sha256-Y5GcC1XMbb9Bl2/VKFnrV1B/ipLKxY4guse25LhxhKM=";
    })
  ];

  nativeBuildInputs = [
+8 −2
Original line number Diff line number Diff line
@@ -23,12 +23,14 @@
, gperf
, vala
, curl
, systemd
, nixosTests
, withSystemd ? lib.meta.availableOn stdenv.hostPlatform systemd
}:

stdenv.mkDerivation rec {
  pname = "appstream";
  version = "0.15.5";
  version = "1.0.1";

  outputs = [ "out" "dev" "installedTests" ];

@@ -36,7 +38,7 @@ stdenv.mkDerivation rec {
    owner = "ximion";
    repo = "appstream";
    rev = "v${version}";
    sha256 = "sha256-KVZCtu1w5FMgXZMiSW55rbrI6W/A9zWWKKvACtk/jjk=";
    sha256 = "sha256-ULqRHepWVuAluXsXJUoqxqJfrN168MGlwdVkoLLwSN0=";
  };

  patches = [
@@ -82,6 +84,8 @@ stdenv.mkDerivation rec {
    libxmlb
    libyaml
    curl
  ] ++ lib.optionals withSystemd [
    systemd
  ];

  mesonFlags = [
@@ -89,6 +93,8 @@ stdenv.mkDerivation rec {
    "-Ddocs=false"
    "-Dvapi=true"
    "-Dinstalled_test_prefix=${placeholder "installedTests"}"
  ] ++ lib.optionals (!withSystemd) [
    "-Dsystemd=false"
  ];

  passthru = {
+5 −20
Original line number Diff line number Diff line
diff --git a/data/meson.build b/data/meson.build
index 53f31cb4..90f40e77 100644
--- a/data/meson.build
+++ b/data/meson.build
@@ -68,7 +68,7 @@ test('as-validate_metainfo.cli',
 )
 
 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 2efe86b7..9dc79e28 100644
index 5e7f57d5..3fe89e8c 100644
--- a/meson.build
+++ b/meson.build
@@ -107,12 +107,12 @@ if get_option ('gir')
     dependency('gobject-introspection-1.0', version: '>=1.56')
 endif
 
-stemmer_inc_dirs = include_directories(['/usr/include'])
+stemmer_inc_dirs = include_directories(['@libstemmer_includedir@'])
@@ -171,10 +171,10 @@ endif
 stemmer_inc_dirs = include_directories()
 if get_option('stemming')
     stemmer_lib = cc.find_library('stemmer', required: true)
-    stemmer_inc_dirs = include_directories(['/usr/include'])
+    stemmer_inc_dirs = include_directories(['@libstemmer_includedir@'])
     if not cc.has_header('libstemmer.h')
         if cc.has_header('libstemmer/libstemmer.h')
-            stemmer_inc_dirs = include_directories('/usr/include/libstemmer')
+9 −4
Original line number Diff line number Diff line
{ mkDerivation, appstream, qtbase, qttools, nixosTests }:
{ lib, stdenv, appstream, qtbase, qttools, nixosTests }:

# TODO: look into using the libraries from the regular appstream derivation as we keep duplicates here

mkDerivation {
let
  qtSuffix = lib.optionalString (lib.versions.major qtbase.version == "5") "5";
in
stdenv.mkDerivation {
  pname = "appstream-qt";
  inherit (appstream) version src;

@@ -12,12 +15,14 @@ mkDerivation {

  nativeBuildInputs = appstream.nativeBuildInputs ++ [ qttools ];

  mesonFlags = appstream.mesonFlags ++ [ "-Dqt=true" ];
  mesonFlags = appstream.mesonFlags ++ [ "-Dqt${qtSuffix}=true" ];

  patches = appstream.patches;

  dontWrapQtApps = true;

  postFixup = ''
    sed -i "$dev/lib/cmake/AppStreamQt/AppStreamQtConfig.cmake" \
    sed -i "$dev/lib/cmake/AppStreamQt${qtSuffix}/AppStreamQt${qtSuffix}Config.cmake" \
      -e "/INTERFACE_INCLUDE_DIRECTORIES/ s@\''${PACKAGE_PREFIX_DIR}@$dev@"
  '';