fix(overlay): patch font-manager 0.9.4 for gtk4 4.22 Vala errors
font-manager 0.9.4 fails to compile against gtk4 4.22: the Gtk.DragIcon.get_for_drag binding changed in the gtk4 vapi, producing 'use new operator' errors in Collections.vala and FontList.vala that broke home-manager-path for AZ-LT-NIX. Fix is upstream PR FontManager/font-manager#468, already carried by nixpkgs master but predating our locked nixpkgs-unstable. Vendor the patch as an overlay mod (from m3tam3re/nixos-config overlays/mods) and enable outputs.overlays.modifications in hosts/common. Thin clients are unaffected - they do not import hosts/common. Drop once the nixpkgs lock carries fix-compilation-error-with-newer-vala-versions.patch. Also resolve the evaluation warning on AZ-LT-NIX where programs.nh.clean.enable and nix.gc.automatic were both enabled: keep the nh clean timer (--keep 3 --keep-since 4d) and disable the plain nix-gc timer via mkForce on this host only.
This commit is contained in:
@@ -1,4 +1,8 @@
|
|||||||
{pkgs, ...}: {
|
{
|
||||||
|
lib,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}: {
|
||||||
programs.nix-ld.enable = true;
|
programs.nix-ld.enable = true;
|
||||||
programs.nix-ld.libraries = with pkgs; [
|
programs.nix-ld.libraries = with pkgs; [
|
||||||
# Add any missing dynamic libraries for unpackaged programs
|
# Add any missing dynamic libraries for unpackaged programs
|
||||||
@@ -38,6 +42,10 @@
|
|||||||
clean.extraArgs = "--keep-since 4d --keep 3";
|
clean.extraArgs = "--keep-since 4d --keep 3";
|
||||||
flake = "/home/m3tam3re/p/nixos/nixos-config";
|
flake = "/home/m3tam3re/p/nixos/nixos-config";
|
||||||
};
|
};
|
||||||
|
# nh.clean and nix.gc.automatic conflict (NixOS assertion) — this host
|
||||||
|
# uses the nh clean timer above for generation/GC retention, so disable
|
||||||
|
# the plain nix-gc timer inherited from hosts/common.
|
||||||
|
nix.gc.automatic = lib.mkForce false;
|
||||||
services.netbird.enable = true;
|
services.netbird.enable = true;
|
||||||
environment.systemPackages = [pkgs.netbird-ui];
|
environment.systemPackages = [pkgs.netbird-ui];
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -31,7 +31,7 @@
|
|||||||
overlays = [
|
overlays = [
|
||||||
# Add overlays your own flake exports (from overlays and pkgs dir):
|
# Add overlays your own flake exports (from overlays and pkgs dir):
|
||||||
#outputs.overlays.additions
|
#outputs.overlays.additions
|
||||||
#outputs.overlays.modifications
|
outputs.overlays.modifications
|
||||||
outputs.overlays.stable-packages
|
outputs.overlays.stable-packages
|
||||||
# outputs.overlays.pinned-packages
|
# outputs.overlays.pinned-packages
|
||||||
|
|
||||||
|
|||||||
@@ -11,6 +11,7 @@
|
|||||||
# https://nixos.wiki/wiki/Overlays
|
# https://nixos.wiki/wiki/Overlays
|
||||||
modifications = final: prev: {
|
modifications = final: prev: {
|
||||||
# n8n = import ./mods/n8n.nix {inherit prev;};
|
# n8n = import ./mods/n8n.nix {inherit prev;};
|
||||||
|
font-manager = import ./mods/font-manager.nix {inherit prev;};
|
||||||
vivaldi = prev.vivaldi.override {
|
vivaldi = prev.vivaldi.override {
|
||||||
commandLineArgs = "--enable-features=UseOzonePlatform --ozone-platform=wayland";
|
commandLineArgs = "--enable-features=UseOzonePlatform --ozone-platform=wayland";
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -0,0 +1,20 @@
|
|||||||
|
# font-manager 0.9.4: fix compilation against gtk4 >= 4.22 / newer Vala.
|
||||||
|
#
|
||||||
|
# In GTK 4.22 the Gtk.DragIcon.get_for_drag binding changed in the gtk4
|
||||||
|
# vapi, turning `Gtk.DragIcon.get_for_drag(drag)` into a hard Vala error
|
||||||
|
# ("use `new' operator to create new objects") in Collections.vala and
|
||||||
|
# FontList.vala. 0.9.4 is the latest upstream release and even upstream
|
||||||
|
# master is unfixed; the fix lives in FontManager/font-manager#468 and is
|
||||||
|
# already carried as a patch by current nixpkgs master — but our locked
|
||||||
|
# nixpkgs-unstable predates it.
|
||||||
|
#
|
||||||
|
# Vendored from m3tam3re/nixos-config overlays/mods (2026-08-31).
|
||||||
|
# Drop this overlay (and the patch file) once our nixpkgs lock advances
|
||||||
|
# past nixpkgs@e2ad529-vendoring (pkgs/by-name/fo/font-manager carries
|
||||||
|
# fix-compilation-error-with-newer-vala-versions.patch).
|
||||||
|
{prev}:
|
||||||
|
prev.font-manager.overrideAttrs (old: {
|
||||||
|
patches =
|
||||||
|
(old.patches or [])
|
||||||
|
++ [./patches/font-manager-fix-compilation-error-with-newer-vala-versions.patch];
|
||||||
|
})
|
||||||
+37
@@ -0,0 +1,37 @@
|
|||||||
|
From e2ad529a88929bbc76906ac78260dacf4d8c8c6b Mon Sep 17 00:00:00 2001
|
||||||
|
From: Jan Baier <jan.baier@amagical.net>
|
||||||
|
Date: Fri, 1 May 2026 17:25:25 +0200
|
||||||
|
Subject: [PATCH] Fix compilation error with newer Vala versions
|
||||||
|
|
||||||
|
Fixes #467
|
||||||
|
---
|
||||||
|
src/font-manager/Collections.vala | 2 +-
|
||||||
|
src/font-manager/FontList.vala | 2 +-
|
||||||
|
2 files changed, 2 insertions(+), 2 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/src/font-manager/Collections.vala b/src/font-manager/Collections.vala
|
||||||
|
index 5e7f5cdb..43531e54 100644
|
||||||
|
--- a/src/font-manager/Collections.vala
|
||||||
|
+++ b/src/font-manager/Collections.vala
|
||||||
|
@@ -523,7 +523,7 @@ namespace FontManager {
|
||||||
|
var row = ((CollectionListRow) source.widget);
|
||||||
|
var drag_icon = new Gtk.Label(row.item_label.label);
|
||||||
|
drag_icon.add_css_class("FontManagerListRowDrag");
|
||||||
|
- var gtk_drag_icon = (Gtk.DragIcon) Gtk.DragIcon.get_for_drag(drag);
|
||||||
|
+ var gtk_drag_icon = new Gtk.DragIcon.get_for_drag(drag);
|
||||||
|
gtk_drag_icon.set_child(drag_icon);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
diff --git a/src/font-manager/FontList.vala b/src/font-manager/FontList.vala
|
||||||
|
index c8b170cb..9720dc2b 100644
|
||||||
|
--- a/src/font-manager/FontList.vala
|
||||||
|
+++ b/src/font-manager/FontList.vala
|
||||||
|
@@ -669,7 +669,7 @@ namespace FontManager {
|
||||||
|
widget_set_name(drag_count, "FontManagerListDragCount");
|
||||||
|
drag_icon.add_overlay(drag_count);
|
||||||
|
drag_count.set_label(selected_items.length.to_string());
|
||||||
|
- var gtk_drag_icon = (Gtk.DragIcon) Gtk.DragIcon.get_for_drag(drag);
|
||||||
|
+ var gtk_drag_icon = new Gtk.DragIcon.get_for_drag(drag);
|
||||||
|
gtk_drag_icon.set_child(drag_icon);
|
||||||
|
return;
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user