guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

64/67: gnu: Add next-browser (DRAFT).


From: Pierre Neidhardt
Subject: 64/67: gnu: Add next-browser (DRAFT).
Date: Wed, 17 Oct 2018 04:20:22 -0400 (EDT)

ambrevar pushed a commit to branch wip-next-browser2
in repository guix.

commit abff643f87b33c747138e24f22988292abef9e2b
Author: Pierre Neidhardt <address@hidden>
Date:   Tue Aug 21 18:14:52 2018 +0200

    gnu: Add next-browser (DRAFT).
    
    *  (next-browser (DRAFT)): New variable.
---
 .../patches/next-fix-duplicate-function.patch      | 39 +++++++++++
 gnu/packages/web-browsers.scm                      | 80 +++++++++++++++++++++-
 2 files changed, 118 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/patches/next-fix-duplicate-function.patch 
b/gnu/packages/patches/next-fix-duplicate-function.patch
new file mode 100644
index 0000000..ce28698
--- /dev/null
+++ b/gnu/packages/patches/next-fix-duplicate-function.patch
@@ -0,0 +1,39 @@
+From 7b6ea6d375e547a6e465504656f819b1f4807d13 Mon Sep 17 00:00:00 2001
+From: Pierre Neidhardt <address@hidden>
+Date: Thu, 11 Oct 2018 11:14:36 +0200
+Subject: [PATCH] Fix set-url-new-buffer duplicate
+
+---
+ next/source/base.lisp          | 2 +-
+ next/source/document-mode.lisp | 2 +-
+ 2 files changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/next/source/base.lisp b/next/source/base.lisp
+index 543debe..26eec18 100644
+--- a/next/source/base.lisp
++++ b/next/source/base.lisp
+@@ -53,7 +53,7 @@
+     ;; We can have many urls as positional arguments.
+     (if free-args
+         (loop for url in free-args do
+-             (set-url-new-buffer url t))
++             (%set-url-new-buffer url t))
+         (set-url *start-page-url*))))
+ 
+ (defun initialize-default-key-bindings ()
+diff --git a/next/source/document-mode.lisp b/next/source/document-mode.lisp
+index 4da8546..4e36eec 100644
+--- a/next/source/document-mode.lisp
++++ b/next/source/document-mode.lisp
+@@ -132,7 +132,7 @@ buffer"
+     (history-typed-add input-url))
+   (interface:web-view-set-url (view buffer) input-url))
+ 
+-(defun set-url-new-buffer (input-url &optional disable-history)
++(defun %set-url-new-buffer (input-url &optional disable-history)
+   (let ((new-buffer (generate-new-buffer "default" (document-mode))))
+     (set-visible-active-buffer new-buffer)
+     (set-url-buffer input-url new-buffer disable-history)))
+-- 
+2.19.1
+
diff --git a/gnu/packages/web-browsers.scm b/gnu/packages/web-browsers.scm
index 2c2767d..c6844c8 100644
--- a/gnu/packages/web-browsers.scm
+++ b/gnu/packages/web-browsers.scm
@@ -25,6 +25,7 @@
 (define-module (gnu packages web-browsers)
   #:use-module ((guix licenses) #:prefix license:)
   #:use-module (guix packages)
+  #:use-module (guix utils)
   #:use-module (gnu packages)
   #:use-module (gnu packages compression)
   #:use-module (gnu packages databases)
@@ -35,6 +36,7 @@
   #:use-module (gnu packages gnupg)
   #:use-module (gnu packages libevent)
   #:use-module (gnu packages libidn)
+  #:use-module (gnu packages lisp)
   #:use-module (gnu packages lua)
   #:use-module (gnu packages gnome)
   #:use-module (gnu packages ncurses)
@@ -48,6 +50,8 @@
   #:use-module (gnu packages webkit)
   #:use-module (gnu packages xorg)
   #:use-module (guix download)
+  #:use-module (guix git-download)
+  #:use-module (guix build-system asdf)
   #:use-module (guix build-system gnu)
   #:use-module (guix build-system glib-or-gtk)
   #:use-module (guix build-system python))
@@ -309,7 +313,7 @@ access.")
                 '(16 24 32 48 64 128 256 512))
                (install-file "icons/qutebrowser.svg"
                              (string-append hicolor "/scalable/apps"))
-               
+
                (substitute* "qutebrowser.desktop"
                  (("Exec=qutebrowser")
                   (string-append "Exec=" out "/bin/qutebrowser")))
@@ -320,3 +324,77 @@ access.")
     (description "qutebrowser is a keyboard-focused browser with a minimal
 GUI.  It is based on PyQt5 and QtWebKit.")
     (license license:gpl3+)))
+
+(define-public next-browser-core
+  (let ((commit "ccc289b44610ada4ae9c875910af7720e85b546b"))
+    (package
+      (name "next-browser-core")
+      (version (git-version "0.0.8" "1" commit))
+      (source (origin
+                (method git-fetch)
+                (uri (git-reference
+                      (url "https://github.com/atlas-engineer/next";)
+                      (commit commit)))
+                (patches
+                 (search-patches "next-fix-duplicate-function.patch"))
+                (sha256
+                 (base32
+                  "0rccs9w49p577l12kgykccxrjkr03rf1cfz9mvxbjzc8g82dya2k"))
+                (file-name (git-file-name name version))))
+      (build-system asdf-build-system/sbcl)
+      ;; TODO: Move Common Lisp libraries to "native-inputs"?
+      ;; TODO: Does runtime depends on gsettings-desktop-schemas and 
glib-networking?
+      (inputs
+       `(("alexandria" ,sbcl-alexandria)
+         ("cl-strings" ,sbcl-cl-strings)
+         ("cl-string-match" ,sbcl-cl-string-match)
+         ("puri" ,sbcl-puri)
+         ("queues.simple-queue" ,sbcl-queues.simple-queue)
+         ("cl-sqlite" ,sbcl-cl-sqlite)
+         ("parenscript" ,sbcl-parenscript)
+         ("cl-json" ,sbcl-cl-json)
+         ("unix-opts" ,sbcl-unix-opts)))
+      (arguments
+       `( ;; #:tests? #f
+         #:asd-file "next/next.asd"
+         #:asd-system-name "next"))
+      (home-page "http://next.atlas.engineer/";)
+      (synopsis "Emacs-inspired web browser in extensible in Common Lisp")
+      (description "Next is a keyboard-oriented, extensible web-browser 
inspired
+by Emacs and designed for power users.  The application has familiar
+key-bindings, is fully configurable and extensible in Lisp.")
+      (license license:expat))))
+
+(define-public next-browser
+  (package
+    (inherit next-browser-core)
+    (name "next-browser")
+    (outputs '("out" "lib"))
+    (inputs
+     `(("next" ,next-browser-core)
+       ("cl-cffi-gtk" ,sbcl-cl-cffi-gtk)
+       ("cl-webkit" ,sbcl-cl-webkit)
+       ("lparallel" ,sbcl-lparallel)))
+    (arguments
+     (substitute-keyword-arguments (package-arguments next-browser-core)
+       ((#:asd-system-name _ #f) "next/gtk")
+       ((#:phases phases '%standard-phases)
+        `(modify-phases ,phases
+           (add-before 'cleanup 'move-bundle
+             (lambda* (#:key outputs #:allow-other-keys)
+               (define lib (assoc-ref outputs "lib"))
+               (define actual-fasl (string-append
+                                    lib
+                                    "/lib/sbcl/next/source/next-gtk.fasl"))
+               (define expected-fasl (string-append
+                                      lib
+                                      "/lib/sbcl/gtk--system.fasl"))
+               (copy-file actual-fasl expected-fasl)
+               #t))
+           (add-after 'create-symlinks 'build-program
+             (lambda* (#:key outputs #:allow-other-keys)
+               (build-program
+                (string-append (assoc-ref outputs "out") "/bin/next-browser")
+                outputs
+                #:entry-program '((next:start) 0)
+                #:dependencies '("next-gtk"))))))))))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]