From 9385c4bcf390650ffd96b1b409a3295a883bd735 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20Sch=C3=BCtz?= Date: Sun, 31 May 2026 20:20:05 -0700 Subject: [PATCH] gtk-sharp-3_0: 2.99.3 -> 3.22.2 --- pkgs/by-name/gt/gtk-sharp-3_0/builder.sh | 9 ---- pkgs/by-name/gt/gtk-sharp-3_0/package.nix | 57 +++++++++++------------ 2 files changed, 28 insertions(+), 38 deletions(-) delete mode 100644 pkgs/by-name/gt/gtk-sharp-3_0/builder.sh diff --git a/pkgs/by-name/gt/gtk-sharp-3_0/builder.sh b/pkgs/by-name/gt/gtk-sharp-3_0/builder.sh deleted file mode 100644 index 946b65d98a58..000000000000 --- a/pkgs/by-name/gt/gtk-sharp-3_0/builder.sh +++ /dev/null @@ -1,9 +0,0 @@ -genericBuild - -# !!! hack -export ALL_INPUTS="$out $pkgs" - -find $out -name "*.dll.config" | while read configFile; do - echo "modifying config file $configFile" - $monoDLLFixer "$configFile" -done diff --git a/pkgs/by-name/gt/gtk-sharp-3_0/package.nix b/pkgs/by-name/gt/gtk-sharp-3_0/package.nix index 67d42d79625a..cfbd06065ff4 100644 --- a/pkgs/by-name/gt/gtk-sharp-3_0/package.nix +++ b/pkgs/by-name/gt/gtk-sharp-3_0/package.nix @@ -1,63 +1,62 @@ { lib, stdenv, - fetchurl, + fetchFromGitHub, fetchpatch, + meson, + ninja, pkg-config, mono, glib, pango, gtk3, - libxml2, - monoDLLFixer, }: stdenv.mkDerivation (finalAttrs: { pname = "gtk-sharp"; - version = "2.99.3"; + version = "3.22.2"; - builder = ./builder.sh; - src = fetchurl { - url = "mirror://gnome/sources/gtk-sharp/${lib.versions.majorMinor finalAttrs.version}/gtk-sharp-${finalAttrs.version}.tar.xz"; - sha256 = "18n3l9zcldyvn4lwi8izd62307mkhz873039nl6awrv285qzah34"; + src = fetchFromGitHub { + owner = "GLibSharp"; + repo = "GtkSharp"; + tag = finalAttrs.version; + hash = "sha256-I15XpW2NotOK1gExCNgJOHd6QVGW9mGkWfeHfJGdLwI="; }; - nativeBuildInputs = [ pkg-config ]; + nativeBuildInputs = [ + meson + ninja + pkg-config + ]; + + mesonFlags = [ + "-Dinstall=true" + ]; + buildInputs = [ mono glib pango gtk3 - libxml2 - ]; - - env.NIX_CFLAGS_COMPILE = "-Wno-error=implicit-function-declaration"; - - patches = [ - # Fixes MONO_PROFILE_ENTER_LEAVE undeclared when compiling against newer versions of mono. - # @see https://github.com/mono/gtk-sharp/pull/266 - (fetchpatch { - name = "MONO_PROFILE_ENTER_LEAVE.patch"; - url = "https://github.com/mono/gtk-sharp/commit/401df51bc461de93c1a78b6a7a0d5adc63cf186c.patch"; - sha256 = "0hrkcr5a7wkixnyp60v4d6j3arsb63h54rd30lc5ajfjb3p92kcf"; - }) - # @see https://github.com/mono/gtk-sharp/pull/263 - (fetchpatch { - name = "disambiguate_Gtk.Range.patch"; - url = "https://github.com/mono/gtk-sharp/commit/a00552ad68ae349e89e440dca21b86dbd6bccd30.patch"; - sha256 = "1ylplr9g9x7ybsgrydsgr6p3g7w6i46yng1hnl3afgn4vj45rag2"; - }) ]; dontStrip = true; - inherit monoDLLFixer; + patches = [ + (fetchpatch { + name = "fix-unknown-variable-gdk_api_includes.patch"; + url = "https://github.com/GLibSharp/GtkSharp/commit/a1ffef907e06303bbd2787ced5c82a8bf6a7eef1.patch"; + hash = "sha256-w3BbnEU6ye9WsNBNiELbbGOkXYsE3SACopRF0Dbfr3k="; + }) + ]; passthru = { inherit gtk3; }; meta = { + homepage = "https://github.com/GLibSharp/GtkSharp"; + license = lib.licenses.lgpl2Only; platforms = lib.platforms.linux; }; })