Commit 6ee69dd6 authored by Colin's avatar Colin
Browse files

libshumate: fix vapi file generation when cross compiling

cross-compiled `libshumate.dev` outputs were previously missing these
files:
- `$dev/share/vala/vapi/shumate-1.0.deps`
- `$dev/share/vala/vapi/shumate-1.0.vapi`

without these files, vala consumers of libshumate (such as
`pkgsCross.aarch64-multiplatform.pantheon.granite7`) fail to build.
parent 0ad7a9f5
Loading
Loading
Loading
Loading
+13 −0
Original line number Diff line number Diff line
@@ -2,6 +2,7 @@
  lib,
  stdenv,
  fetchurl,
  fetchpatch,
  gi-docgen,
  meson,
  ninja,
@@ -37,6 +38,16 @@ stdenv.mkDerivation (finalAttrs: {
    hash = "sha256-OYQ2jgJZhis4ENHdyG0trdbTcqKzI3bM9K/3wuSMbTA=";
  };

  patches = [
    (fetchpatch {
      # Required for cross-compiled libshumate to get $dev/share/vala/vapi/shumate-1.0.{deps,vapi}
      # https://gitlab.gnome.org/GNOME/libshumate/-/merge_requests/263
      url = "https://gitlab.gnome.org/GNOME/libshumate/-/commit/8a8a5013ed69f443b84500b4f745079025863a32.patch";
      name = "meson-use-find_program-instead-of-dependency-for-vapigen";
      hash = "sha256-nYLUMLcghnWU/hlCWOHMmFIUdDa7UkX4TP7C4ftZVJM=";
    })
  ];

  depsBuildBuild = [
    # required to find native gi-docgen when cross compiling
    pkg-config
@@ -89,6 +100,8 @@ stdenv.mkDerivation (finalAttrs: {
    moveToOutput share/doc/libshumate-1.0 "$devdoc"
  '';

  strictDeps = true;

  passthru = {
    updateScript = gnome.updateScript {
      packageName = "libshumate";