aboutsummaryrefslogtreecommitdiff
;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2019 L  p R n  d n <guix@lprndn.info>
;;; Copyright © 2021 Guillaume Le Vaillant <glv@posteo.net>
;;; Copyright © 2023, 2024 Ahmad Draidi <a.r.draidi@redscript.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 arcan)
  #:use-module (guix build-system cmake)
  #:use-module (guix build-system copy)
  #:use-module (guix build-system meson)
  #:use-module (guix build-system gnu)
  #:use-module (guix gexp)
  #:use-module (guix git-download)
  #:use-module ((guix licenses) #:prefix license:)
  #:use-module (guix packages)
  #:use-module (guix utils)
  #:use-module (gnu packages)
  #:use-module (gnu packages audio)
  #:use-module (gnu packages autotools)
  #:use-module (gnu packages base)
  #:use-module (gnu packages bash)
  #:use-module (gnu packages compression)
  #:use-module (gnu packages databases)
  #:use-module (gnu packages fonts)
  #:use-module (gnu packages fontutils)
  #:use-module (gnu packages freedesktop)
  #:use-module (gnu packages gl)
  #:use-module (gnu packages gtk)
  #:use-module (gnu packages image)
  #:use-module (gnu packages libusb)
  #:use-module (gnu packages linux)
  #:use-module (gnu packages lua)
  #:use-module (gnu packages ocr)
  #:use-module (gnu packages onc-rpc)
  #:use-module (gnu packages pcre)
  #:use-module (gnu packages pdf)
  #:use-module (gnu packages pkg-config)
  #:use-module (gnu packages ruby)
  #:use-module (gnu packages sdl)
  #:use-module (gnu packages speech)
  #:use-module (gnu packages sqlite)
  #:use-module (gnu packages tls)
  #:use-module (gnu packages video)
  #:use-module (gnu packages vnc)
  #:use-module (gnu packages web)
  #:use-module (gnu packages xdisorg)
  #:use-module (gnu packages xorg)
  #:use-module (srfi srfi-1))

