Unverified Commit cbce7e40 authored by Jan Tojnar's avatar Jan Tojnar Committed by GitHub
Browse files

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

parents 3637ee0e e51f3054
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -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
  '';

+0 −14
Original line number Diff line number Diff line
@@ -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; {
+11 −0
Original line number Diff line number Diff line
@@ -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"
+2 −1
Original line number Diff line number Diff line
@@ -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
  '';

Loading