[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
01/03: gnu: Add next-browser (DRAFT).
From: |
Pierre Neidhardt |
Subject: |
01/03: gnu: Add next-browser (DRAFT). |
Date: |
Thu, 25 Oct 2018 10:20:36 -0400 (EDT) |
ambrevar pushed a commit to branch wip-next4
in repository guix.
commit 48c6349cec7fbd776417bc060f835a783e2b3157
Author: Pierre Neidhardt <address@hidden>
Date: Tue Aug 21 18:14:52 2018 +0200
gnu: Add next-browser (DRAFT).
* (next-browser (DRAFT)): New variable.
---
gnu/packages/web-browsers.scm | 80 ++++++++++++++++++++++++++++++++++++++++++-
1 file changed, 79 insertions(+), 1 deletion(-)
diff --git a/gnu/packages/web-browsers.scm b/gnu/packages/web-browsers.scm
index 2c2767d..deedc74 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 "fb6511ba82295f724b753d184fa0665555d7b6ab"))
+ (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
+ "0cmnl02gaxa4kmss75x748kv5k6rbl0rablvnr3p7d2h44cb5yj3"))
+ (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"))))))))))