libglycin: Move paths patch from glycin-loaders (#451025)

This commit is contained in:
Jan Tojnar
2025-10-18 09:02:27 +00:00
committed by GitHub
7 changed files with 19 additions and 18 deletions

View File

@@ -15,6 +15,7 @@
gtksourceview5,
lcms2,
libadwaita,
libglycin,
gst_all_1,
desktop-file-utils,
appstream-glib,
@@ -62,7 +63,7 @@ stdenv.mkDerivation (finalAttrs: {
# We should eventually use a cargo vendor patch hook instead
preConfigure = ''
pushd ../$(stripHash $cargoDeps)/glycin-2.*
patch -p3 < ${glycin-loaders.passthru.glycinPathsPatch}
patch -p3 < ${libglycin.passthru.glycinPathsPatch}
popd
'';

View File

@@ -2,8 +2,6 @@
stdenv,
lib,
fetchurl,
replaceVars,
bubblewrap,
cairo,
cargo,
gettext,
@@ -32,14 +30,6 @@ stdenv.mkDerivation (finalAttrs: {
hash = "sha256-OAqv4r+07KDEW0JmDr/0SWANAKQ7YJ1bHIP3lfXI+zw=";
};
patches = [
# Fix paths in glycin library.
# Not actually needed for this package since we are only building loaders
# and this patch is relevant just to apps that use the loaders
# but apply it here to ensure the patch continues to apply.
finalAttrs.passthru.glycinPathsPatch
];
cargoVendorDir = "vendor";
nativeBuildInputs = [
@@ -84,10 +74,6 @@ stdenv.mkDerivation (finalAttrs: {
attrPath = "glycin-loaders";
packageName = "glycin";
};
glycinPathsPatch = replaceVars ./fix-glycin-paths.patch {
bwrap = "${bubblewrap}/bin/bwrap";
};
};
meta = with lib; {

View File

@@ -15,6 +15,8 @@
gtk4,
gobject-introspection,
gnome,
replaceVars,
bubblewrap,
common-updater-scripts,
_experimental-update-script-combinators,
buildPackages,
@@ -72,6 +74,10 @@ stdenv.mkDerivation (finalAttrs: {
(lib.mesonBool "capi_docs" withIntrospection)
];
postPatch = ''
patch -p2 < ${finalAttrs.passthru.glycinPathsPatch}
'';
passthru = {
updateScript =
let
@@ -100,6 +106,10 @@ stdenv.mkDerivation (finalAttrs: {
updateSource
updateLockfile
];
glycinPathsPatch = replaceVars ./fix-glycin-paths.patch {
bwrap = "${bubblewrap}/bin/bwrap";
};
};
meta = {
@@ -111,6 +121,7 @@ stdenv.mkDerivation (finalAttrs: {
lgpl21Plus
];
maintainers = with lib.maintainers; [ normalcea ];
teams = [ lib.teams.gnome ];
platforms = lib.platforms.linux;
pkgConfigModules = [
"glycin-1"

View File

@@ -15,6 +15,7 @@
libadwaita,
libgweather,
libseccomp,
libglycin,
glycin-loaders,
gnome,
common-updater-scripts,
@@ -67,7 +68,7 @@ stdenv.mkDerivation (finalAttrs: {
# 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}
patch -p3 < ${libglycin.passthru.glycinPathsPatch}
popd
'';

View File

@@ -8,6 +8,7 @@
desktop-file-utils,
fetchFromGitea,
glib,
libglycin,
glycin-loaders,
gst_all_1,
gtk4,
@@ -90,7 +91,7 @@ stdenv.mkDerivation (finalAttrs: {
# 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}
patch -p3 < ${libglycin.passthru.glycinPathsPatch}
popd
'';
preFixup = ''

View File

@@ -2,6 +2,7 @@
stdenv,
lib,
fetchurl,
libglycin,
glycin-loaders,
cargo,
desktop-file-utils,
@@ -34,7 +35,7 @@ stdenv.mkDerivation (finalAttrs: {
patches = [
# Fix paths in glycin library
glycin-loaders.passthru.glycinPathsPatch
libglycin.passthru.glycinPathsPatch
];
cargoVendorDir = "vendor";