Hi,
added the first overlay to my NixOS configuration. It applies a patch to mutter so that I have fractional scaling in GNOME (X11). The patch does only work for mutter v42.2.
How can I add to my config that mutter only in that version is used? How can I detect if mutter is updated in nixpkgs to e.g. 42.3 and adjust the patch?
Many thanks!
nixpkgs.overlays = [
(
# Patched version of mutter 44.2
# Elements of nixpkgs must be taken from final and prev.
final: prev: {
# Elements of pkgs.gnome must be taken from gfinal and gprev.
gnome = prev.gnome.overrideScope' (gfinal: gprev: {
mutter = gprev.mutter.overrideAttrs (oldAttrs: {
patches = (oldAttrs.patches or []) ++ [
(prev.fetchpatch {
url = "https://salsa.debian.org/gnome-team/mutter/-/raw/ubuntu/44.2-3ubuntu1/debian/patches/ubuntu/x11-Add-support-for-fractional-scaling-using-Randr.patch";
# Determining the hash: https://github.com/NixOS/nixpkgs/issues/191128#issuecomment-1246030431
hash = "sha256-GCtz87C1NgxenYE5nbxcIIxqNhutmdngscnlK10fRyQ=";
})
];
});
});
}
)
];