(define-public arcan
  (package
    (name "arcan")
    (version "0.6.3")
    (source (origin
              (method git-fetch)
              (file-name (git-file-name name version))
              (uri (git-reference
                    (url "https://github.com/letoram/arcan")
                    (commit version)))
              (sha256
               (base32
                "1aj8hffxsf6vg1al2v29cn35wnh7wir5x9krk4h68sy5va88w8k5"))
              (modules '((guix build utils)))
              (snippet
               ;; Remove some bundled packages.
               #~(begin
                   (delete-file-recursively "external/git")
                   (delete-file-recursively "external/lua")
                   (delete-file-recursively "external/sqlite")))))
    (build-system cmake-build-system)
    (arguments
     (list #:configure-flags #~'("-DBUILD_PRESET=everything"
                                 "-DDISTR_TAG='Guix'")
           #:phases #~(modify-phases %standard-phases
                        (add-after 'unpack 'patch-paths
                          (lambda* (#:key outputs #:allow-other-keys)
                            (substitute* "src/platform/posix/paths.c"
                              (("/usr/local")
                               (assoc-ref outputs "out")))))
                        ;; Normally, it tries to fetch patched openal with git
                        ;; but copying files manually in the right place seems
                        ;; to work too.
                        (add-after 'unpack 'prepare-static-openal
                          (lambda* (#:key inputs #:allow-other-keys)
                            (let ((arcan-openal (assoc-ref inputs
                                                           "arcan-openal")))
                              (copy-recursively arcan-openal
                                                "external/git/openal")) #t))
                        (add-after 'prepare-static-openal 'generate-man
                          (lambda _
                            (with-directory-excursion "doc"
                              (invoke "ruby" "docgen.rb" "mangen")) #t))
                        (add-before 'configure 'chdir
                          (lambda _
                            (chdir "src") #t)))
           #:tests? #f))
    (inputs `(("bash-minimal" ,bash-minimal)
              ("espeak" ,espeak)
              ("ffmpeg" ,ffmpeg)
              ("freetype" ,freetype)
              ("gumbo-parser" ,gumbo-parser)
              ("harfbuzz" ,harfbuzz)
              ("jbig2dec" ,jbig2dec)
              ("leptonica" ,leptonica)
              ("libdrm" ,libdrm)
              ("libjpeg-turbo" ,libjpeg-turbo)
              ("libseccomp" ,libseccomp)
              ("libusb" ,libusb)
              ("libvnc" ,libvnc)
              ("libxkbcommon" ,libxkbcommon)
              ("luajit" ,luajit)
              ("mupdf" ,mupdf)
              ("openal" ,openal)
              ("openjpeg" ,openjpeg)
              ("sdl2" ,sdl2)
              ("sqlite" ,sqlite)
              ("tesseract-ocr" ,tesseract-ocr)
              ("vlc" ,vlc)
              ("wayland" ,wayland)
              ("wayland-protocols" ,wayland-protocols)
              ("xcb-util" ,xcb-util)
              ("xcb-util-wm" ,xcb-util-wm)
              ("zlib" ,zlib)
              ;; To build arcan_lwa, we need a patched version of openal.
              ;; https://github.com/letoram/arcan/wiki/packaging
              ("arcan-openal"
               ,(origin
                  (method git-fetch)
                  (file-name "arcan-openal-0.6.2")
                  (uri (git-reference (url
                                       "https://github.com/letoram/openal")
                                      (commit "0.6.2")))
                  (sha256
                   (base32
                    "0vg3fda47q2dk1n43ijcc64q39z044pa8h6scmfyi22g6r6bfw2z"))))))
    (native-inputs (list pkg-config ruby)) ;For documentation and testing
    (home-page "https://arcan-fe.com")
    (synopsis "Display server, multimedia framework and game engine")
    (description
     "Arcan is a development framework for creating virtually
anything from user interfaces for specialized embedded applications
all the way to full-blown desktop environments.  At its heart lies a multimedia
engine with a Lua scripting interface.")
    ;; https://github.com/letoram/arcan/blob/master/COPYING
    (license (list license:asl2.0
                   license:bsd-3
                   license:cc-by3.0
                   license:expat
                   license:gpl2+
                   license:lgpl2.0
                   license:lgpl2.0+
                   license:public-domain
                   license:silofl1.1
                   license:zlib))))

(define-public arcan-sdl
  (package
    (inherit arcan)
    (name "arcan-sdl")
    (inputs
     (modify-inputs (package-inputs arcan)
       (delete "libdrm")
       (prepend glu libglvnd mesa sdl2)))
    (arguments
     `(,@(ensure-keyword-arguments
          (package-arguments arcan)
          '(#:configure-flags
            '("-DCMAKE_C_FLAGS=-fcommon"
              "-DHYBRID_SDL=on" "-DBUILTIN_LUA=off"
              "-DSTATIC_OPENAL=off" "-DDISABLE_JIT=off"
              "-DENABLE_LWA=on" "-DSTATIC_SQLITE3=off"
              "-DSTATIC_FREETYPE=off" "-DSHMIF_TUI_ACCEL=on")))))
    (synopsis "Combined display server, multimedia framework and game engine (SDL)")))

(define-public durden
  ;; Match Arcan 0.6.3
  (let ((commit "a8938b9c835f55bedc2c42aec4ddc5c9739eb949")
        (revision "1"))
    (package
      (name "durden")
      (version (git-version "0.6.1" revision commit))
      (source
       (origin
         (method git-fetch)
         (file-name (git-file-name name version))
         (uri (git-reference
               (url "https://github.com/letoram/durden")
               (commit commit)))
         (sha256
          (base32 "1ybi6x2kwn597kjqycrqmlvp6z79yv2jfwzgx937wcckm55xlpvk"))
         (patches (search-patches "durden-shadow-arcan.patch"))))
      (build-system copy-build-system)
      (arguments
       (list
        #:install-plan #~'(("durden/" "share/arcan/appl/durden/")
                           ("util/" "share/arcan/appl/durden/util/")
                           ("distr/durden" "bin/durden"))
        #:phases #~(modify-phases %standard-phases
                     (add-after 'unpack 'patch-paths
                       (lambda* (#:key inputs outputs #:allow-other-keys)
                         (substitute* "distr/durden"
                           (("/usr/share/\\$applname")
                            (string-append (assoc-ref outputs "out")
                                           "/share/arcan/appl"))
                           (("@ARCAN_STORE_PATH@")
                            (string-append (assoc-ref inputs "arcan")
                                           "/bin/arcan"))
                           (("([\\([:blank:]]+)basename " _ separator)
                            (string-append separator
                                           (assoc-ref inputs "coreutils")
                                           "/bin/basename "))
                           (("([\\([:blank:]]+)date " _ separator)
                            (string-append separator
                                           (assoc-ref inputs "coreutils")
                                           "/bin/date "))
                           (("([\\([:blank:]]+)ln " _ separator)
                            (string-append separator
                                           (assoc-ref inputs "coreutils")
                                           "/bin/ln "))
                           (("([\\([:blank:]]+)mkdir " _ separator)
                            (string-append separator
                                           (assoc-ref inputs "coreutils")
                                           "/bin/mkdir "))
                           (("([\\([:blank:]]+)true; " _ separator)
                            (string-append separator
                                           (assoc-ref inputs "coreutils")
                                           "/bin/true; "))
                           (("([\\([:blank:]]+)\\[ " _ separator)
                            (string-append separator
                                           (assoc-ref inputs "coreutils")
                                           "/bin/[ "))))))))
      (inputs (list arcan coreutils))
      (home-page "https://durden.arcan-fe.com/")
      (synopsis "Desktop Environment for Arcan")
      (description
       "Durden is a desktop environment for the Arcan Display Server.
It serves both as a reference showcase on how to take advantage of some of the
features in Arcan, and as an entry to the advanced-user side of the desktop
environment spectrum.")
      (license (list license:bsd-3 license:expat license:cc-by3.0
                     license:cc-by4.0 license:asl2.0)))))

(define-public xarcan
  (package
    (name "xarcan")
    (version "0.6.3")
    (source
     (origin
       (method git-fetch)
       (file-name (git-file-name name version))
       (uri (git-reference
             (url "https://github.com/letoram/xarcan")
             (commit version)))
       (sha256
        (base32 "1g24mmwnc45ig0x8jk0v91488k8933w07vxi4305sla56q4n82p4"))))
    (build-system meson-build-system)
    (arguments
     (list
      #:configure-flags
      #~(list
         "-Dglamor=true" "-Dint10=false"
         "-Dipv6=true"
         "-Dsystemd_logind=false"

         ;; The following arguments were taken from the Xwayland package.

         ;; The build system insist on providing a default font path; give
         ;; that of dejavu, the same used for our fontconfig package.
         (string-append "-Ddefault_font_path="
                        #$(this-package-input "font-dejavu") "/share/fonts")
         (string-append "-Dxkb_dir=" #$(this-package-input "xkeyboard-config")
                        "/share/X11/xkb")
         (string-append "-Dxkb_bin_dir=" #$(this-package-input "xkbcomp")
                        "/bin")
         (format #f "-Dbuilder_string=\"Build ID: ~a ~a\"" #$name #$version))))
    (native-inputs
     (list pkg-config autoconf automake libtool util-macros))
    (inputs
     (list arcan
           font-dejavu
           font-util
           libdrm
           libepoxy
           libtirpc
           libx11
           libxfont2
           libxkbfile
           libxshmfence
           mesa
           openssl
           pixman
           xcb-util
           xcb-util-wm
           xkbcomp
           xkeyboard-config
           xorgproto
           xtrans))
    (home-page "https://arcan-fe.com")
    (synopsis "Patched Xserver that bridges connections to Arcan")
    (description "Patched Xserver with a KDrive backend that uses the arcan-shmif
 to map Xlib/Xcb/X clients to a running arcan instance.  It allows running an X session
as a window under Arcan.")
    (license (list license:bsd-3 license:expat))))

;; Package was merged into arcan in upstream.
(define-public arcan-wayland
  (deprecated-package "arcan-wayland" arcan))
ge]: 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-01-30Merge remote-tracking branch 'origin/master' into core-updates... Conflicts: doc/guix.texi gnu/local.mk gnu/packages/admin.scm gnu/packages/base.scm gnu/packages/chromium.scm gnu/packages/compression.scm gnu/packages/databases.scm gnu/packages/diffoscope.scm gnu/packages/freedesktop.scm gnu/packages/gnome.scm gnu/packages/gnupg.scm gnu/packages/guile.scm gnu/packages/inkscape.scm gnu/packages/llvm.scm gnu/packages/openldap.scm gnu/packages/pciutils.scm gnu/packages/ruby.scm gnu/packages/samba.scm gnu/packages/sqlite.scm gnu/packages/statistics.scm gnu/packages/syndication.scm gnu/packages/tex.scm gnu/packages/tls.scm gnu/packages/version-control.scm gnu/packages/xml.scm guix/build-system/copy.scm guix/scripts/home.scm Efraim Flashner 2023-01-22gnu: doc++: Use HTTPS home page....* gnu/packages/documentation.scm (doc++)[home-page]: Use HTTPS. Tobias Geerinckx-Rice 2023-01-16gnu: latex2html: Update to 2022.2, use new package style....* gnu/packages/documentation.scm (latex2html): Update to 2022.2. [arguments]: Use G-expressions. Remove trailing #t. Use #$output instead of assoc-ref. Signed-off-by: Christopher Baines <mail@cbaines.net> kiasoc5 2022-12-06gnu: Add pod2pdf....* gnu/packages/documentation.scm (pod2pdf): New variable. Efraim Flashner 2022-09-08gnu: doxygen: Update to 1.9.5....* gnu/packages/documentation.scm (doxygen): Update to 1.9.5. [source](patches): Remove. * gnu/packages/patches/doxygen-support-gcc-12.patch: Delete file. * gnu/local.mk (dist_patch_DATA): Adjust accordingly. Marius Bakke 2022-09-01gnu: doxygen: Fix build with GCC-12....* gnu/packages/patches/doxygen-support-gcc-12.patch: New file. * gnu/local.mk: Add it. * gnu/packages/documentation.scm (doxygen)[source]: Add patch. Signed-off-by: Marius Bakke <marius@gnu.org> Greg Hogan 2022-08-27Merge branch 'staging' into core-updatesMarius Bakke 2022-08-14gnu: Remove ‘open source’ from package descriptions....Also do some (trivial) editing where appropriate. * gnu/packages/bioconductor.scm (r-anaquin, r-rcppnumerical) [description]: Remove superfluous ‘open source’. * gnu/packages/debian.scm (apt-mirror)[description]: Likewise. Add @acronym{}. Drop obscure Ubuntu for famous Trisquel. Reorder. * gnu/packages/documentation.scm (scrollkeeper)[description]: Remove superfluous ‘open systems’. Keep ‘Open Source’ in standard name. * gnu/packages/engineering.scm (freecad, cura-engine)[description]: Remove superfluous ‘open source’ and excessive puffery. * gnu/packages/firmware.scm (make-opensbi-package) [synopsis]: Remove ‘Open Source’. Use @acronym{}. [description]: Fix first sentence to follow guidelines. Use @acronym{}. * gnu/packages/game-development.scm (ioquake3, recastnavigation): [description]: Remove ‘open source’. * gnu/packages/graphics.scm (skia)[description]: Likewise. * gnu/packages/lisp-xyz.scm (sbcl-s-sysdeps)[description]: Likewise. * gnu/packages/machine-learning.scm (onnx)[description]: Likewise. Use @acronym{}. * gnu/packages/ocaml.scm (ocaml-cudf)[description]: Likewise. Tobias Geerinckx-Rice 2022-08-11Merge branch 'staging' into core-updatesMarius Bakke 2022-07-31gnu: qtwebengine: Rename to qtwebengine-5....Automated with: git grep -l qtwebengine | xargs sed 's/\bqtwebengine\b/\0-5/g' -i git checkout NEWS Maxim Cournoyer 2022-07-31gnu: qtwebchannel: Rename to qtwebchannel-5....Automated via: git grep -l qtwebchannel | xargs sed 's/\bqtwebchannel\b/\0-5/g' -i git checkout NEWS Maxim Cournoyer 2022-07-31gnu: qtquickcontrols: Rename to qtquickcontrols-5....Automated via: git grep -l qtquickcontrols | xargs sed 's/\bqtquickcontrols\b/\0-5/g' -i git checkout NEWS Maxim Cournoyer 2022-07-31gnu: qtdeclarative: Rename to qtdeclarative-5....Automated via the following commands: git grep -l '\bqtdeclarative\b' | xargs sed -E 's/qtdeclarative/\0-5/g' -i git checkout NEWS Maxim Cournoyer 2022-06-27gnu: doxygen: Use new style....* gnu/packages/documentation.scm (doxygen)[inputs]: Remove label. [arguments]: Likewise. Convert to G-expression. Marius Bakke 2022-06-27gnu: doxygen: Update to 1.9.4....* gnu/packages/documentation.scm (doxygen): Update to 1.9.4. Marius Bakke 2022-05-12gnu: Add python-docrepr....* gnu/packages/documentation.scm (python-docrepr): New variable. Maxim Cournoyer