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

View File

@@ -2,8 +2,6 @@
stdenv, stdenv,
lib, lib,
fetchurl, fetchurl,
replaceVars,
bubblewrap,
cairo, cairo,
cargo, cargo,
gettext, gettext,
@@ -32,14 +30,6 @@ stdenv.mkDerivation (finalAttrs: {
hash = "sha256-OAqv4r+07KDEW0JmDr/0SWANAKQ7YJ1bHIP3lfXI+zw="; 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"; cargoVendorDir = "vendor";
nativeBuildInputs = [ nativeBuildInputs = [
@@ -84,10 +74,6 @@ stdenv.mkDerivation (finalAttrs: {
attrPath = "glycin-loaders"; attrPath = "glycin-loaders";
packageName = "glycin"; packageName = "glycin";
}; };
glycinPathsPatch = replaceVars ./fix-glycin-paths.patch {
bwrap = "${bubblewrap}/bin/bwrap";
};
}; };
meta = with lib; { meta = with lib; {

View File

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

View File

@@ -15,6 +15,7 @@
libadwaita, libadwaita,
libgweather, libgweather,
libseccomp, libseccomp,
libglycin,
glycin-loaders, glycin-loaders,
gnome, gnome,
common-updater-scripts, common-updater-scripts,
@@ -67,7 +68,7 @@ stdenv.mkDerivation (finalAttrs: {
# Dirty approach to add patches after cargoSetupPostUnpackHook # Dirty approach to add patches after cargoSetupPostUnpackHook
# We should eventually use a cargo vendor patch hook instead # We should eventually use a cargo vendor patch hook instead
pushd ../$(stripHash $cargoDeps)/glycin-2.* pushd ../$(stripHash $cargoDeps)/glycin-2.*
patch -p3 < ${glycin-loaders.passthru.glycinPathsPatch} patch -p3 < ${libglycin.passthru.glycinPathsPatch}
popd popd
''; '';

View File

@@ -8,6 +8,7 @@
desktop-file-utils, desktop-file-utils,
fetchFromGitea, fetchFromGitea,
glib, glib,
libglycin,
glycin-loaders, glycin-loaders,
gst_all_1, gst_all_1,
gtk4, gtk4,
@@ -90,7 +91,7 @@ stdenv.mkDerivation (finalAttrs: {
# Dirty approach to add patches after cargoSetupPostUnpackHook # Dirty approach to add patches after cargoSetupPostUnpackHook
# We should eventually use a cargo vendor patch hook instead # We should eventually use a cargo vendor patch hook instead
pushd ../$(stripHash $cargoDeps)/glycin-2.* pushd ../$(stripHash $cargoDeps)/glycin-2.*
patch -p3 < ${glycin-loaders.passthru.glycinPathsPatch} patch -p3 < ${libglycin.passthru.glycinPathsPatch}
popd popd
''; '';
preFixup = '' preFixup = ''

View File

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