recordbox: add workaround for `glycin-loaders` to allow discovery by `glycin` Rust crate

Workaround taken from `loupe` here: https://github.com/NixOS/nixpkgs/blob/e39fe935fc7537bee0440935c12f5c847735a291/pkgs/by-name/lo/loupe/package.nix#L60-L74

May be related to: https://github.com/NixOS/nixpkgs/issues/364390 https://github.com/NixOS/nixpkgs/pull/364572

+17
+17
pkgs/by-name/re/recordbox/package.nix
··· 8 desktop-file-utils, 9 fetchFromGitea, 10 glib, 11 gst_all_1, 12 gtk4, 13 hicolor-icon-theme, ··· 83 84 doCheck = stdenv.buildPlatform.canExecute stdenv.hostPlatform; 85 cargoCheckType = if (finalAttrs.mesonBuildType != "debug") then "release" else "debug"; 86 87 checkPhase = '' 88 runHook preCheck
··· 8 desktop-file-utils, 9 fetchFromGitea, 10 glib, 11 + glycin-loaders, 12 gst_all_1, 13 gtk4, 14 hicolor-icon-theme, ··· 84 85 doCheck = stdenv.buildPlatform.canExecute stdenv.hostPlatform; 86 cargoCheckType = if (finalAttrs.mesonBuildType != "debug") then "release" else "debug"; 87 + 88 + # Workaround copied from https://github.com/NixOS/nixpkgs/blob/e39fe935fc7537bee0440935c12f5c847735a291/pkgs/by-name/lo/loupe/package.nix#L60-L74 89 + preConfigure = '' 90 + # Dirty approach to add patches after cargoSetupPostUnpackHook 91 + # We should eventually use a cargo vendor patch hook instead 92 + pushd ../$(stripHash $cargoDeps)/glycin-2.* 93 + patch -p3 < ${glycin-loaders.passthru.glycinPathsPatch} 94 + popd 95 + ''; 96 + preFixup = '' 97 + # Needed for the glycin crate to find loaders. 98 + # https://gitlab.gnome.org/sophie-h/glycin/-/blob/0.1.beta.2/glycin/src/config.rs#L44 99 + gappsWrapperArgs+=( 100 + --prefix XDG_DATA_DIRS : "${glycin-loaders}/share" 101 + ) 102 + ''; 103 104 checkPhase = '' 105 runHook preCheck