playerctl: lift patch to only the place its needed

This commit is contained in:
2024-10-02 14:27:17 +00:00
parent 8f5835b814
commit 47e093fc06
2 changed files with 16 additions and 14 deletions

View File

@@ -11,6 +11,21 @@ let
type = lib.types.bool;
inherit default description;
};
playerctl = pkgs.playerctl.overrideAttrs (upstream: {
patches = (upstream.patches or []) ++ [
(pkgs.fetchpatch {
# playerctl, when used as a library, doesn't expect its user to `unref` it inside a glib signal.
# nwg-panel does this though, and then segfaults.
# playerctl project looks dead as of 2024/06/19, no hope for upstreaming this.
# - <https://github.com/altdesktop/playerctl/>
# TODO: consider removing this if nwg-panel code is changed to not trigger this.
# - <https://github.com/nwg-piotr/nwg-panel/issues/233>
name = "dbus_name_owner_changed_callback: acquire a ref on the manager before using it";
url = "https://git.uninsane.org/colin/playerctl/commit/bbcbbe4e03da93523b431ffee5b64e10b17b4f9f.patch";
hash = "sha256-l/w+ozga8blAB2wtEd1SPBE6wpHNXWk7NrOL7x10oUI=";
})
];
});
in
{
sane.programs.torch-toggle = {
@@ -92,6 +107,7 @@ in
};
packageUnwrapped = (pkgs.nwg-panel.override {
inherit playerctl;
# XXX(2024/06/13): hyprland does not cross compile
hyprland = null;
# XXX(2024/06/13): wlr-randr does not cross compile

View File

@@ -180,20 +180,6 @@ let
# ibus = callPackage ./patched/ibus { inherit (unpatched) ibus; };
# modemmanager = callPackage ./patched/modemmanager { inherit (unpatched) modemmanager; };
# passt = import ./patched/passt { inherit (unpatched) passt; };
playerctl = unpatched.playerctl.overrideAttrs (upstream: {
patches = (upstream.patches or []) ++ [
(fetchpatch {
# playerctl, when used as a library, doesn't expect its user to `unref` it inside a glib signal.
# nwg-panel does this though, and then segfaults.
# playerctl project looks dead as of 2024/06/19, no hope for upstreaming this.
# TODO: consider removing this if nwg-panel code is changed to not trigger this.
# - <https://github.com/nwg-piotr/nwg-panel/issues/233>
name = "dbus_name_owner_changed_callback: acquire a ref on the manager before using it";
url = "https://git.uninsane.org/colin/playerctl/commit/bbcbbe4e03da93523b431ffee5b64e10b17b4f9f.patch";
hash = "sha256-l/w+ozga8blAB2wtEd1SPBE6wpHNXWk7NrOL7x10oUI=";
})
];
});
};
sane-overlay = {
sane = lib.recurseIntoAttrs (sane-additional // sane-patched);