diff options
author | Alyssa Ross <hi@alyssa.is> | 2024-01-07 14:58:29 +0100 |
---|---|---|
committer | Alyssa Ross <hi@alyssa.is> | 2024-01-07 14:58:29 +0100 |
commit | ad899504860973e98351c922ecb934595f2c0f19 (patch) | |
tree | b1260cc90947e834af941c6cb6aed51dc68f50b5 /nixpkgs/pkgs/development/libraries/appstream | |
parent | f34a1b70eb86e4a63cfb88ea460345bb1aed88e3 (diff) | |
parent | dc676e1b5014069a2b06e236242e2f0990384934 (diff) | |
download | nixlib-ad899504860973e98351c922ecb934595f2c0f19.tar nixlib-ad899504860973e98351c922ecb934595f2c0f19.tar.gz nixlib-ad899504860973e98351c922ecb934595f2c0f19.tar.bz2 nixlib-ad899504860973e98351c922ecb934595f2c0f19.tar.lz nixlib-ad899504860973e98351c922ecb934595f2c0f19.tar.xz nixlib-ad899504860973e98351c922ecb934595f2c0f19.tar.zst nixlib-ad899504860973e98351c922ecb934595f2c0f19.zip |
Merge branch 'nixos-unstable-small' of https://github.com/NixOS/nixpkgs
Diffstat (limited to 'nixpkgs/pkgs/development/libraries/appstream')
3 files changed, 22 insertions, 26 deletions
diff --git a/nixpkgs/pkgs/development/libraries/appstream/default.nix b/nixpkgs/pkgs/development/libraries/appstream/default.nix index 78ca9cfddbad..c5fb2036d324 100644 --- a/nixpkgs/pkgs/development/libraries/appstream/default.nix +++ b/nixpkgs/pkgs/development/libraries/appstream/default.nix @@ -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 = { diff --git a/nixpkgs/pkgs/development/libraries/appstream/fix-paths.patch b/nixpkgs/pkgs/development/libraries/appstream/fix-paths.patch index 2f1249daef41..8ad11abecada 100644 --- a/nixpkgs/pkgs/development/libraries/appstream/fix-paths.patch +++ b/nixpkgs/pkgs/development/libraries/appstream/fix-paths.patch @@ -1,28 +1,13 @@ -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') diff --git a/nixpkgs/pkgs/development/libraries/appstream/qt.nix b/nixpkgs/pkgs/development/libraries/appstream/qt.nix index bcc24376ff3e..492037d721ed 100644 --- a/nixpkgs/pkgs/development/libraries/appstream/qt.nix +++ b/nixpkgs/pkgs/development/libraries/appstream/qt.nix @@ -1,8 +1,11 @@ -{ 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@" ''; |