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 8 desktop-file-utils, 9 9 fetchFromGitea, 10 10 glib, 11 + glycin-loaders, 11 12 gst_all_1, 12 13 gtk4, 13 14 hicolor-icon-theme, ··· 83 84 84 85 doCheck = stdenv.buildPlatform.canExecute stdenv.hostPlatform; 85 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 + ''; 86 103 87 104 checkPhase = '' 88 105 runHook preCheck