Amar Singh wrote 6 years ago
(address . guix-patches@gnu.org)(address . mike.rosset@gmail.com)
From the package description:
Nomad is an Emacs-like Web Browser built using Webkitgtk and
Emacsy. It has a small C backend and most browser features are fully
programmable in Guile. It has hooks, keymaps, and self documentation
features.
Though it requires a few changes to existing packages:
Patches:
1. Shroud related patches
a. update to 0.1.2: brings Guile-2.2 support
Related issue: https://issues.guix.gnu.org/issue/36576
2. Emacsy related patches
a. Add guile-emacsy package,
$ guix size emacsy ... total: 1136.3 MiB
versus:
$ guix size guile-emacsy ... total: 132.3 MiB
Related issue: https://issues.guix.gnu.org/issue/36151
(Discussion about "emacsy" vs "guile-emacsy" naming)
3. Nomad related patches
a. Add 'Nomad' package in guile-xyz.scm
4. [Optional] Emacsy package can also be cleaned up a bit, mostly
removal of propagated-inputs. Though that's a seperate issue.
[patch 04 attached]
Cheers,
amar
From 1f5cb19d4e44e2f99250499b7a4f756cddb21d13 Mon Sep 17 00:00:00 2001
From: Amar Singh <nly@disroot.org>
Date: Mon, 8 Jul 2019 12:04:56 +0530
Subject: [PATCH 1/4] gnu: Add guile-emacsy.
* (guile-emacsy): New variable.
Emacsy is a library for Guile. Emacsy package is too heavy for use as a
dependency for other packages:
$ guix size emacsy ... total: 1136.3 MiB
versus:
$ guix size guile-emacsy ... total: 132.3 MiB
---
gnu/packages/guile-xyz.scm | 30 ++++++++++++++++++++++++++++++
1 file changed, 30 insertions(+)
Toggle diff (43 lines)
diff --git a/gnu/packages/guile-xyz.scm b/gnu/packages/guile-xyz.scm
index 91054fef25..760646259e 100644
--- a/gnu/packages/guile-xyz.scm
+++ b/gnu/packages/guile-xyz.scm
@@ -2430,6 +2430,36 @@ comes with a simple counter example using FreeGLUT and browser examples
in C using Gtk+-3 and WebKitGtk.")
(license license:gpl3+)))
+(define-public guile-emacsy
+ (let ((commit "f3bf0dbd803d7805b6ae8303253507ad13922293"))
+ (package
+ (inherit emacsy)
+ (name "guile-emacsy")
+ (version (git-version "v0.4.1" "19" commit))
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://git.savannah.gnu.org/git/emacsy.git")
+ (commit commit)))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "0ivy28km1p7nlrf63xx3hvrpxf5ld5amk1wcan3k7sqv1kq9mqdb"))))
+ (build-system gnu-build-system)
+ (inputs
+ `(("guile" ,guile-2.2)
+ ("guile-lib" ,guile-lib)
+ ("guile-readline" ,guile-readline)))
+ (propagated-inputs '())
+ (arguments
+ `(#:configure-flags '("--without-examples")
+ #:phases
+ (modify-phases %standard-phases
+ (add-before 'configure 'setenv
+ (lambda _
+ (setenv "GUILE_AUTO_COMPILE" "0")
+ #t))))))))
+
(define-public guile-jpeg
(let ((commit "6a1673578b297c2c1b28e44a76bd5c49e76a5046")
(revision "0"))
--
2.22.1
From 6c3d8835105c09eda6215e4b0d8847f4a6b6b3e8 Mon Sep 17 00:00:00 2001
From: Amar Singh <nly@disroot.org>
Date: Sun, 11 Aug 2019 03:44:16 +0530
Subject: [PATCH 2/4] gnu: shroud: Update to 0.1.2.
* gnu/packages/password-utils.scm (shroud): Update to 0.1.2.
Shroud now builds with Guile-2.2. Remove hardcoded '2.0' string.
---
gnu/packages/password-utils.scm | 24 ++++++++++++++++++------
1 file changed, 18 insertions(+), 6 deletions(-)
Toggle diff (53 lines)
diff --git a/gnu/packages/password-utils.scm b/gnu/packages/password-utils.scm
index 49024b26c4..6ca16025ef 100644
--- a/gnu/packages/password-utils.scm
+++ b/gnu/packages/password-utils.scm
@@ -236,28 +236,40 @@ platforms.")
(define-public shroud
(package
(name "shroud")
- (version "0.1.1")
+ (version "0.1.2")
(source (origin
(method url-fetch)
(uri (string-append "https://files.dthompson.us/shroud/shroud-"
version ".tar.gz"))
(sha256
(base32
- "1y43yhgy2zbrk5bqj3qyx9rkcz2bma9sinlrg7dip3jqms9gq4lr"))))
+ "1l2shrhvcwfzkar9qiwb75nhcqmx25iz55lzmz0c187nbjhqzi9p"))))
(build-system gnu-build-system)
+ (native-inputs
+ `(("pkg-config" ,pkg-config)))
(arguments
- '(#:phases
+ `(#:modules ((guix build gnu-build-system)
+ (guix build utils)
+ (ice-9 popen)
+ (ice-9 rdelim))
+ #:phases
(modify-phases %standard-phases
(add-after 'install 'wrap-shroud
- (lambda* (#:key outputs #:allow-other-keys)
+ (lambda* (#:key inputs outputs #:allow-other-keys)
(let* ((out (assoc-ref outputs "out"))
- (ccachedir (string-append out "/lib/guile/2.0/ccache"))
+ (guile (assoc-ref inputs "guile"))
+ (effective (read-line
+ (open-pipe* OPEN_READ
+ (string-append guile "/bin/guile")
+ "-c" "(display (effective-version))")))
+ (ccachedir (string-append out
+ "/lib/guile/" effective "/site-ccache"))
(prog (string-append out "/bin/shroud")))
(wrap-program prog
`("GUILE_LOAD_COMPILED_PATH" ":" prefix (,ccachedir)))
#t))))))
(inputs
- `(("guile" ,guile-2.0)
+ `(("guile" ,guile-2.2)
("gnupg" ,gnupg)
("xclip" ,xclip)))
(synopsis "GnuPG-based secret manager")
--
2.22.1
From b8cc0e6db1abcb395df12437e16ba39007dff33d Mon Sep 17 00:00:00 2001
From: Amar Singh <nly@disroot.org>
Date: Wed, 10 Jul 2019 16:45:50 +0530
Subject: [PATCH 4/4] gnu: emacsy: cleanup build
fix conflicts; emacsy requires guile-2.2.4 but found guile-2.2.6 in profile etc.
build: add phase 'wrap-binaries
bulid: glib-or-gtk-build-system wraps binaries to work with glib or gtk
propagated-inputs: remove all but glib-network and gsettings
---
gnu/packages/guile-xyz.scm | 40 ++++++++++++++++++++++++++++++++------
1 file changed, 34 insertions(+), 6 deletions(-)
Toggle diff (78 lines)
diff --git a/gnu/packages/guile-xyz.scm b/gnu/packages/guile-xyz.scm
index 0fed3c6da5..d515e1ed5e 100644
--- a/gnu/packages/guile-xyz.scm
+++ b/gnu/packages/guile-xyz.scm
@@ -21,6 +21,7 @@
;;; Copyright © 2018 Pierre-Antoine Rouby <pierre-antoine.rouby@inria.fr>
;;; Copyright © 2018 Eric Bavier <bavier@member.fsf.org>
;;; Copyright © 2019 swedebugia <swedebugia@riseup.net>
+;;; Copyright (C) 2019 by Amar Singh<nly@disroot.org>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -2393,7 +2394,7 @@ more expressive and flexible than the traditional @code{format} procedure.")
(sha256
(base32
"1cpb85dl1nibd34c2x2h7vfmjpkgh353p5b1w20v6cs6gmvgg4np"))))
- (build-system gnu-build-system)
+ (build-system glib-or-gtk-build-system)
(native-inputs
`(("autoconf" ,autoconf)
("automake" ,automake)
@@ -2405,22 +2406,49 @@ more expressive and flexible than the traditional @code{format} procedure.")
("pkg-config" ,pkg-config)
("texinfo" ,texinfo)
("texlive" ,(texlive-union (list texlive-generic-epsf)))))
- (propagated-inputs
+ (inputs
`(("dbus-glib" ,dbus-glib)
("guile" ,guile-2.2)
("guile-lib" ,guile-lib)
("guile-readline" ,guile-readline)
- ("glib-networking" ,glib-networking)
("freeglut" ,freeglut)
- ("gssettings-desktop-schemas" ,gsettings-desktop-schemas)
("webkitgtk" ,webkitgtk)))
+ (propagated-inputs
+ `(("glib-networking" ,glib-networking)
+ ("gssettings-desktop-schemas" ,gsettings-desktop-schemas)))
(arguments
- `(#:phases
+ `(#:modules ((guix build gnu-build-system)
+ (guix build glib-or-gtk-build-system)
+ (guix build utils)
+ (ice-9 popen)
+ (ice-9 rdelim)
+ (ice-9 regex)
+ (ice-9 ftw)
+ (srfi srfi-26))
+ #:phases
(modify-phases %standard-phases
(add-before 'configure 'setenv
(lambda _
(setenv "GUILE_AUTO_COMPILE" "0")
- #t)))))
+ #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))")))
+ (deps (map (cut assoc-ref inputs <>) '("guile-lib" "guile-readline")))
+ (scm-path (map (cut string-append <> "/share/guile/site/" effective) `(,out ,@deps)))
+ (go-path (map (cut string-append <> "/lib/guile/" effective "/site-ccache/") `(,out ,@deps)))
+ (examples (filter (cut string-match "emacsy" <>)
+ (scandir (string-append out "/bin/"))))
+ (progs (map (cut string-append out "/bin/" <>)
+ examples)))
+ (map (cut wrap-program <>
+ `("GUILE_LOAD_PATH" ":" prefix ,scm-path)
+ `("GUILE_LOAD_COMPILED_PATH" ":" prefix ,go-path)) progs)
+ #t))))))
(home-page "https://savannah.nongnu.org/projects/emacsy")
(synopsis "Embeddable GNU Emacs-like library using Guile")
(description
--
2.22.1