X-Git-Url: https://git.hcoop.net/jackhill/guix/guix.git/blobdiff_plain/6cbee49d6668eb7fd738080666f66febfce8c7e8..bfb22078fd3a184f60968938851ada97d7dead58:/gnu/packages/terminals.scm diff --git a/gnu/packages/terminals.scm b/gnu/packages/terminals.scm index efc57d36ed..5cdc081398 100644 --- a/gnu/packages/terminals.scm +++ b/gnu/packages/terminals.scm @@ -1,5 +1,5 @@ ;;; GNU Guix --- Functional package management for GNU -;;; Copyright © 2015, 2016, 2017 Efraim Flashner +;;; Copyright © 2015, 2016, 2017, 2018 Efraim Flashner ;;; Copyright © 2016 Mckinley Olsen ;;; Copyright © 2016, 2017 Alex Griffin ;;; Copyright © 2016 David Craven @@ -10,6 +10,7 @@ ;;; Copyright © 2017 Ricardo Wurmus ;;; Copyright © 2017 Petter ;;; Copyright © 2018 Hartmut Goebel +;;; Copyright © 2018 Arun Isaac ;;; ;;; This file is part of GNU Guix. ;;; @@ -47,6 +48,7 @@ #:use-module (gnu packages glib) #:use-module (gnu packages gnome) #:use-module (gnu packages gtk) + #:use-module (gnu packages libevent) #:use-module (gnu packages linux) #:use-module (gnu packages ncurses) #:use-module (gnu packages perl) @@ -55,6 +57,8 @@ #:use-module (gnu packages python) #:use-module (gnu packages python-web) #:use-module (gnu packages qt) + #:use-module (gnu packages serialization) + #:use-module (gnu packages ssh) #:use-module (gnu packages textutils) #:use-module (gnu packages wm) #:use-module (gnu packages xdisorg) @@ -65,22 +69,21 @@ (define-public tilda (package (name "tilda") - (version "1.3.3") + (version "1.4.1") (source (origin (method url-fetch) (uri (string-append "https://github.com/lanoxx/tilda/archive/" "tilda-" version ".tar.gz")) (sha256 (base32 - "1cc4qbg1m3i04lj5p6i6xbd0zvy1320pxdgmjhz5p3j95ibsbfki")))) + "0w2hry2bqcqrkik4l100b1a9jlsih6sq8zwhfpl8zzfq20i00lfs")))) (build-system glib-or-gtk-build-system) (arguments - `(#:phases (modify-phases %standard-phases - (add-before 'patch-source-shebangs 'autogen - (lambda _ ; Avoid running ./configure. - (substitute* "autogen.sh" - (("^.*\\$srcdir/configure.*") "")) - (zero? (system* "sh" "autogen.sh"))))))) + '(#:phases (modify-phases %standard-phases + (replace 'bootstrap + (lambda _ + (setenv "NOCONFIGURE" "true") + (invoke "sh" "autogen.sh")))))) (native-inputs `(("autoconf" ,autoconf) ("automake" ,automake) @@ -128,9 +131,9 @@ configurable through a graphical wizard.") (string-append "DESTDIR=" (assoc-ref %outputs "out"))))) (inputs - `(("vte", vte-ng) - ("gtk+", gtk+) - ("ncurses", ncurses))) + `(("vte" ,vte-ng) + ("gtk+" ,gtk+) + ("ncurses" ,ncurses))) (native-inputs `(("pkg-config" ,pkg-config))) @@ -293,10 +296,10 @@ multi-seat support, a replacement for @command{mingetty}, and more.") #:phases (modify-phases %standard-phases (delete 'configure)) #:test-target "test")) - (inputs `(("ncurses", ncurses))) - (native-inputs `(("libtool", libtool) + (inputs `(("ncurses" ,ncurses))) + (native-inputs `(("libtool" ,libtool) ("perl-test-harness" ,perl-test-harness) - ("pkg-config", pkg-config))) + ("pkg-config" ,pkg-config))) (synopsis "Keyboard entry processing library for terminal-based programs") (description "Libtermkey handles all the necessary logic to recognise special keys, UTF-8 @@ -442,11 +445,11 @@ embedded kernel situations.") (license license:expat))) (define-public cool-retro-term - (let ((commit "e48719fa44e5307df71dbd0fad234f8a6a53f863") + (let ((commit "dd799cf5c0eda92cf44f3938c0c2dcae5651a99e") (revision "1")) (package (name "cool-retro-term") - (version (string-append "1.0.0-" revision "." (string-take commit 7))) + (version (string-append "1.0.1-" revision "." (string-take commit 7))) (source (origin (method git-fetch) (file-name (string-append name "-" version "-checkout")) @@ -455,35 +458,111 @@ embedded kernel situations.") (commit commit) (recursive? #t))) (sha256 - (base32 "1sgqbirninkvgwchr35zgn5vzqvsmrf3cp7lqady1xgrawb8lsz3")) + (base32 "08mrvj8zk9ck15q90ipjzza1acnnsjhprv2rxg8yyck0xl9p40jd")) (patches - (search-patches "cool-retro-term-remove-non-free-fonts.patch" - "cool-retro-term-fix-array-size.patch" + (search-patches "cool-retro-term-fix-array-size.patch" "cool-retro-term-dont-check-uninit-member.patch" "cool-retro-term-memory-leak-1.patch")) - (modules '((guix build utils))) + (modules '((guix build utils) + (srfi srfi-1) + (srfi srfi-26) + (ice-9 rdelim) + (ice-9 regex))) (snippet - '(begin + '(let* ((fonts '(;"1971-ibm-3278" ; BSD 3-clause + ;"1975-knight-tv" ; GPL + "1977-apple2" ; Non-Free + "1977-commodore-pet" ; Non-Free + "1979-atari-400-800" ; Non-Free + "1982-commodore64" ; Non-Free + "1985-atari-st" ; ? + "1985-ibm-pc-vga" ; Unclear + ;"modern-fixedsys-excelsior" ; Redistributable + ;"modern-hermit" ; SIL + ;"modern-inconsolata"; SIL + ;"modern-pro-font-win-tweaked" ; X11 + ;"modern-proggy-tiny"; X11 + ;"modern-terminus" ; SIL + "modern-monaco")) ; Apple Non-Free + (name-rx (make-regexp " *name: *\"([^\"]*)\"")) + (source-rx (make-regexp " *source: \"fonts/([^/]*)[^\"]*\"")) + (fontname-rx (make-regexp "\"fontName\":\"([^\"]*).*")) + (names + ;; Gather font names from all Fonts*.qml files. + ;; These will be used to remove items from the + ;; default profiles. + (fold + (lambda (font-file names) + (call-with-input-file font-file + (lambda (port) + (let loop ((name #f) (names names)) + (let ((line (read-line port))) + (cond + ((eof-object? line) (pk 'names names)) + ((regexp-exec name-rx line) + => (lambda (m) + (loop (match:substring m 1) names))) + ((regexp-exec source-rx line) + => (lambda (m) + (let ((font (match:substring m 1))) + (if (member font fonts) + (loop #f (lset-adjoin string=? + names name)) + (loop #f names))))) + (else (loop name names)))))))) + '() (find-files "app/qml" "Font.*\\.qml")))) + ;; Remove the font files themselves (for-each (lambda (font) (delete-file-recursively - (string-append "app/qml/fonts/" font)) - (substitute* '("app/qml/resources.qrc") - (((string-append "fonts/" font ".*")) - ""))) - '(;;"1971-ibm-3278" ; BSD 3-clause - "1977-apple2" ; Non-Free - "1977-commodore-pet" ; Non-Free - "1979-atari-400-800" ; Non-Free - "1982-commodore64" ; Non-Free - "1985-atari-st" ; ? - "1985-ibm-pc-vga" ; Unclear - ;;"modern-fixedsys-excelsior" ; Redistributable - ;;"modern-hermit" ; SIL - ;;"modern-inconsolata" ; SIL - ;;"modern-pro-font-win-tweaked" ; X11 - ;;"modern-proggy-tiny" ; X11 - ;;"modern-terminus" ; SIL - "modern-monaco")) ; Apple non-free + (string-append "app/qml/fonts/" font))) + fonts) + ;; Remove mention of those fonts in the source + (substitute* "app/qml/resources.qrc" + (((string-append " *fonts/(" + (string-join fonts "|") + ").*")) + "")) + (for-each + (lambda (file) + (let ((start-rx (make-regexp " *ListElement\\{")) + (end-rx (make-regexp " *\\}"))) + (with-atomic-file-replacement file + (lambda (in out) + (let loop ((line-buffer '()) + (hold? #f) + (discard? #f)) + (let ((line (read-line in 'concat))) + (cond + ((eof-object? line) #t) ;done + ((regexp-exec start-rx line) + (loop (cons line line-buffer) #t #f)) + ((or (regexp-exec source-rx line) + (regexp-exec fontname-rx line)) + => (lambda (m) + (let ((font-or-name (match:substring m 1))) + (if (or (member font-or-name fonts) + (member font-or-name names)) + (loop '() #f #t) + (loop (cons line line-buffer) + hold? #f))))) + ((regexp-exec end-rx line) + (unless discard? + (for-each (cut display <> out) + (reverse line-buffer)) + (display line out)) + (loop '() #f #f)) + (hold? (loop (cons line line-buffer) + hold? discard?)) + (discard? (loop line-buffer #f #t)) + (else (display line out) + (loop '() #f #f))))))))) + '("app/qml/FontPixels.qml" + "app/qml/FontScanlines.qml" + "app/qml/Fonts.qml" + "app/qml/ApplicationSettings.qml")) + ;; Final substitution for default scanline and pixel fonts + (substitute* "app/qml/ApplicationSettings.qml" + (("COMMODORE_PET") "PROGGY_TINY")) #t)))) (build-system gnu-build-system) (inputs @@ -496,46 +575,37 @@ embedded kernel situations.") (modify-phases %standard-phases (replace 'configure (lambda* (#:key outputs #:allow-other-keys) - (let* ((out (assoc-ref outputs "out")) - (share (string-append out "/share"))) + (let ((out (assoc-ref outputs "out"))) (substitute* '("qmltermwidget/qmltermwidget.pro") (("INSTALL_DIR = \\$\\$\\[QT_INSTALL_QML\\]") (string-append "INSTALL_DIR = " out "/lib/qt5/qml"))) - (substitute* '("app/app.pro") - (("target.path \\+= /usr") - (string-append "target.path += " out)) - (("icon32.path = /usr/share") - (string-append "icon32.path = " share)) - (("icon64.path = /usr/share") - (string-append "icon64.path = " share)) - (("icon128.path = /usr/share") - (string-append "icon128.path = " share)) - (("icon256.path = /usr/share") - (string-append "icon256.path = " share))) - (zero? (system* "qmake"))))) - (add-before 'install 'fix-Makefiles - (lambda* (#:key outputs #:allow-other-keys) - (let* ((out (assoc-ref outputs "out"))) - (substitute* '("Makefile") - (("\\$\\(INSTALL_ROOT\\)/usr") out))))) + (substitute* '("cool-retro-term.pro" "app/app.pro") + (("/usr") out)) + (invoke "qmake")))) (add-after 'install 'wrap-executable (lambda* (#:key inputs outputs #:allow-other-keys) - (let* ((out (assoc-ref outputs "out")) - (qml "/lib/qt5/qml")) + (let ((out (assoc-ref outputs "out")) + (qml "/lib/qt5/qml")) (wrap-program (string-append out "/bin/cool-retro-term") `("QML2_IMPORT_PATH" ":" prefix (,(string-append out qml) - ,(string-append - (assoc-ref inputs "qtdeclarative") qml) - ,(string-append - (assoc-ref inputs "qtgraphicaleffects") qml) - ,(string-append - (assoc-ref inputs "qtquickcontrols") qml))))))) + ,@(map (lambda (i) + (string-append (assoc-ref inputs i) qml)) + '("qtdeclarative" + "qtgraphicaleffects" + "qtquickcontrols"))))) + #t))) (add-after 'install 'add-alternate-name (lambda* (#:key outputs #:allow-other-keys) - (let* ((bin (string-append (assoc-ref outputs "out") "/bin"))) + (let ((bin (string-append (assoc-ref outputs "out") "/bin"))) (symlink (string-append bin "/cool-retro-term") - (string-append bin "/crt")))))))) + (string-append bin "/crt"))))) + (add-after 'install 'install-man + (lambda* (#:key outputs #:allow-other-keys) + (let ((mandir (string-append (assoc-ref outputs "out") + "/share/man/man1"))) + (install-file "packaging/debian/cool-retro-term.1" mandir) + #t)))))) (synopsis "Terminal emulator") (description "Cool-retro-term (crt) is a terminal emulator which mimics the look and @@ -553,7 +623,7 @@ eye-candy, customizable, and reasonably lightweight.") (define-public sakura (package (name "sakura") - (version "3.5.0") + (version "3.6.0") (source (origin (method url-fetch) (uri (string-append "https://launchpad.net/" name "/trunk/" @@ -561,14 +631,13 @@ eye-candy, customizable, and reasonably lightweight.") ".tar.bz2")) (sha256 (base32 - "0fhcn3540iw22l5zg3njh5z8cj0g2n9p6fvagjqa5zc323jfsc7b")))) + "1q463qm41ym7jb3kbzjz7b6x549vmgkb70arpkhsf86yxly1y5m1")))) (build-system cmake-build-system) (arguments - ;; no check phase - '(#:tests? #f)) + '(#:tests? #f)) ; no check phase (native-inputs `(("gettext" ,gettext-minimal) - ("perl" ,perl) ; for pod2man + ("perl" ,perl) ; for pod2man ("pkg-config" ,pkg-config))) (inputs `(("libxft" ,libxft) @@ -695,7 +764,7 @@ terminal or piped input.") (delete-file "tests/test_input_output.py") #t))))) (propagated-inputs - `(("python-wcwidth", python-wcwidth))) + `(("python-wcwidth" ,python-wcwidth))) (native-inputs `(("python-pytest-runner" ,python-pytest-runner) ("python-pytest" ,python-pytest))) @@ -765,7 +834,7 @@ than a terminal.") (invoke "nosetests" "-v")))))) (propagated-inputs `(("python-blessings" ,python-blessings) - ("python-wcwidth", python-wcwidth))) + ("python-wcwidth" ,python-wcwidth))) (native-inputs `(("python-mock" ,python-mock) ("python-pyte" ,python-pyte) @@ -780,3 +849,33 @@ per-line fullscreen terminal rendering, and keyboard input event reporting.") (define-public python2-curtsies (package-with-python2 python-curtsies)) + +(define-public tmate + (package + (name "tmate") + (version "2.2.1") + (source + (origin + (method url-fetch) + (uri (string-append "https://github.com/tmate-io/tmate/archive/" + version ".tar.gz")) + (file-name (string-append name "-" version ".tar.gz")) + (sha256 + (base32 + "01f3hhm3x0sd6apyb1ajkjfdfvq5m2759w00yp2slr9fyicsrhnr")))) + (build-system gnu-build-system) + (inputs + `(("libevent" ,libevent) + ("libssh" ,libssh) + ("msgpack" ,msgpack) + ("ncurses" ,ncurses))) + (native-inputs + `(("autoconf" ,autoconf) + ("automake" ,automake) + ("pkg-config" ,pkg-config))) + (home-page "https://tmate.io/") + (synopsis "Terminal sharing application") + (description "tmate is a terminal sharing application that allows you to +share your terminal with other users over the Internet. tmate is a fork of +tmux.") + (license license:isc)))