From 8040d2213e1cc6d674ac21b33af772070bf105c1 Mon Sep 17 00:00:00 2001 From: Guy Chronister Date: Thu, 15 Jan 2026 09:20:15 -0600 Subject: [PATCH] formiko: migrate to by-name, switch to PEP 517, and update GTK deps Move formiko to pkgs/by-name and modernize its Python and GTK packaging. Changes: - enable PEP 517 with `pyproject = true` - add explicit `build-system = [ python3Packages.setuptools ]` - switch to python3Packages.buildPythonApplication - move pygobject3 to `dependencies` - replace gtksourceview (GTKSourceView 3) with gtksourceview4 - use explicit python3Packages.* references - replace deprecated sha256 with hash - remove manual wiring from all-packages.nix This brings formiko in line with current by-name, PEP 517, and GTK packaging conventions. --- .../fo/formiko/package.nix} | 28 +++++++++++-------- pkgs/top-level/all-packages.nix | 6 ---- 2 files changed, 17 insertions(+), 17 deletions(-) rename pkgs/{applications/editors/formiko/default.nix => by-name/fo/formiko/package.nix} (65%) diff --git a/pkgs/applications/editors/formiko/default.nix b/pkgs/by-name/fo/formiko/package.nix similarity index 65% rename from pkgs/applications/editors/formiko/default.nix rename to pkgs/by-name/fo/formiko/package.nix index d2f0fc1791b6..cc639774d6ce 100644 --- a/pkgs/applications/editors/formiko/default.nix +++ b/pkgs/by-name/fo/formiko/package.nix @@ -1,46 +1,52 @@ { lib, - buildPythonApplication, + python3Packages, fetchFromGitHub, wrapGAppsHook3, gobject-introspection, gtk3, - docutils, - gtksourceview, + gtksourceview4, gtkspell3, librsvg, - pygobject3, webkitgtk_4_1, }: -buildPythonApplication (finalAttrs: { +python3Packages.buildPythonApplication (finalAttrs: { pname = "formiko"; version = "1.5.0"; - format = "setuptools"; + pyproject = true; src = fetchFromGitHub { owner = "ondratu"; repo = "formiko"; tag = finalAttrs.version; - sha256 = "sha256-slfpkckCvxHJ/jlBP7QAhzaf9TAcS6biDQBZcBTyTKI="; + hash = "sha256-slfpkckCvxHJ/jlBP7QAhzaf9TAcS6biDQBZcBTyTKI="; }; + build-system = [ + python3Packages.setuptools + ]; + nativeBuildInputs = [ wrapGAppsHook3 gobject-introspection gtk3 ]; - propagatedBuildInputs = [ - docutils + + buildInputs = [ gobject-introspection gtk3 - gtksourceview + gtksourceview4 gtkspell3 librsvg - pygobject3 webkitgtk_4_1 ]; + dependencies = [ + python3Packages.pygobject3 + python3Packages.docutils + ]; + # Needs a display doCheck = false; diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index aacd720403d5..5cca5121f4cf 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -9498,12 +9498,6 @@ with pkgs; pname = "floorp-bin"; }; - formiko = - with python3Packages; - callPackage ../applications/editors/formiko { - inherit buildPythonApplication; - }; - inherit ({ freeoffice = callPackage ../applications/office/softmaker/freeoffice.nix { };