Archived
1
0
Fork 0

gnu: nyxt (formerly 'next'): Update to 20200702.

* gnu/packages/web-browsers.scm (next): Deprecate in favour of nyxt.
(nyxt): New variable.
This commit is contained in:
Pierre Neidhardt 2020-07-03 15:35:16 +02:00
parent e643431c12
commit ec70df7243
No known key found for this signature in database
GPG key ID: 9BDCF497A4BBCC7F

View file

@ -452,247 +452,136 @@ vim editor and also easily configurable during runtime. Vimb is mostly keyboard
driven and does not detract you from your daily work.") driven and does not detract you from your daily work.")
(license license:gpl3+))) (license license:gpl3+)))
(define next-gtk-webkit (define-public nyxt
;; 1.5.0 does not build anymore, let's use the master which is more stable anyways.
(let ((commit "9440980a9c5f75232b08ca98183b22be4a3d9bc3"))
(package (package
(name "next-gtk-webkit") (name "nyxt")
(version "1.5.0") (version (git-version "1.5.0" "1" commit))
(source (source
(origin (origin
(method git-fetch) (method git-fetch)
(uri (git-reference (uri (git-reference
;; TODO: Mirror seems to hang, let's fallback to GitHub for now. ;; TODO: Mirror seems to hang, let's fallback to GitHub for now.
;; (url "https://source.atlas.engineer/public/next") ;; (url "https://source.atlas.engineer/public/nyxt")
(url "https://github.com/atlas-engineer/next") (url "https://github.com/atlas-engineer/nyxt")
(commit version))) (commit commit)))
(sha256 (sha256
(base32 (base32
"1gqkp185wcwaxr8py90hqk44nqjblrrdwvig19gizrbzr2gx2zhy")) "079n5ffsa8136i9ik5mn4rwa3iv0avncw6y973gj3hlf8sf4wv7g"))
(file-name (git-file-name "next" version)))) (file-name (git-file-name "nyxt" version))))
(build-system glib-or-gtk-build-system) (build-system gnu-build-system)
(arguments (arguments
`(#:tests? #f ; no tests `(#:make-flags (list "nyxt" "NYXT_INTERNAL_QUICKLISP=false"
#:make-flags (list "gtk-webkit" (string-append "DESTDIR=" (assoc-ref %outputs "out"))
"CC=gcc" "PREFIX=")
(string-append "PREFIX=" %output)) #:strip-binaries? #f ; Stripping breaks SBCL binaries.
#:phases #:phases
(modify-phases %standard-phases (modify-phases %standard-phases
(delete 'configure) (add-after 'unpack 'patch-version ; Version is guessed from .git which Guix does not have.
(replace 'install
(lambda* (#:key (make-flags '()) #:allow-other-keys)
(apply invoke "make" "install-gtk-webkit" make-flags))))))
(inputs
`(("glib-networking" ,glib-networking)
("gsettings-desktop-schemas" ,gsettings-desktop-schemas)
("webkitgtk" ,webkitgtk)))
(native-inputs
`(("pkg-config" ,pkg-config)))
(home-page "https://next.atlas.engineer")
(synopsis "Extensible web-browser in Common Lisp")
(description "Next is a keyboard-oriented, extensible web-browser
designed for power users. The application has familiar Emacs and VI
key-bindings and is fully configurable and extensible in Common Lisp.")
(license license:bsd-3)))
(define sbcl-next-download-manager
(package
(inherit next-gtk-webkit)
(name "sbcl-next-download-manager")
(build-system asdf-build-system/sbcl)
(arguments
`(#:tests? #f ; Need online access.
#:asd-file "next.asd"
#:asd-system-name "next/download-manager"))
(inputs
`(("cl-ppcre" ,sbcl-cl-ppcre)
("dexador" ,sbcl-dexador)
("log4cl" ,sbcl-log4cl)
("lparallel" ,sbcl-lparallel)
("quri" ,sbcl-quri)
("str" ,sbcl-cl-str)))
(native-inputs
`(("trivial-features" ,sbcl-trivial-features)
("prove-asdf" ,sbcl-prove-asdf)))
(synopsis "Extensible web-browser in Common Lisp (download manager)")))
(define sbcl-next-ring
(package
(inherit next-gtk-webkit)
(name "sbcl-next-ring")
(build-system asdf-build-system/sbcl)
(arguments
`(#:tests? #t
#:asd-file "next.asd"
#:asd-system-name "next/ring"))
(native-inputs
`(("trivial-features" ,sbcl-trivial-features)
("prove-asdf" ,sbcl-prove-asdf)))
(synopsis "Extensible web-browser in Common Lisp (ring)")))
(define sbcl-next-history-tree
(package
(inherit next-gtk-webkit)
(name "sbcl-next-history-tree")
(build-system asdf-build-system/sbcl)
(arguments
`(#:tests? #t
#:asd-file "next.asd"
#:asd-system-name "next/history-tree"))
(native-inputs
`(("trivial-features" ,sbcl-trivial-features)
("prove-asdf" ,sbcl-prove-asdf)))
(synopsis "Extensible web-browser in Common Lisp (history-tree)")))
(define sbcl-next-password-manager
(package
(inherit next-gtk-webkit)
(name "sbcl-next-password-manager")
(build-system asdf-build-system/sbcl)
(arguments
`(#:tests? #t
#:asd-file "next.asd"
#:asd-system-name "next/password-manager"))
(inputs
`(("bordeaux-threads" ,sbcl-bordeaux-threads)
("cl-annot" ,sbcl-cl-annot)
("cl-ppcre" ,sbcl-cl-ppcre)
("str" ,sbcl-cl-str)
("trivial-clipboard" ,sbcl-trivial-clipboard)))
(native-inputs
`(("trivial-features" ,sbcl-trivial-features)
("prove-asdf" ,sbcl-prove-asdf)))
(synopsis "Extensible web-browser in Common Lisp (password manager)")))
(define sbcl-next-hooks
(package
(inherit next-gtk-webkit)
(name "sbcl-next-hooks")
(build-system asdf-build-system/sbcl)
(arguments
`(#:tests? #t
#:asd-file "next.asd"
#:asd-system-name "next/hooks"))
(inputs
`(("alexandria" ,sbcl-alexandria)
("serapeum" ,sbcl-serapeum)))
(native-inputs
`(("trivial-features" ,sbcl-trivial-features)
("prove-asdf" ,sbcl-prove-asdf)))
(synopsis "Infinitely extensible web-browser (hooks)")))
(define-public next
(let ((version (package-version next-gtk-webkit)))
(package
(inherit next-gtk-webkit)
(name "next")
(build-system asdf-build-system/sbcl)
(outputs '("out" "lib"))
(arguments
`(#:tests? #f ; no tests
#:asd-system-name "next"
#:phases (modify-phases %standard-phases
(add-after 'unpack 'patch-platform-port-path
(lambda* (#:key inputs #:allow-other-keys)
(substitute* "source/ports/gtk-webkit.lisp"
(("\"next-gtk-webkit\"")
(string-append "\"" (assoc-ref inputs "next-gtk-webkit")
"/bin/next-gtk-webkit\"")))
#t))
(add-after 'patch-platform-port-path 'patch-version
;; When the version is not just dot-separated numerals
;; (e.g. a git-commit version), Guix modifies the .asd with
;; an illegal version number, and then Next fails to query
;; it. So we hard-code it here.
(lambda* (#:key inputs #:allow-other-keys) (lambda* (#:key inputs #:allow-other-keys)
(let ((version (format #f "~a" ,version))) (let ((version (format #f "~a" ,version)))
(substitute* "source/global.lisp" (substitute* "source/global.lisp"
(("version\\)\\)\\)") (("version\\)\\)\\)")
(string-append "version))) (string-append "version)))"
(setf +version+ \"" version "\")")))) "\n"
"(setf +version+ \"" version "\")"))))
#t)) #t))
(add-before 'cleanup 'move-bundle (add-before 'build 'make-desktop-version-number
(lambda* (#:key outputs #:allow-other-keys) (lambda _
(define lib (assoc-ref outputs "lib"))
(define actual-fasl (string-append
lib
"/lib/sbcl/next.fasl"))
(define expected-fasl (string-append
lib
"/lib/sbcl/next--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")
outputs
#:entry-program '((next:entry-point) 0))))
(add-before 'build 'install-assets
;; Since the ASDF build system generates a new .asd with a
;; possibly suffixed and thus illegal version number, assets
;; should not be installed after the 'build phase or else
;; the illegal version will result in NIL in the .desktop
;; file.
(lambda* (#:key outputs #:allow-other-keys)
(with-output-to-file "version" (with-output-to-file "version"
(lambda _ (lambda _
(format #t "~a" ,(package-version next-gtk-webkit)))) (format #t "~a" ,version)))))
(invoke "make" "install-assets"
(string-append "PREFIX=" (delete 'configure)
(assoc-ref outputs "out"))))) (add-before 'build 'fix-common-lisp-cache-folder
(add-after 'unpack 'fix-lambda-list
;; Starting from SBCL 2.0.2, Next 1.5.0 won't build
;; because of a weird lambda list type.
(lambda _ (lambda _
(substitute* "source/keymap.lisp" (setenv "HOME" "/tmp")
(("^\\(declaim .* define-key\\)\\)") "")) #t))
(substitute* "source/search-buffer.lisp" (add-after 'install 'wrap-program
(("define-key :keymap keymap \"C-s\"") "define-key \"C-s\"") (lambda* (#:key inputs outputs #:allow-other-keys)
(("\\(update-selection-highlight-hint :follow t :scroll t\\)\\)\\)") (let* ((bin (string-append (assoc-ref outputs "out") "/bin/nyxt"))
"(update-selection-highlight-hint :follow t :scroll t)) :keymap keymap)"))))))) (glib-networking (assoc-ref inputs "glib-networking"))
(inputs (libs '("gsettings-desktop-schemas"))
`(("alexandria" ,sbcl-alexandria) (path (string-join
("bordeaux-threads" ,sbcl-bordeaux-threads) (map (lambda (lib)
("cl-annot" ,sbcl-cl-annot) (string-append (assoc-ref inputs lib) "/lib"))
("cl-ansi-text" ,sbcl-cl-ansi-text) libs)
("cl-css" ,sbcl-cl-css) ":"))
("cl-json" ,sbcl-cl-json) (gi-path (string-join
("cl-markup" ,sbcl-cl-markup) (map (lambda (lib)
("cl-ppcre" ,sbcl-cl-ppcre) (string-append (assoc-ref inputs lib) "/lib/girepository-1.0"))
("cl-ppcre-unicode" ,sbcl-cl-ppcre-unicode) libs)
("cl-prevalence" ,sbcl-cl-prevalence) ":"))
("closer-mop" ,sbcl-closer-mop) (xdg-path (string-join
("dbus" ,cl-dbus) (map (lambda (lib)
("dexador" ,sbcl-dexador) (string-append (assoc-ref inputs lib) "/share"))
("ironclad" ,sbcl-ironclad) libs)
("local-time" ,sbcl-local-time) ":")))
("log4cl" ,sbcl-log4cl) (wrap-program bin
("lparallel" ,sbcl-lparallel) `("GIO_EXTRA_MODULES" prefix
("mk-string-metrics" ,sbcl-mk-string-metrics) (,(string-append glib-networking "/lib/gio/modules")))
("parenscript" ,sbcl-parenscript) `("GI_TYPELIB_PATH" prefix (,gi-path))
("plump" ,sbcl-plump) `("LD_LIBRARY_PATH" ":" prefix (,path))
("quri" ,sbcl-quri) `("XDG_DATA_DIRS" ":" prefix (,xdg-path)))
("serapeum" ,sbcl-serapeum) #t))))))
("sqlite" ,sbcl-cl-sqlite)
("str" ,sbcl-cl-str)
("swank" ,sbcl-slime-swank)
("trivia" ,sbcl-trivia)
("trivial-clipboard" ,sbcl-trivial-clipboard)
("unix-opts" ,sbcl-unix-opts)
;; Local deps
("next-gtk-webkit" ,next-gtk-webkit)
("next-download-manager" ,sbcl-next-download-manager)
("next-ring" ,sbcl-next-ring)
("next-history-tree" ,sbcl-next-history-tree)
("next-password-manager" ,sbcl-next-password-manager)
("next-hooks" ,sbcl-next-hooks)))
(native-inputs (native-inputs
`(("trivial-features" ,sbcl-trivial-features) `(("prove" ,sbcl-prove)
("trivial-types" ,sbcl-trivial-types) ("sbcl" ,sbcl)))
("prove-asdf" ,sbcl-prove-asdf))) (inputs
(synopsis "Extensible web-browser in Common Lisp")))) ;; We need to avoid sbcl-* inputs (sbcl-cl-cffi-gtk in particular) as they
;; seem to cause Nyxt to hang into a hogging process in about 10 minutes.
;; Probably an issue between CFFI and how we build SBCL packages.
;; See https://github.com/atlas-engineer/nyxt/issues/680.
`(("alexandria" ,cl-alexandria)
("bordeaux-threads" ,cl-bordeaux-threads)
("cl-containers" ,cl-containers)
("cl-css" ,cl-css)
("cl-json" ,cl-json)
("cl-markup" ,cl-markup)
("cl-ppcre" ,cl-ppcre)
("cl-prevalence" ,cl-prevalence)
("closer-mop" ,cl-closer-mop)
("cluffer" ,cl-cluffer)
("dexador" ,cl-dexador)
("enchant" ,cl-enchant)
("fset" ,cl-fset)
("iolib" ,cl-iolib)
("local-time" ,cl-local-time)
("log4cl" ,cl-log4cl)
("lparallel" ,cl-lparallel)
("mk-string-metrics" ,cl-mk-string-metrics)
("moptilities" ,cl-moptilities)
("osicat" ,sbcl-osicat) ; SBCL version needed for libosicat.so.
("parenscript" ,cl-parenscript)
("plump" ,cl-plump)
("quri" ,cl-quri)
("serapeum" ,cl-serapeum)
("str" ,cl-str)
("swank" ,cl-slime-swank)
("trivia" ,cl-trivia)
("trivial-clipboard" ,cl-trivial-clipboard)
("trivial-features" ,cl-trivial-features)
("trivial-package-local-nicknames" ,cl-trivial-package-local-nicknames)
("trivial-types" ,cl-trivial-types)
("unix-opts" ,cl-unix-opts)
;; WebKitGTK deps
("cl-cffi-gtk" ,cl-cffi-gtk)
("cl-webkit" ,cl-webkit)
("glib-networking" ,glib-networking)
("gsettings-desktop-schemas" ,gsettings-desktop-schemas)))
(synopsis "Extensible web-browser in Common Lisp")
(home-page "https://nyxt.atlas.engineer")
(description "Nyxt is a keyboard-oriented, extensible web-browser
designed for power users. The application has familiar Emacs and VI
key-bindings and is fully configurable and extensible in Common Lisp.")
(license license:bsd-3))))
(define-public next
(deprecated-package "next" nyxt))
(define-public sbcl-next (define-public sbcl-next
(deprecated-package "sbcl-next" next)) (deprecated-package "sbcl-next" nyxt))
(define-public bombadillo (define-public bombadillo
(package (package