aboutsummaryrefslogtreecommitdiff
;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2021 宋文武 <iyzsong@member.fsf.org>
;;; Copyright © 2023 Antero Mejr <antero@mailbox.org>
;;;
;;; This file is part of GNU Guix.
;;;
;;; GNU Guix is free software; you can redistribute it and/or modify it
;;; under the terms of the GNU General Public License as published by
;;; the Free Software Foundation; either version 3 of the License, or (at
;;; your option) any later version.
;;;
;;; GNU Guix is distributed in the hope that it will be useful, but
;;; WITHOUT ANY WARRANTY; without even the implied warranty of
;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
;;; GNU General Public License for more details.
;;;
;;; You should have received a copy of the GNU General Public License
;;; along with GNU Guix.  If not, see <http://www.gnu.org/licenses/>.

(define-module (gnu packages plan9)
  #:use-module (guix build-system gnu)
  #:use-module (guix git-download)
  #:use-module (guix packages)
  #:use-module (guix gexp)
  #:use-module (guix utils)
  #:use-module ((guix licenses) #:prefix license:)
  #:use-module (gnu packages base)
  #:use-module (gnu packages bash)
  #:use-module (gnu packages fontutils)
  #:use-module (gnu packages freedesktop)
  #:use-module (gnu packages linux)
  #:use-module (gnu packages perl)
  #:use-module (gnu packages pkg-config)
  #:use-module (gnu packages xdisorg)
  #:use-module (gnu packages xorg))

(define-public drawterm
  (let ((revision "1")
        (commit "f11139d4c918802a87730bc14d094670ee4ce572"))
    (package
      (name "drawterm")
      (version (git-version "20240703" revision commit))
      (source
       (origin
         (method git-fetch)
         (uri (git-reference
               (url "git://git.9front.org/plan9front/drawterm")
               (commit commit)))
         (file-name (git-file-name name version))
         (sha256
          (base32 "0ggh5g19899iq9bb5r03bvhamndyai4ylr3ajkbd02xkhz65fh5y"))))
      (build-system gnu-build-system)
      (arguments
       `(#:make-flags (list "CONF=unix"
                            (string-append "CC=" ,(cc-for-target)))
         #:tests? #f                    ; no tests
         #:phases
         (modify-phases %standard-phases
           (delete 'configure)          ; no configure script
           (replace 'install            ; no install target
             (lambda* (#:key outputs #:allow-other-keys)
               (let* ((out (assoc-ref outputs "out"))
                      (bin (string-append out "/bin/"))
                      (man (string-append out "/share/man/man1/")))
                 (install-file "drawterm" bin)
                 (install-file "drawterm.1" man)))))))
      (inputs
       (list libx11 libxt))
      (synopsis "Connect to Plan 9 systems")
      (home-page "https://drawterm.9front.org")
      (description
       "@command{drawterm} is a client for connecting venerable systems to
Plan 9 systems.  It behaves like a Plan 9 kernel and will attempt to
reconstruct a Plan 9 terminal-like experience from a non-Plan 9 system.")
      (license license:expat))))

(define-public drawterm-wayland
  (package
    (inherit drawterm)
    (name "drawterm-wayland")
    (arguments
     (substitute-keyword-arguments (package-arguments drawterm)
       ((#:make-flags _)
        `(list "CONF=linux"
               ,(string-append "CC=" (cc-for-target))))))
    (native-inputs
     (list pkg-config))
    (inputs
     (list libxkbcommon pipewire wayland wayland-protocols wlr-protocols))))

