From 4069d47036144ba67543554a1e2fc2d0fd35f37c Mon Sep 17 00:00:00 2001 From: Aleksana Date: Wed, 6 Nov 2024 13:12:53 +0800 Subject: [PATCH] fractal: fix image loading by applying glycin patch (#353845) --- .../instant-messengers/fractal/default.nix | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/pkgs/applications/networking/instant-messengers/fractal/default.nix b/pkgs/applications/networking/instant-messengers/fractal/default.nix index e61d1e297f60..ba81763a8e47 100644 --- a/pkgs/applications/networking/instant-messengers/fractal/default.nix +++ b/pkgs/applications/networking/instant-messengers/fractal/default.nix @@ -22,6 +22,7 @@ , sqlite , xdg-desktop-portal , libseccomp +, glycin-loaders }: stdenv.mkDerivation rec { @@ -44,6 +45,14 @@ stdenv.mkDerivation rec { }; }; + # Dirty approach to add patches after cargoSetupPostUnpackHook + # We should eventually use a cargo vendor patch hook instead + preConfigure = '' + pushd ../$(stripHash $cargoDeps)/glycin-2.* + patch -p3 < ${glycin-loaders.passthru.glycinPathsPatch} + popd + ''; + nativeBuildInputs = [ glib gtk4 @@ -77,6 +86,12 @@ stdenv.mkDerivation rec { gst-plugins-good ]); + preFixup = '' + gappsWrapperArgs+=( + --prefix XDG_DATA_DIRS : "${glycin-loaders}/share" + ) + ''; + passthru = { updateScript = nix-update-script { }; };