diff --git a/pkgs/development/libraries/appstream/default.nix b/pkgs/development/libraries/appstream/default.nix index d4d0e26adb08..011dd75151bf 100644 --- a/pkgs/development/libraries/appstream/default.nix +++ b/pkgs/development/libraries/appstream/default.nix @@ -1,7 +1,9 @@ { lib , stdenv +, buildPackages , replaceVars , fetchFromGitHub +, fetchpatch , meson , mesonEmulatorHook , appstream @@ -32,6 +34,9 @@ , systemd , nixosTests , testers +, withIntrospection ? + lib.meta.availableOn stdenv.hostPlatform gobject-introspection + && stdenv.hostPlatform.emulatorAvailable buildPackages , withSystemd ? lib.meta.availableOn stdenv.hostPlatform systemd }: @@ -56,6 +61,12 @@ stdenv.mkDerivation (finalAttrs: { # Allow installing installed tests to a separate output. ./installed-tests-path.patch + + (fetchpatch { + name = "static.patch"; + url = "https://github.com/ximion/appstream/commit/90675d8853188f65897d2453346cb0acd531b58f.patch"; + hash = "sha256-d3h5h7B/MP3Sun5YwYCqMHcw4PMMwg1YS/S9vsMzkQ4="; + }) ]; strictDeps = true; @@ -74,13 +85,16 @@ stdenv.mkDerivation (finalAttrs: { xmlto docbook-xsl-nons docbook_xml_dtd_45 - gobject-introspection + glib itstool - vala gperf ] ++ lib.optionals (!stdenv.buildPlatform.canExecute stdenv.hostPlatform) [ mesonEmulatorHook + ] ++ lib.optionals (!lib.systems.equals stdenv.buildPlatform stdenv.hostPlatform) [ appstream + ] ++ lib.optionals withIntrospection [ + gobject-introspection + vala ]; buildInputs = [ @@ -102,10 +116,12 @@ stdenv.mkDerivation (finalAttrs: { mesonFlags = [ "-Dapidocs=false" + "-Dc_args=-Wno-error=missing-include-dirs" "-Ddocs=false" "-Dvapi=true" "-Dinstalled_test_prefix=${placeholder "installedTests"}" "-Dcompose=true" + (lib.mesonBool "gir" withIntrospection) ] ++ lib.optionals (!withSystemd) [ "-Dsystemd=false" ];