Commit 8040d221 authored by Guy Chronister's avatar Guy Chronister Committed by Weijia Wang
Browse files

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.
parent 3a489a04
Loading
Loading
Loading
Loading
+17 −11
Original line number Diff line number Diff line
{
  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;

+0 −6
Original line number Diff line number Diff line
@@ -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 { };