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
This commit is contained in:
Mitchell Skaggs
2025-08-16 08:46:11 -05:00
parent 91f0f77b1e
commit 8a9041308c
+17
View File
@@ -8,6 +8,7 @@
desktop-file-utils,
fetchFromGitea,
glib,
glycin-loaders,
gst_all_1,
gtk4,
hicolor-icon-theme,
@@ -84,6 +85,22 @@ stdenv.mkDerivation (finalAttrs: {
doCheck = stdenv.buildPlatform.canExecute stdenv.hostPlatform;
cargoCheckType = if (finalAttrs.mesonBuildType != "debug") then "release" else "debug";
# Workaround copied from https://github.com/NixOS/nixpkgs/blob/e39fe935fc7537bee0440935c12f5c847735a291/pkgs/by-name/lo/loupe/package.nix#L60-L74
preConfigure = ''
# Dirty approach to add patches after cargoSetupPostUnpackHook
# We should eventually use a cargo vendor patch hook instead
pushd ../$(stripHash $cargoDeps)/glycin-2.*
patch -p3 < ${glycin-loaders.passthru.glycinPathsPatch}
popd
'';
preFixup = ''
# Needed for the glycin crate to find loaders.
# https://gitlab.gnome.org/sophie-h/glycin/-/blob/0.1.beta.2/glycin/src/config.rs#L44
gappsWrapperArgs+=(
--prefix XDG_DATA_DIRS : "${glycin-loaders}/share"
)
'';
checkPhase = ''
runHook preCheck