From e3b178e305434640ef903f571e8c324a414487bb Mon Sep 17 00:00:00 2001
From: David Pirotte <david@altosw.be>
Date: Mon, 17 Feb 2025 19:11:12 -0300
Subject: [PATCH] gnu: packages: remove g-golf and nomad

* gnu/packages/guile-xyz.scm: Remove g-golf. Remove nomad, which depends on
  g-golf (nomad was and still is reported to fail to build in guix for quite a
  long time now, fwiw).
---
 gnu/packages/guile-xyz.scm | 218 -------------------------------------
 1 file changed, 218 deletions(-)

diff --git a/gnu/packages/guile-xyz.scm b/gnu/packages/guile-xyz.scm
index 295f69d2de..958169359f 100644
--- a/gnu/packages/guile-xyz.scm
+++ b/gnu/packages/guile-xyz.scm
@@ -2519,103 +2519,6 @@ (define-public guile-sly
     (home-page "https://dthompson.us/projects/sly.html")
     (license license:gpl3+)))
 
-(define-public guile-g-golf
-  (package
-    (name "guile-g-golf")
-    (version "0.8.0")
-    (source
-     (origin
-       (method git-fetch)
-       (uri (git-reference
-             (url "https://git.savannah.gnu.org/git/g-golf.git")
-             (commit (string-append "v" version))))
-       (file-name (git-file-name name version))
-       (sha256
-        (base32 "14b6pjchra0axqifpm90m7jbxla2sarhd7bfhzqbn7d14b74sv2d"))))
-    (build-system gnu-build-system)
-    (arguments
-     (list
-      #:configure-flags
-      #~(list "--with-guile-site=no")
-      #:parallel-build? #f
-      #:phases
-      #~(modify-phases %standard-phases
-          (add-after 'unpack 'fix-guile-site-directory
-            (lambda _
-              (substitute* "configure.ac"
-                (("SITEDIR=.*$")
-                 "SITEDIR=\"$datadir/guile/site/$GUILE_EFFECTIVE_VERSION\";\n")
-                (("SITECCACHEDIR=\"\\$libdir/g-golf/")
-                 "SITECCACHEDIR=\"$libdir/"))))
-          (add-before 'configure 'tests-work-arounds
-            (lambda* (#:key inputs #:allow-other-keys)
-              ;; In build environment, There is no /dev/tty
-              (substitute* "test-suite/tests/gobject.scm"
-                (("/dev/tty") "/dev/null"))))
-          (add-before 'configure 'substitute-libs
-            (lambda* (#:key inputs outputs #:allow-other-keys)
-              (define (get lib)
-                (search-input-file inputs (string-append "lib/" lib ".so")))
-
-              (let* ((libgi      (get "libgirepository-1.0"))
-                     (libglib    (get "libglib-2.0"))
-                     (libgobject (get "libgobject-2.0"))
-                     (libg-golf (string-append #$output "/lib/libg-golf")))
-                (substitute* "g-golf/init.scm"
-                  (("libgirepository-1.0") libgi)
-                  (("libglib-2.0") libglib)
-                  (("libgobject-2.0") libgobject)
-                  (("\\(dynamic-link \"libg-golf\"\\)")
-                   (format #f "~s"
-                           `(catch #t
-                              (lambda ()
-                                (dynamic-link "libg-golf"))
-                              (lambda _
-                                (dynamic-link ,libg-golf))))))
-                (setenv "GUILE_AUTO_COMPILE" "0")
-                #t)))
-          (add-before 'check 'start-xorg-server
-            (lambda* (#:key inputs #:allow-other-keys)
-              ;; The test suite requires a running X server.
-              (system "Xvfb :1 &")
-              (setenv "DISPLAY" ":1")
-              #t)))))
-    (inputs
-     (list guile-3.0 guile-lib glib))
-    (native-inputs
-     (list autoconf
-           automake
-           texinfo
-           gettext-minimal
-           libtool
-           pkg-config
-           ;; required for tests
-           gtk+
-           xorg-server-for-tests))
-    (propagated-inputs
-     (list gobject-introspection))
-    (home-page "https://www.gnu.org/software/g-golf/")
-    (synopsis "Guile bindings for GObject Introspection")
-    (description
-     "G-Golf (Gnome: (Guile Object Library for)) is a library for developing
-modern applications in Guile Scheme.  It comprises a direct binding to the
-GObject Introspection API and higher-level functionality for importing Gnome
-libraries and making GObject classes (and methods) available in Guile's
-object-oriented programming system, GOOPS.")
-    (license license:lgpl3+)))
-
-(define-public g-golf
-  (deprecated-package "g-golf" guile-g-golf))
-
-(define-public guile2.2-g-golf
-  (package
-    (inherit guile-g-golf)
-    (name "guile2.2-g-golf")
-    (inputs
-     (modify-inputs (package-inputs guile-g-golf)
-       (replace "guile" guile-2.2)
-       (replace "guile-lib" guile2.2-lib)))))
-
 (define-public g-wrap
   (package
     (name "g-wrap")
@@ -4425,127 +4328,6 @@ (define-public guile-png
 processing filters.")
     (license license:gpl3+)))
 
-(define-public nomad
-  (package
-    (name "nomad")
-    (version "0.2.0-alpha-199-g3e7a475")
-    (source (origin
-              (method git-fetch)
-              (uri (git-reference
-                    (url "https://git.savannah.gnu.org/git/nomad.git/")
-                    (commit version)))
-              (file-name (git-file-name name version))
-              (sha256
-               (base32
-                "0p0ha6prp7pyadp61clbhc6b55023vxzfwy14j2qygb2mkq7fhic"))))
-    (build-system gnu-build-system)
-    (native-inputs
-     `(("autoconf" ,autoconf)
-       ("automake" ,automake)
-       ("bash" ,bash)
-       ("pkg-config" ,pkg-config)
-       ("libtool" ,libtool)
-       ("guile" ,guile-2.2)
-       ("glib:bin" ,glib "bin")
-       ("texinfo" ,texinfo)
-       ("gettext" ,gettext-minimal)
-       ("perl" ,perl)))
-    (inputs
-     `(("bash" ,bash-minimal) ; for wrap-program
-       ;; Guile
-       ("guile" ,guile-2.2)
-       ("guile-lib" ,guile2.2-lib)
-       ("guile-readline" ,guile2.2-readline)
-       ("guile-gcrypt" ,guile2.2-gcrypt)
-       ("gnutls" ,gnutls)
-       ("g-golf" ,guile2.2-g-golf)
-       ("shroud" ,shroud)
-       ("emacsy" ,emacsy-minimal)
-       ;; Gtk
-       ("glib" ,glib)
-       ("dbus-glib" ,dbus-glib)
-       ("glib-networking" ,glib-networking)
-       ("gtk+" ,gtk+)
-       ("gtk+:bin" ,gtk+ "bin")
-       ("webkitgtk" ,webkitgtk-for-gtk3)
-       ("gtksourceview" ,gtksourceview-4)
-       ("gsettings-desktop-schemas" ,gsettings-desktop-schemas)
-       ("vte" ,vte)
-       ;; Gstreamer
-       ("gstreamer" ,gstreamer)
-       ("gst-plugins-base" ,gst-plugins-base)
-       ("gst-plugins-good" ,gst-plugins-good)
-       ("gst-plugins-bad" ,gst-plugins-bad)
-       ("gst-plugins-ugly" ,gst-plugins-ugly)
-       ;; Util
-       ("xorg-server" ,xorg-server)))
-    (arguments
-     `(#:modules ((guix build gnu-build-system)
-                  (guix build utils)
-                  (ice-9 popen)
-                  (ice-9 rdelim)
-                  (srfi srfi-26))
-       #:phases
-       (modify-phases %standard-phases
-         (add-after 'unpack 'fix-webkitgtk
-           (lambda _
-             ;; Adapt to the version we have in Guix.
-             (substitute* "configure.ac"
-               (("webkit2gtk-4\\.0") "webkit2gtk-4.1")
-               (("webkit2gtk-web-extension-4\\.0")
-                "webkit2gtk-web-extension-4.1"))
-
-             (substitute* "typelib/Makefile.am"
-               (("WebKit2-4\\.0") "WebKit2-4.1"))))
-         (add-before 'check 'start-xorg-server
-           (lambda* (#:key inputs #:allow-other-keys)
-             ;; The test suite requires a running X server.
-             (system (format #f "~a/bin/Xvfb :1 &"
-                             (assoc-ref inputs "xorg-server")))
-             (setenv "DISPLAY" ":1")
-             #t))
-         (add-after 'install 'wrap-binaries
-           (lambda* (#:key inputs outputs #:allow-other-keys)
-             (let* ((out        (assoc-ref outputs "out"))
-                    (effective  (read-line (open-pipe*
-                                            OPEN_READ
-                                            "guile" "-c"
-                                            "(display (effective-version))")))
-                    (gst-plugins (map (lambda (i)
-                                        (string-append (assoc-ref inputs i)
-                                                       "/lib/gstreamer-1.0"))
-                                      `("gstreamer"
-                                        "gst-plugins-base"
-                                        "gst-plugins-good"
-                                        "gst-plugins-bad"
-                                        "gst-plugins-ugly")))
-                    (out-append (lambda (. args)
-                                  (apply string-append out args)))
-                    (gi-path    (out-append "/lib/girepository-1.0"))
-                    (load-path  (out-append "/share/guile/site/" effective))
-                    (comp-path  (out-append "/lib/guile/"
-                                            effective "/site-ccache"))
-                    (ext-path   (out-append "/libexec/nomad")))
-               (wrap-program (string-append out "/bin/nomad")
-                 `("GUILE_LOAD_PATH" ":" prefix
-                   (,load-path
-                    ,(getenv "GUILE_LOAD_PATH")))
-                 `("GUILE_LOAD_COMPILED_PATH" ":" prefix
-                   (,comp-path
-                    ,(getenv "GUILE_LOAD_COMPILED_PATH")))
-                 `("GI_TYPELIB_PATH" ":" prefix
-                   (,gi-path ,(getenv "GI_TYPELIB_PATH")))
-                 `("GIO_EXTRA_MODULES" ":" prefix
-                   (,(getenv "GIO_EXTRA_MODULES")))
-                 `("GST_PLUGIN_SYSTEM_PATH" ":" prefix ,gst-plugins)
-                 `("NOMAD_WEB_EXTENSION_DIR" ":" prefix (,ext-path)))
-               #t))))))
-    (home-page "https://savannah.nongnu.org/projects/nomad/")
-    (synopsis "Extensible Web Browser in Guile Scheme")
-    (description "Nomad is a Emacs-like web browser that consists of a modular
-feature-set, fully programmable in Guile Scheme.")
-    (license license:gpl3+)))
-
 (define-public guile-cv
   (package
     (name "guile-cv")
-- 
2.47.2