(define-public plan9port
  ;; no releases
  (let ((commit "f8681acb374fa0d5ed1568dbedb00a4abe1ca6f1")
        (revision "1"))
    (package
      (name "plan9port")
      (version (git-version "0.1.0" revision commit))
      (source (origin
                (method git-fetch)
                (uri (git-reference
                      (url "https://github.com/9fans/plan9port")
                      (commit commit)))
                (file-name (git-file-name name version))
                (sha256
                 (base32
                  "01343jvn8kr63i78h8xlgscn6wihdsr44xzh1cylvhigjbqw8n2x"))
                (modules '((guix build utils)))
                (snippet #~(for-each delete-file-recursively
                                     '("font/luc" ;nonfree
                                       "font/lucm" "font/lucsans" "font/pelm")))))
      (build-system gnu-build-system)
      (arguments
       (list #:tests? #f ;no tests
             #:strip-directories #~'("plan9/bin")
             #:phases
             #~(modify-phases %standard-phases
                 (add-after 'unpack 'setup
                   (lambda _
                     (let ((dest (string-append #$output "/plan9")))
                       (delete-file "src/cmd/mk/mk.pdf")
                       (substitute* "src/cmd/acme/acme.c"
                         (("/lib/font/bit/lucsans/euro.8.font")
                          (string-append dest
                                         "/font/fixed/unicode.5x8.font"))
                         (("/lib/font/bit/lucm/unicode.9.font")
                          (string-append dest
                                         "/font/fixed/unicode.6x9.font")))
                       (substitute* (find-files "src")
                         (("/lib/font/bit")
                          (string-append dest "/font")))
                       (substitute* "bin/9c"
                         (("which")
                          (which "which")))
                       (substitute* "src/cmd/fontsrv/freetyperules.sh"
                         (("'\\$i'/freetype2")
                          (string-append "-I"
                                         #$freetype
                                         "/include/freetype2")))
                       (with-output-to-file "LOCAL.config"
                         (lambda _
                           (format #t "CC9=~a~%" #$(cc-for-target))
                           (format #t "FONTSRV=fontsrv~%")))
                       (setenv "X11" #$libx11)
                       (setenv "PLAN9" (getcwd))
                       (setenv "PLAN9_TARGET" dest))))
                 (delete 'configure)    ;no configure
                 (replace 'build
                   (lambda _
                     (invoke "./INSTALL" "-b")))
                 (replace 'install
                   (lambda _
                     (invoke "./INSTALL" "-c")
                     (let ((dest (getenv "PLAN9_TARGET")))
                       (for-each (lambda (x)
                                   (let ((out (string-append dest "/" x)))
                                     (mkdir-p out)
                                     (copy-recursively x out)))
                                 ;; TODO: use external sky and dict packages
                                 '("bin" "face"
                                   "font"
                                   "include"
                                   "lib"
                                   "lp"
                                   "mail"
                                   "man"
                                   "ndb"
                                   "plumb"
                                   "tmac"
                                   "troff"
                                   "postscript"))
                       (install-file "rcmain" dest)
                       (mkdir-p (string-append #$output "/bin"))
                       (symlink (string-append dest "/bin/9")
                                (string-append #$output "/bin/9")))))
                 ;; Plan9 doesn't compress man pages
                 (delete 'compress-documentation))))
      (native-inputs (list perl which))
      (inputs (list bash-minimal                  ;for 'wrap-program'
                    fontconfig libx11 libxext libxt))
      ;; Propagate gcc-toolchain because some programs, like the 9c compiler,
      ;; are just aliased scripts to gcc equivalents.
      (propagated-inputs (list (module-ref (resolve-interface
                                          '(gnu packages commencement))
                                         'gcc-toolchain)))
      (home-page "https://9fans.github.io/plan9port/")
      (synopsis "Port of many Plan 9 libraries and programs")
      (description
       "Plan 9 from User Space (aka plan9port) is a port of many Plan 9
programs from their native Plan 9 environment to Unix-like operating
systems.")
      (license (list license:expat ;modifications
                     license:lpl1.02 ;original Plan9 code
                     license:zlib))))) ;src/cmd/bzip2
cm (kget)[home-page]: Likewise. * gnu/packages/kde-systemtools.scm (dolphin-plugins) (konsole)[home-page]: Likewise. * gnu/packages/kodi.scm (fstrcmp)[home-page]: Likewise. * gnu/packages/language.scm (hime, libchewing)[home-page]: Likewise. * gnu/packages/lego.scm (nqc)[home-page]: Likewise. * gnu/packages/lesstif.scm (lesstif)[home-page]: Likewise. * gnu/packages/libcanberra.scm (libcanberra)[home-page]: Likewise. * gnu/packages/libdaemon.scm (libdaemon)[home-page]: Likewise. * gnu/packages/libffi.scm (libffi)[home-page]: Likewise. * gnu/packages/libreoffice.scm (libwpd, libwpg, libwps)[home-page]: Likewise. * gnu/packages/libusb.scm (libmtp, gmtp)[home-page]: Likewise. * gnu/packages/linux.scm (e2fsprogs, extundelete, lsscsi, net-tools) (kbd, sysfsutils, cpuid, libpfm4)[home-page]: Likewise. * gnu/packages/lisp-check.scm (sbcl-ptester, sbcl-xlunit)[home-page]: Likewise. * gnu/packages/lisp-xyz.scm (sbcl-html-encode, sbcl-py-configparser) (sbcl-cl-utilities, sbcl-series, sbcl-uffi, sbcl-clsql, sbcl-sycamore) (sbcl-osicat, sbcl-hu.dwim.common, sbcl-caveman, sbcl-trivial-shell) (sbcl-trivial-benchmark, sbcl-screamer, sbcl-smug)[home-page]: Likewise. * gnu/packages/lisp.scm (lush2)[home-page]: Likewise. * gnu/packages/logging.scm (log4cpp)[home-page]: Likewise. * gnu/packages/lua.scm (lua-ldoc)[home-page]: Likewise. * gnu/packages/machine-learning.scm (mcl, openfst, rxcpp)[home-page]: Likewise. * gnu/packages/mail.scm (muchsync, procmail, sendmail) (opensmtpd-filter-dkimsign, crm114)[home-page]: Likewise. * gnu/packages/man.scm (libpipeline, man-db)[home-page]: Likewise. * gnu/packages/maths.scm (lapack, scalapack, hdf-eos5, itpp, gmsh) (metamath, p4est, armadillo, suitesparse, atlas, lpsolve, wcalc, why3) (frama-c)[home-page]: Likewise. * gnu/packages/mcrypt.scm (mcrypt, libmcrypt, libmhash)[home-page]: Likewise. * gnu/packages/minetest.scm (minetest-advtrains)[home-page]: Likewise. * gnu/packages/monitoring.scm (python-whisper, python-carbon) (hostscope)[home-page]: Likewise. * gnu/packages/mp3.scm (id3lib, libmp3splt, mp3splt, mpg321) (lame)[home-page]: Likewise. * gnu/packages/multiprecision.scm (mpc)[home-page]: Likewise. * gnu/packages/music.scm (aria-maestosa, lingot, setbfree, bristol) (portmidi, python-pyportmidi, zynaddsubfx, yoshimi, aj-snapshot) (schismtracker, midicsv, midicsv, qmidiarp, qmidiroute, dssi, tap-lv2) (shiru-lv2)[home-page]: Likewise. * gnu/packages/ncurses.scm (stfl)[home-page]: Likewise. * gnu/packages/networking.scm (lksctp-tools, mbuffer, ifstatus, bird) (tunctl, traceroute)[home-page]: Likewise. * gnu/packages/node-xyz.scm (node-mersenne)[home-page]: Likewise. * gnu/packages/ntp.scm (openntpd)[home-page]: Likewise. * gnu/packages/ocaml.scm (opam, hevea, ocaml-menhir, ocaml-piqilib) (ocaml-graph, cubicle)[home-page]: Likewise. * gnu/packages/opencl.scm (python-pyopencl)[home-page]: Likewise. * gnu/packages/package-management.scm (xstow, modules)[home-page]: Likewise. * gnu/packages/parallel.scm (xjobs)[home-page]: Likewise. * gnu/packages/pdf.scm (podofo, qpdf, xournal, impressive)[home-page]: Likewise. * gnu/packages/perl.scm (perl-math-vecstat, perltidy)[home-page]: Likewise. * gnu/packages/photo.scm (libpano13, enblend-enfuse, hugin)[home-page]: Likewise. * gnu/packages/plan9.scm (drawterm)[home-page]: Likewise. * gnu/packages/plotutils.scm (guile-charting, ploticus)[home-page]: Likewise. * gnu/packages/popt.scm (argtable, popt)[home-page]: Likewise. * gnu/packages/profiling.scm (otf2)[home-page]: Likewise. * gnu/packages/pulseaudio.scm (pulseaudio)[home-page]: Likewise. * gnu/packages/python-check.scm (python-mypy)[home-page]: Likewise. * gnu/packages/python-web.scm (python-cssutils) (python-translationstring)[home-page]: Likewise. * gnu/packages/python-xyz.scm (python-diskcache, python-doxyqml) (python-docutils, python-pexpect, python-importlib-resources) (python-simplegeneric, python-urwid, python-xlrd, python-xlwt) (python-pyasn1, python-pythondialog, python-tftpy, python-random2) (python-arcp, python-pyopengl, python-sortedcollections) (python-sortedcontainers, python-yapsy, python-pydispatcher) (python-posix-ipc)[home-page]: Likewise. * gnu/packages/qt.scm (qwt, libqglviewer, signond)[home-page]: Likewise. * gnu/packages/radio.scm (unixcw, gnuais)[home-page]: Likewise. * gnu/packages/raspberry-pi.scm (bcm2835)[home-page]: Likewise. * gnu/packages/rdf.scm (clucene, rasqal, redland)[home-page]: Likewise. * gnu/packages/regex.scm (tre)[home-page]: Likewise. * gnu/packages/rsync.scm (librsync)[home-page]: Likewise. * gnu/packages/ruby.scm (ruby-packnga, ruby-nokogiri, ruby-oj, ruby-ox) (ruby-sinatra, ruby-citrus, ruby-cbor, ruby-roda)[home-page]: Likewise. * gnu/packages/scheme.scm (scheme48, tinyscheme)[home-page]: Likewise. * gnu/packages/screen.scm (dtach)[home-page]: Likewise. * gnu/packages/scsi.scm (sg3-utils)[home-page]: Likewise. * gnu/packages/sdl.scm (libmikmod, sdl-pango)[home-page]: Likewise. * gnu/packages/shellutils.scm (hstr, rig)[home-page]: Likewise. * gnu/packages/simulation.scm (python-dolfin-adjoint)[home-page]: Likewise. * gnu/packages/smalltalk.scm (smalltalk)[home-page]: Likewise. * gnu/packages/speech.scm (espeak)[home-page]: Likewise. * gnu/packages/stalonetray.scm (stalonetray)[home-page]: Likewise. * gnu/packages/statistics.scm (jags, r-mass, r-class, r-lattice) (r-matrix, r-nnet, r-spatial, r-bit, r-bit64, r-digest, r-xtable) (python-statsmodels, r-ade4, r-latticeextra, r-rcurl, r-xml, r-mvtnorm) (r-robustbase, r-minqa, r-fdrtool, java-jdistlib, xlispstat)[home-page]: Likewise. * gnu/packages/swig.scm (swig)[home-page]: Likewise. * gnu/packages/task-management.scm (wtime)[home-page]: Likewise. * gnu/packages/tcl.scm (itcl, tclxml, tclx)[home-page]: Likewise. * gnu/packages/terminals.scm (libtermkey, mlterm, libvterm) (libvterm)[home-page]: Likewise. * gnu/packages/tex.scm (texlive-lm, texlive-lm-math, texlive-cs) (texlive-csplain, biber, texmaker)[home-page]: Likewise. * gnu/packages/text-editors.scm (joe)[home-page]: Likewise. * gnu/packages/textutils.scm (drm-tools, docx2txt)[home-page]: Likewise. * gnu/packages/tv.scm (tvtime)[home-page]: Likewise. * gnu/packages/unicode.scm (libunibreak)[home-page]: Likewise. * gnu/packages/upnp.scm (libupnp)[home-page]: Likewise. * gnu/packages/version-control.scm (cvs)[home-page]: Likewise. * gnu/packages/video.scm (transcode, libquicktime, mjpegtools, aalib) (liba52, libmpeg2, x265, libdv, dvdauthor, aegisub, pitivi, gavl) (dvdbackup, guvcview, video-contact-sheet)[home-page]: Likewise. * gnu/packages/virtualization.scm (bochs)[home-page]: Likewise. * gnu/packages/w3m.scm (w3m)[home-page]: Likewise. * gnu/packages/web.scm (qjson, libquvi-scripts, libquvi, quvi) (tidy-html, htmlcxx)[home-page]: Likewise. * gnu/packages/wm.scm (evilwm, menumaker)[home-page]: Likewise. * gnu/packages/wv.scm (wv)[home-page]: Likewise. * gnu/packages/wxwidgets.scm (wxsvg)[home-page]: Likewise. * gnu/packages/xdisorg.scm (mtdev, xsel)[home-page]: Likewise. * gnu/packages/xfig.scm (xfig, transfig)[home-page]: Likewise. * gnu/packages/xml.scm (openjade, python-pyxb, xmlstarlet, xmlrpc-c) (opensp)[home-page]: Likewise. * gnu/packages/xorg.scm (xf86-video-qxl)[home-page]: Likewise. Tobias Geerinckx-Rice 2023-02-12gnu: hunspell-dictionary: Update to 7.5.0.3....* gnu/packages/hunspell.scm (hunspell-dictionary): Update to 7.5.0.3. Efraim Flashner 2023-02-12gnu: Add hunspell-dict-he-il....* gnu/packages/hunspell.scm (hunspell-dict-he-il): New variable. Efraim Flashner 2023-02-12gnu: hunspell-dictionary: Update to 7.4.5.1....* gnu/packages/hunspell.scm (hunspell-dictionary): Update to 7.4.5.1. Efraim Flashner 2023-01-04gnu: hunspell: Move hunspell and dictionaries to hunspell module....Consolidate hunspell and its dictionaries into the (gnu packages hunspell) module instead of having them scattered about. * gnu/packages/aspell.scm (aspell-word-list, define-word-list-dictionary, hunspell-dict-{en, en-au, en-gb, en-gb-ize, en-us}): Remove variables. * gnu/packages/libreoffice.scm (hunspell, dicollecte-french-dictionary, define-french-dictionary, hunspell-dict-fr-{classique, moderne, réforme, toutes-variantes}, hunspell-dict-pl, hunspell-dict-de, hunspell-dict-hu): Remove variables. * gnu/packages/hunspell.scm (hunspell, dicollecte-french-dictionary, define-french-dictionary, hunspell-dict-fr-{classique, moderne, réforme, toutes-variantes}, hunspell-dict-pl, hunspell-dict-de, hunspell-dict-hu, aspell-word-list, define-word-list-dictionary, hunspell-dict-{en, en-au, en-gb, en-gb-ize, en-us}): Add variables. (hunspell-dictionary): Explicitly declare upstream libreoffice version to prevent circular dependency. * gnu/packages/ebook.scm, gnu/packages/enchant.scm, gnu/packages/freedesktop.scm, gnu/packages/gnuzilla.scm, gnu/packages/kde-frameworks.scm, gnu/packages/messaging.scm, gnu/packages/scribus.scm, gnu/packages/task-management.scm, gnu/packages/telegram.scm, gnu/packages/tex.scm, gnu/packages/text-editors.scm, gnu/packages/video.scm: Adjust module imports. Brian Cully