guix_mirror_bot pushed a commit to branch master
in repository guix.

commit 1494087112f3cc216ec8e49bc3b18fa1635ed340
Author: Sughosha <[email protected]>
AuthorDate: Fri Apr 3 12:29:36 2026 +0530

    gnu: Add typobuster.
    
    * gnu/packages/nwg-shell.scm (typobuster): New variable.
    
    Relates-to: guix/guix!7644
    Reviewed-by: Maxim Cournoyer <[email protected]>
    Signed-off-by: Sharlatan Hellseher <[email protected]>
---
 gnu/packages/nwg-shell.scm | 64 ++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 64 insertions(+)

diff --git a/gnu/packages/nwg-shell.scm b/gnu/packages/nwg-shell.scm
index 7c445d13ae..0ad049f6e6 100644
--- a/gnu/packages/nwg-shell.scm
+++ b/gnu/packages/nwg-shell.scm
@@ -1073,3 +1073,67 @@ and the launcher button.
 
 This application is a part of the nwg-shell project.")
     (license license:expat)))
+
+(define-public typobuster
+  (package
+    (name "typobuster")
+    (version "1.0.0")
+    (source
+     (origin
+       (method git-fetch)
+       (uri (git-reference
+             (url "https://github.com/nwg-piotr/typobuster";)
+             (commit (string-append "v" version))))
+       (file-name (git-file-name name version))
+       (sha256
+        (base32 "1n8nqfwj9ih1vdzvmlnjp463rnr66ca30sdc7a82g42brmlkk5wv"))))
+    (build-system pyproject-build-system)
+    (arguments
+     (list
+      #:tests? #f ;no tests exist in source
+      #:phases
+      #~(modify-phases %standard-phases
+          (add-after 'unpack 'patch-paths
+            (lambda _
+              (substitute* "typobuster/tools.py"
+                (("\\/usr\\/share") (string-append #$output "/share")))))
+          (add-after 'create-entrypoints 'install-data
+            (lambda _
+              (install-file "typobuster.desktop"
+                            (string-append #$output "/share/applications"))
+              (install-file "typobuster.svg"
+                            (string-append #$output "/share/pixmaps"))
+              (install-file "README.md"
+                            (string-append #$output "/share/doc/typobuster"))))
+          (add-after 'create-entrypoints 'wrap-program
+            (lambda _
+              (wrap-program (string-append #$output "/bin/typobuster")
+                `("PATH" prefix
+                  (,(dirname (which "gsettings"))))
+                `("GI_TYPELIB_PATH" prefix
+                  (,(getenv "GI_TYPELIB_PATH")))
+                `("XDG_DATA_DIRS" prefix
+                  (,(string-append #$(this-package-input "gtksourceview")
+                                   "/share")))))))))
+    (propagated-inputs
+     ;; avoid runtime error:
+     ;; No such schema “org.gnome.desktop.interface”
+     (list gsettings-desktop-schemas))
+    (native-inputs
+     (list gobject-introspection
+           python-setuptools))
+    (inputs
+     (list bash-minimal
+           `(,glib "bin")     ;for gsettings
+           gtk+
+           gtksourceview-4
+           python-pycairo
+           python-pygobject))
+    (home-page "https://nwg-piotr.github.io/nwg-shell/typobuster";)
+    (synopsis "Text editor with text transformations and auto-correction")
+    (description
+     "Typobuster is a simplified text editor with a wide selection of
+transformations and automatic correction of common typos.
+
+This application is a part of the nwg-shell project.")
+    (license license:gpl3)))

Reply via email to