22 , gobject-introspection
35 , withSystemd ? lib.meta.availableOn stdenv.hostPlatform systemd
38 stdenv.mkDerivation (finalAttrs: {
42 outputs = [ "out" "dev" "installedTests" ];
44 src = fetchFromGitHub {
47 rev = "v${finalAttrs.version}";
48 sha256 = "sha256-pniZq+rR9wW86QqfRw4WZiBo1F16aSAb1J2RjI4aqE0=";
54 src = ./fix-paths.patch;
55 libstemmer_includedir = "${lib.getDev libstemmer}/include";
58 # Allow installing installed tests to a separate output.
59 ./installed-tests-path.patch
82 ] ++ lib.optionals (!stdenv.buildPlatform.canExecute stdenv.hostPlatform) [
100 ] ++ lib.optionals withSystemd [
108 "-Dinstalled_test_prefix=${placeholder "installedTests"}"
110 ] ++ lib.optionals (!withSystemd) [
115 installed-tests = nixosTests.installed-tests.appstream;
116 pkg-config = testers.hasPkgConfigModules {
117 package = finalAttrs.finalPackage;
122 description = "Software metadata handling library";
124 AppStream is a cross-distro effort for building Software-Center applications
125 and enhancing metadata provided by software components. It provides
126 specifications for meta-information which is shipped by upstream projects and
127 can be consumed by other software.
129 homepage = "https://www.freedesktop.org/wiki/Distributions/AppStream/";
130 license = licenses.lgpl21Plus;
131 mainProgram = "appstreamcli";
132 platforms = platforms.unix;
133 pkgConfigModules = [ "appstream" ];