From af931a7a0ee71e2a684ca4ed0f9af38ea79935d2 Mon Sep 17 00:00:00 2001 From: Sigmanificient Date: Wed, 14 Jan 2026 09:06:55 +0100 Subject: [PATCH] python2Packages.pygtk: drop --- .../python2-modules/pygtk/default.nix | 99 ------------------- pkgs/top-level/python-aliases.nix | 1 + pkgs/top-level/python2-packages.nix | 2 - 3 files changed, 1 insertion(+), 101 deletions(-) delete mode 100644 pkgs/development/python2-modules/pygtk/default.nix diff --git a/pkgs/development/python2-modules/pygtk/default.nix b/pkgs/development/python2-modules/pygtk/default.nix deleted file mode 100644 index e5702f908169..000000000000 --- a/pkgs/development/python2-modules/pygtk/default.nix +++ /dev/null @@ -1,99 +0,0 @@ -{ - lib, - stdenv, - fetchurl, - fetchpatch, - python, - pkg-config, - gtk2, - pygobject2, - pycairo, - pango, - buildPythonPackage, - isPy3k, -}: - -buildPythonPackage rec { - pname = "pygtk"; - outputs = [ - "out" - "dev" - ]; - version = "2.24.0"; - format = "other"; - - disabled = isPy3k; - - src = fetchurl { - url = "mirror://gnome/sources/${pname}/${lib.versions.majorMinor version}/${pname}-${version}.tar.bz2"; - sha256 = "04k942gn8vl95kwf0qskkv6npclfm31d78ljkrkgyqxxcni1w76d"; - }; - - patches = [ - # https://bugzilla.gnome.org/show_bug.cgi?id=660216 - fixes some memory leaks - (fetchpatch { - url = "https://gitlab.gnome.org/Archive/pygtk/commit/eca72baa5616fbe4dbebea43c7e5940847dc5ab8.diff"; - sha256 = "031px4w5cshcx1sns430sdbr2i007b9zyb2carb3z65nzr77dpdd"; - }) - (fetchpatch { - url = "https://gitlab.gnome.org/Archive/pygtk/commit/4aaa48eb80c6802aec6d03e5695d2a0ff20e0fc2.patch"; - sha256 = "0z8cg7nr3qki8gg8alasdzzyxcihfjlxn518glq5ajglk3q5pzsn"; - }) - ]; - - nativeBuildInputs = [ pkg-config ]; - buildInputs = [ - pango - ]; - - propagatedBuildInputs = [ - gtk2 - pygobject2 - pycairo - ]; - - configurePhase = "configurePhase"; - - buildPhase = "buildPhase"; - - env.NIX_CFLAGS_COMPILE = - lib.optionalString stdenv.hostPlatform.isDarwin "-ObjC" - + lib.optionalString (stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isAarch64) " -lpython2.7" - + " -fpermissive"; # downgrade code errors to warnings - - installPhase = "installPhase"; - - checkPhase = '' - sed -i -e "s/glade = importModule('gtk.glade', buildDir)//" \ - tests/common.py - sed -i -e "s/, glade$//" \ - -e "s/.*testGlade.*//" \ - -e "s/.*(glade.*//" \ - tests/test_api.py - '' - + '' - sed -i -e "s/sys.path.insert(0, os.path.join(buildDir, 'gtk'))//" \ - -e "s/sys.path.insert(0, buildDir)//" \ - tests/common.py - make check - ''; - # XXX: TypeError: Unsupported type: - # The check phase was not executed in the previous - # non-buildPythonPackage setup - not sure why not. - doCheck = false; - - postInstall = '' - rm $out/bin/pygtk-codegen-2.0 - ln -s ${pygobject2}/bin/pygobject-codegen-2.0 $out/bin/pygtk-codegen-2.0 - ln -s ${pygobject2}/${python.sitePackages}/pygobject-${pygobject2.version}.pth \ - $out/${python.sitePackages}/${pname}-${version}.pth - ''; - - meta = { - description = "GTK 2 Python bindings"; - homepage = "https://gitlab.gnome.org/Archive/pygtk"; - platforms = lib.platforms.all; - license = with lib.licenses; [ lgpl21Plus ]; - maintainers = with lib.maintainers; [ bryango ]; - }; -} diff --git a/pkgs/top-level/python-aliases.nix b/pkgs/top-level/python-aliases.nix index 55eb3d572c60..1252de7b1f14 100644 --- a/pkgs/top-level/python-aliases.nix +++ b/pkgs/top-level/python-aliases.nix @@ -340,6 +340,7 @@ mapAliases { pygame_sdl2 = throw "'pygame_sdl2' has been renamed to/replaced by 'pygame-sdl2'"; # Converted to throw 2025-10-29 PyGithub = throw "'PyGithub' has been renamed to/replaced by 'pygithub'"; # Converted to throw 2025-10-29 pygls_2 = pygls; # added 2026-01-05 + pygtk = throw "pygtk has been removed because it was not supported by python3"; # Added 2026-01-14 pyheif = throw "pyheif has been removed due to lack of upstream maintenance and breakage. Use `pillow-heif` instead."; # added 2025-09-17 pyhiveapi = throw "'pyhiveapi' has been renamed to/replaced by 'pyhive-integration'"; # Converted to throw 2025-10-29 pyialarmxr = throw "'pyialarmxr' has been renamed to/replaced by 'pyialarmxr-homeassistant'"; # Converted to throw 2025-10-29 diff --git a/pkgs/top-level/python2-packages.nix b/pkgs/top-level/python2-packages.nix index ebfdbb802acb..86647bbc016f 100644 --- a/pkgs/top-level/python2-packages.nix +++ b/pkgs/top-level/python2-packages.nix @@ -53,8 +53,6 @@ with super; pygobject2 = callPackage ../development/python2-modules/pygobject { }; - pygtk = callPackage ../development/python2-modules/pygtk { }; - pyparsing = callPackage ../development/python2-modules/pyparsing { }; pytest = pytest_4;