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:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user