lol

entangle: Fix build with glib 2.82

https://hydra.nixos.org/build/274565015/nixlog/1

`pcre` is no longer needed as the comment longer applies.

`glib-2.0.pc` now has `libsysprof-capture-4` in `Requires.private` field.
Normally, this does not matter since we patch our `pkg-config` to ignore that
outside of static builds but `entangle` was using `pkgconf`, which is not patched.

Let’s switch to standard `pkg-config`.
This will also allow us to clean some more dependencies.

Unfortunately, this also reveals issue with an underspecified `gio-unix-2.0` dependency so we need to fix that.

authored by

Jan Tojnar and committed by
Bobby Rong
acf8f35b 5cf66dcc

+55 -8
+48
pkgs/by-name/en/entangle/0001-build-Add-missing-gio-unix-2.0-dependency.patch
··· 1 + From 7f51ec77e1a35bbfb8ced3b7340818a72d859c0e Mon Sep 17 00:00:00 2001 2 + From: Jan Tojnar <jtojnar@gmail.com> 3 + Date: Mon, 14 Oct 2024 00:57:57 +0200 4 + Subject: [PATCH] build: Add missing gio-unix-2.0 dependency 5 + MIME-Version: 1.0 6 + Content-Type: text/plain; charset=UTF-8 7 + Content-Transfer-Encoding: 8bit 8 + 9 + On Nix, we try to isolate dependencies more than usual and have an alternative interpretation of pkg-config’s `Requires.private` field. 10 + In this environment, Entangle fails to build because it has implicit dependency on gio-unix: 11 + 12 + ../src/frontend/entangle-camera-manager.c:28:10: fatal error: gio/gunixoutputstream.h: No such file or directory 13 + 28 | #include <gio/gunixoutputstream.h> 14 + | ^~~~~~~~~~~~~~~~~~~~~~~~~ 15 + 16 + Let’s add it explicitly. 17 + --- 18 + meson.build | 1 + 19 + src/frontend/meson.build | 1 + 20 + 2 files changed, 2 insertions(+) 21 + 22 + diff --git a/meson.build b/meson.build 23 + index 1510962..90873ef 100644 24 + --- a/meson.build 25 + +++ b/meson.build 26 + @@ -33,6 +33,7 @@ add_global_arguments('-DGLIB_VERSION_MAX_ALLOWED=GLIB_VERSION_2_38', language : 27 + 28 + glib_dep = dependency('glib-2.0', version: glib_min_version) 29 + gio_dep = dependency('gio-2.0', version: glib_min_version) 30 + +gio_unix_dep = dependency('gio-unix-2.0', version: glib_min_version) 31 + gthread_dep = dependency('gthread-2.0', version: glib_min_version) 32 + gmodule_dep = dependency('gmodule-2.0', version: glib_min_version) 33 + gdk_pixbuf_dep = dependency('gdk-pixbuf-2.0', version: gdk_pixbuf_min_version) 34 + diff --git a/src/frontend/meson.build b/src/frontend/meson.build 35 + index 1ed9d75..81310c8 100644 36 + --- a/src/frontend/meson.build 37 + +++ b/src/frontend/meson.build 38 + @@ -90,6 +90,7 @@ entangle_frontend_sources += entangle_frontend_enum_sources 39 + entangle_frontend_deps = [ 40 + gthread_dep, 41 + gmodule_dep, 42 + + gio_unix_dep, 43 + gtk_dep, 44 + gst_dep, 45 + pango_dep, 46 + -- 47 + 2.46.0 48 +
+7 -8
pkgs/by-name/en/entangle/package.nix
··· 9 9 ninja, 10 10 perl, 11 11 python3, 12 - pkgconf, 12 + pkg-config, 13 13 wrapGAppsHook3, 14 14 at-spi2-core, 15 15 dbus, ··· 33 33 libunwind, 34 34 libxkbcommon, 35 35 orc, 36 - pcre, 37 - pcre2, 38 36 udev, 39 37 util-linux, 40 38 xorg, 41 39 zstd, 42 - cmake, 43 40 }: 44 41 45 42 stdenv.mkDerivation (finalAttrs: { ··· 60 57 url = "https://gitlab.com/entangle/entangle/-/commit/54795d275a93e94331a614c8712740fcedbdd4f0.patch"; 61 58 sha256 = "iEgqGjKa0xwSdctwvNdEV361l9nx+bz53xn3fuDgtzY="; 62 59 }) 60 + 61 + # Fix implicit dependency 62 + # https://github.com/NixOS/nixpkgs/issues/36468 63 + # https://gitlab.com/entangle/entangle/-/merge_requests/61 64 + ./0001-build-Add-missing-gio-unix-2.0-dependency.patch 63 65 ]; 64 66 65 67 nativeBuildInputs = [ ··· 70 72 ninja 71 73 perl # for pod2man and build scripts 72 74 python3 # for build scripts 73 - pkgconf 75 + pkg-config 74 76 wrapGAppsHook3 75 77 gobject-introspection 76 - cmake 77 78 ]; 78 79 79 80 buildInputs = ··· 100 101 libunwind 101 102 libxkbcommon 102 103 orc 103 - pcre # required by libselinux before we USE_PCRE2 104 - pcre2 # required by glib-2.0 105 104 udev 106 105 util-linux 107 106 zstd