gnu: Move web packages from haskell to haskell-web.
[jackhill/guix/guix.git] / gnu / packages / wm.scm
index 90d1dc1..599d5ad 100644 (file)
@@ -9,9 +9,12 @@
 ;;; Copyright © 2016 Al McElrath <hello@yrns.org>
 ;;; Copyright © 2016 Carlo Zancanaro <carlo@zancanaro.id.au>
 ;;; Copyright © 2016 Ludovic Courtès <ludo@gnu.org>
-;;; Copyright © 2016 ng0 <ng0@we.make.ritual.n0.is>
+;;; Copyright © 2016, 2017 ng0 <ng0@infotropique.org>
 ;;; Copyright © 2016 doncatnip <gnopap@gmail.com>
 ;;; Copyright © 2016 Ivan Vilata i Balaguer <ivan@selidor.net>
+;;; Copyright © 2017 Mekeor Melire <mekeor.melire@gmail.com>
+;;; Copyright © 2017 Marius Bakke <mbakke@fastmail.com>
+;;; Copyright © 2017 Oleg Pykhalov <go.wigust@gmail.com>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
   #:use-module (guix build-system cmake)
   #:use-module (guix build-system gnu)
   #:use-module (guix build-system haskell)
+  #:use-module (guix build-system perl)
   #:use-module (guix build-system python)
   #:use-module (gnu packages haskell)
+  #:use-module (gnu packages haskell-check)
+  #:use-module (gnu packages haskell-web)
   #:use-module (gnu packages base)
   #:use-module (gnu packages pkg-config)
   #:use-module (gnu packages perl)
@@ -50,6 +56,7 @@
   #:use-module (gnu packages docbook)
   #:use-module (gnu packages image)
   #:use-module (gnu packages pcre)
+  #:use-module (gnu packages python)
   #:use-module (gnu packages gtk)
   #:use-module (gnu packages libevent)
   #:use-module (gnu packages fribidi)
 (define-public libconfuse
   (package
     (name "libconfuse")
-    (version "2.7")
+    (version "3.2.1")
     (source (origin
               (method url-fetch)
-              (uri (string-append "http://savannah.nongnu.org/download/confuse/"
-                                  "confuse-" version ".tar.gz"))
+              (uri (string-append "https://github.com/martinh/libconfuse/"
+                                  "releases/download/v" version
+                                  "/confuse-" version ".tar.xz"))
               (sha256
                (base32
-                "0y47r2ashz44wvnxdb18ivpmj8nxhw3y9bf7v9w0g5byhgyp89g3"))))
+                "0pnjmlj9i0alp407qd7c0vq83sz7gpsjrbdgpcn4xvzjp9r35ii3"))))
     (build-system gnu-build-system)
-    (home-page "http://www.nongnu.org/confuse/")
+    (home-page "https://github.com/martinh/libconfuse")
     (synopsis "Configuration file parser library")
     (description "libconfuse is a configuration file parser library.  It
 supports sections and (lists of) values (strings, integers, floats, booleans
@@ -89,7 +97,7 @@ nested include statements).")
 (define-public bspwm
   (package
     (name "bspwm")
-    (version "0.9")
+    (version "0.9.3")
     (source
      (origin
        (file-name (string-append name "-" version ".tar.gz"))
@@ -99,7 +107,7 @@ nested include statements).")
              version ".tar.gz"))
        (sha256
         (base32
-         "1pig0h2jk8wipyz90j69c4bk37bfyq60asnn0v0bqld2p2vjvyqy"))))
+         "17dwj7w16cdj7g4s2y2f96lgj5msq1s4543dnfa3rijlazzy6mmk"))))
     (build-system gnu-build-system)
     (inputs
      `(("libxcb" ,libxcb)
@@ -109,7 +117,7 @@ nested include statements).")
        ("xcb-util-keysyms" ,xcb-util-keysyms)
        ("xcb-util-wm" ,xcb-util-wm)))
     (arguments
-     '(#:phases (alist-delete 'configure %standard-phases)
+     '(#:phases (modify-phases %standard-phases (delete 'configure))
        #:tests? #f  ; no check target
        #:make-flags (list "CC=gcc"
                           (string-append "PREFIX=" %output))))
@@ -122,14 +130,14 @@ the leaves of a full binary tree.")
 (define-public i3status
   (package
     (name "i3status")
-    (version "2.10")
+    (version "2.11")
     (source (origin
               (method url-fetch)
               (uri (string-append "https://i3wm.org/i3status/i3status-"
                                   version ".tar.bz2"))
               (sha256
                (base32
-                "1497dsvb32z9xljmxz95dnyvsbayn188ilm3l4ys8m5h25vd1xfs"))))
+                "0pwcy599fw8by1a1sf91crkqba7679qhvhbacpmhis8c1xrpxnwq"))))
     (build-system gnu-build-system)
     (arguments
      `(#:make-flags (list "CC=gcc" (string-append "PREFIX=" %output))
@@ -162,34 +170,41 @@ commands would.")
 (define-public i3-wm
   (package
     (name "i3-wm")
-    (version "4.12")
+    (version "4.14.1")
     (source (origin
               (method url-fetch)
               (uri (string-append "https://i3wm.org/downloads/i3-"
                                   version ".tar.bz2"))
               (sha256
                (base32
-                "1d3q3lgpjbkmcwzjhp0dfr0jq847silcfg087slcnj95ikh1r7p1"))))
+                "1cazmfbbx6n8c81h6x6pdayq3mxs2ml3adz165z8vapkc72kl1nh"))))
     (build-system gnu-build-system)
     (arguments
-     `(#:make-flags (list "CC=gcc" (string-append "PREFIX=" %output))
-       #:phases
-       (modify-phases %standard-phases
-         (delete 'configure))
-       #:tests? #f)) ; no test suite
+     `(#:make-flags
+       (list "CC=gcc"
+             (string-append "PREFIX=" %output)
+             ;; This works around the following error:
+             ;; 'error: ‘for’ loop initial declarations are only allowed in C99
+             ;; or C11 mode'
+             "CFLAGS=-std=c11")
+       ;; The build system tries to build in a separate directory, but that
+       ;; seems to be unnecessary.
+       #:configure-flags '("--disable-builddir")
+       ;; The test suite appears to require the unpackaged Perl module AnyEvent.
+       #:tests? #f))
     (inputs
      `(("libxcb" ,libxcb)
        ("xcb-util" ,xcb-util)
        ("xcb-util-cursor" ,xcb-util-cursor)
        ("xcb-util-keysyms" ,xcb-util-keysyms)
        ("xcb-util-wm" ,xcb-util-wm)
+       ("xcb-util-xrm" ,xcb-util-xrm)
        ("libxkbcommon" ,libxkbcommon)
        ("libev" ,libev)
        ("libyajl" ,libyajl)
        ("asciidoc" ,asciidoc)
        ("xmlto" ,xmlto)
        ("perl-pod-simple" ,perl-pod-simple)
-       ("docbook-xml" ,docbook-xml)
        ("libx11" ,libx11)
        ("pcre" ,pcre)
        ("startup-notification" ,startup-notification)
@@ -198,7 +213,10 @@ commands would.")
     (native-inputs
      `(("which" ,which)
        ("perl" ,perl)
-       ("pkg-config" ,pkg-config)))
+       ("pkg-config" ,pkg-config)
+       ;; For building the documentation.
+       ("libxml2" ,libxml2)
+       ("docbook-xsl" ,docbook-xsl)))
     (home-page "https://i3wm.org/")
     (synopsis "Improved tiling window manager")
     (description "A tiling window manager, completely written
@@ -206,6 +224,31 @@ from scratch.  i3 is primarily targeted at advanced users and
 developers.")
     (license license:bsd-3)))
 
+(define-public perl-anyevent-i3
+  (package
+    (name "perl-anyevent-i3")
+    (version "0.17")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append "mirror://cpan/authors/id/M/MS/MSTPLBG/"
+                                  "AnyEvent-I3-" version ".tar.gz"))
+              (sha256
+               (base32
+                "0qvd9bq16jyy7v3ma82qcnvz9j503bw0mh7h55gkjf7ir62ck0jk"))))
+    (build-system perl-build-system)
+    (propagated-inputs
+     `(("perl-anyevent" ,perl-anyevent)
+       ("perl-json-xs" ,perl-json-xs)))
+    (home-page "http://search.cpan.org/dist/AnyEvent-I3")
+    (synopsis
+     "Communicate with the i3 window manager through perl")
+    (description
+     "This module connects to the i3 window manager using the UNIX socket
+based IPC interface it provides (if enabled in the configuration file).
+You can then subscribe to events or send messages and receive their replies.")
+    ;; Can be used with either license.
+    (license (list license:gpl3+ license:perl-license))))
+
 (define-public python-i3-py
   (package
     (name "python-i3-py")
@@ -295,30 +338,24 @@ prompt.")
 (define-public xmonad
   (package
     (name "xmonad")
-    (version "0.11.1")
+    (version "0.13")
     (synopsis "Tiling window manager")
     (source (origin
               (method url-fetch)
-              (uri (string-append "http://hackage.haskell.org/package/xmonad/"
+              (uri (string-append "mirror://hackage/package/xmonad/"
                                   name "-" version ".tar.gz"))
               (sha256
                (base32
-                "1pfjssamiwpwjp1qqkm9m9p9s35pv381m0cwg6jxg0ppglibzq1r"))
-              (modules '((guix build utils)))
-              (snippet
-               ;; Here we update the constraints on the utf8-string package in
-               ;; the Cabal file.  We allow a newer version which is compatible
-               ;; with GHC 7.10.2.  The same change is applied on Hackage.  See
-               ;; <https://hackage.haskell.org/package/xmonad-0.11.1/revisions/>.
-               '(substitute* "xmonad.cabal"
-                  (("utf8-string >= 0.3 && < 0.4")
-                   "utf8-string >= 0.3 && < 1.1")))))
+                "1jh3lcs20qpna36fa5a0r174xqrsxhj10x1rm5vwf64zariipy7r"))))
     (build-system haskell-build-system)
     (inputs
-     `(("ghc-mtl" ,ghc-mtl)
-       ("ghc-utf8-string" ,ghc-utf8-string)
-       ("ghc-extensible-exceptions" ,ghc-extensible-exceptions)
-       ("ghc-x11" ,ghc-x11)))
+     `(("ghc-extensible-exceptions" ,ghc-extensible-exceptions)
+       ("ghc-mtl"                   ,ghc-mtl)
+       ("ghc-quickcheck"            ,ghc-quickcheck)
+       ("ghc-setlocale"             ,ghc-setlocale)
+       ("ghc-utf8-string"           ,ghc-utf8-string)
+       ("ghc-directory"             ,ghc-directory)
+       ("ghc-x11"                   ,ghc-x11)))
     (arguments
      `(#:phases
        (modify-phases %standard-phases
@@ -348,18 +385,51 @@ used on each workspace.  Xinerama is fully supported, allowing windows to be
 tiled on several screens.")
     (license license:bsd-3)))
 
+(define-public xmobar
+  (package
+    (name "xmobar")
+    (version "0.24.5")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append "mirror://hackage/package/xmobar/"
+                                  name "-" version ".tar.gz"))
+              (sha256
+               (base32
+                "0sdzfj2wa4wpig1i2i5n9qpwm90jp88qifsmaa7j37yhhs6snfir"))))
+    (build-system haskell-build-system)
+    (inputs
+     `(("ghc-http" ,ghc-http)
+       ("ghc-parsec" ,ghc-parsec)
+       ("ghc-regex-compat" ,ghc-regex-compat)
+       ("ghc-stm" ,ghc-stm)
+       ("ghc-x11-xft" ,ghc-x11-xft)
+       ("ghc-hinotify" ,ghc-hinotify)
+       ("libxpm" ,libxpm)
+       ("wireless-tools" ,wireless-tools)))
+    (arguments
+     `(#:configure-flags
+       '("--flags=with_utf8 with_xft with_xpm with_inotify with_iwlib")))
+    (home-page "http://xmobar.org")
+    (synopsis "Minimalistic text based status bar")
+    (description
+     "@code{xmobar} is a lightweight, text-based, status bar written in
+Haskell.  It was originally designed to be used together with Xmonad, but it
+is also usable with any other window manager.  While xmobar is written in
+Haskell, no knowledge of the language is required to install and use it.")
+    (license license:bsd-3)))
+
 (define-public ghc-xmonad-contrib
   (package
     (name "ghc-xmonad-contrib")
-    (version "0.11.4")
+    (version "0.13")
     (source
      (origin
        (method url-fetch)
-       (uri (string-append "http://hackage.haskell.org/package/xmonad-contrib/"
+       (uri (string-append "mirror://hackage/package/xmonad-contrib/"
                            "xmonad-contrib-" version ".tar.gz"))
        (sha256
         (base32
-         "1g5cw9vvnfbiyi599fngk02zlmdhrf82x0bndhypkn6kybab6yd3"))))
+         "0vj72jhfng6y7hv5frx2v99jvl3jn9rbpk2j7xw9vydiwmzq4q57"))))
     (build-system haskell-build-system)
     (propagated-inputs
      `(("ghc-mtl" ,ghc-mtl)
@@ -473,15 +543,15 @@ experience.")
 (define-public awesome
   (package
     (name "awesome")
-    (version "3.5.9")
+    (version "4.2")
     (source
      (origin (method url-fetch)
              (uri (string-append
-                   "https://awesome.naquadah.org/download/awesome-"
-                   version ".tar.xz"))
+                   "https://github.com/awesomeWM/awesome-releases/raw/"
+                   "master/awesome-" version ".tar.xz"))
              (sha256
               (base32
-               "0kynair1ykr74b39a4gcm2y24viial64337cf26nhlc7azjbby67"))
+               "0kwpbls9h1alxcmvxh5g9qb995fds5b2ngcr44w0ibazkyls2pdc"))
              (modules '((guix build utils)
                         (srfi srfi-19)))
              (snippet
@@ -514,6 +584,7 @@ experience.")
               ("libxcb" ,libxcb)
               ("libxcursor" ,libxcursor)
               ("libxdg-basedir" ,libxdg-basedir)
+              ("libxkbcommon" ,libxkbcommon)
               ("lua" ,lua)
               ("lua-lgi",lua-lgi)
               ("pango" ,pango)
@@ -523,12 +594,16 @@ experience.")
               ("xcb-util-image" ,xcb-util-image)
               ("xcb-util-keysyms" ,xcb-util-keysyms)
               ("xcb-util-renderutil" ,xcb-util-renderutil)
+              ("xcb-util-xrm" ,xcb-util-xrm)
               ("xcb-util-wm" ,xcb-util-wm)))
     (arguments
      `(;; Let compression happen in our 'compress-documentation' phase so that
        ;; '--no-name' is used, which removes timestamps from gzip output.
        #:configure-flags '("-DCOMPRESS_MANPAGES=off")
 
+       ;; Building awesome in its source dir is no longer supported.
+       #:out-of-source? #t
+
        #:phases
        (modify-phases %standard-phases
          (add-before 'build 'xmlto-skip-validation
@@ -575,3 +650,145 @@ experience.")
 dynamic and extensible using the Lua programming language.")
     (license license:gpl2+)
     (home-page "https://awesome.naquadah.org/")))
+
+(define-public menumaker
+  (package
+    (name "menumaker")
+    (version "0.99.10")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (string-append "mirror://sourceforge/menumaker/"
+                           "menumaker-" version ".tar.gz"))
+       (sha256
+        (base32
+         "1mm4cvg3kphkkd8nwrhcg6d9nm5ar7mgc0wf6fxk6zck1l7xn8ky"))))
+    (build-system gnu-build-system)
+    (inputs
+     `(("python" ,python)))
+    (synopsis "Heuristics-driven menu generator")
+    (description
+     "MenuMaker is a menu generation utility for a number of X window
+managers and desktop environments.  It is capable of finding lots of
+installed programs and generating a root menu consistent across all
+supported window managers, so one will get (almost) the same menu in
+all of them.  Currently supported window managers include:
+
+@enumerate
+@item BlackBox
+@item Deskmenu
+@item FluxBox
+@item IceWM
+@item OpenBox
+@item PekWM
+@item WindowMaker
+@item XFCE
+@end enumerate\n")
+    (home-page "http://menumaker.sourceforge.net/")
+    (license license:bsd-2)))
+
+(define-public keybinder
+  (package
+    (name "keybinder")
+    (version "0.3.1")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (string-append "https://github.com/engla/keybinder/releases/"
+                           "download/v" version "/keybinder-"
+                           version ".tar.gz"))
+       (file-name (string-append name "-" version ".tar.gz"))
+       (sha256
+        (base32
+         "0h52hj3ay8mfhwvmfxbxlfyq74hifdk8wxgxp7fr4iy6189hg7w7"))))
+    (build-system gnu-build-system)
+    (inputs
+     `(("python-2" ,python-2)
+       ("gtk+-2" ,gtk+-2)))
+    (native-inputs
+     `(("python2-pygtk" ,python2-pygtk)
+       ("gtk-doc" ,gtk-doc)
+       ("pkg-config" ,pkg-config)))
+    (synopsis "Library for registering global keyboard shortcuts")
+    (description
+     "Keybinder is a library for registering global keyboard shortcuts.
+Keybinder works with GTK-based applications using the X Window System.")
+    (home-page "https://github.com/engla/keybinder")
+    (license license:gpl2+)))
+
+(define-public spectrwm
+  (package
+    (name "spectrwm")
+    (version "3.0.2")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (let ((version-with-underscores
+                   (string-join (string-split version #\.) "_")))
+              (string-append "https://github.com/conformal/spectrwm/archive/"
+                             "SPECTRWM_" version-with-underscores ".tar.gz")))
+       (file-name (string-append name "-" version ".tar.gz"))
+       (sha256
+        (base32
+         "065b7j8s0lxw3p58fyf3c1mr5203pdm0kww42v245rlx0f005kl2"))))
+    (build-system gnu-build-system)
+    (arguments
+     `(#:make-flags (let ((pkg-config (lambda (flag)
+                                        (string-append
+                                         "$(shell pkg-config " flag " "
+                                         "xft fontconfig x11 libpng)"))))
+                      (list
+                       "CC=gcc"
+                       (string-append "PREFIX=" %output)
+                       (string-append "INCS=-I. " (pkg-config "--cflags"))
+                       (string-append "LIBS=" (pkg-config "--libs") " -lm")))
+       #:tests? #f ;No test suite
+       #:phases
+       (modify-phases %standard-phases
+         (add-before 'build 'change-dir
+           (lambda _
+             (chdir "linux") #t))
+         (add-after 'change-dir 'patch-makefile
+           (lambda _
+             (substitute* "Makefile"
+               (("-g") ""))))
+         (add-after 'change-dir 'fix-freetype-include
+           (lambda _
+             (substitute* "Makefile"
+               (("/usr/include/freetype2")
+                (string-append (assoc-ref %build-inputs "freetype")
+                               "/include/freetype2")))))
+         (delete 'configure))))                   ;no 'configure' exists
+    (inputs
+     `(("freetype" ,freetype)
+       ("fontconfig" ,fontconfig)
+       ("libx11" ,libx11)
+       ("libxcursor" ,libxcursor)
+       ("libxrandr" ,libxrandr)
+       ("libxtst" ,libxtst)
+       ("libxft" ,libxft)
+       ("xcb-util" ,xcb-util)
+       ("xcb-util-wm" ,xcb-util-wm)
+       ("xcb-util-keysyms" ,xcb-util-keysyms)))
+    (native-inputs
+     `(("libxt" ,libxt)
+       ("pkg-config" ,pkg-config)))
+    (synopsis "Minimalistic automatic tiling window manager")
+    (description
+     "Spectrwm is a small dynamic tiling and reparenting window manager for X11.
+It is inspired by Xmonad and dwm.  Its major features include:
+
+@itemize
+@item Navigation anywhere on all screens with either the keyboard or mouse
+@item Customizable status bar
+@item Restartable without losing state
+@item Quick launch menu
+@item Many screen layouts possible with a few simple key strokes
+@item Move/resize floating windows
+@item Extended Window Manager Hints (EWMH) support
+@item Configureable tiling
+@item Adjustable tile gap allows for a true one pixel border
+@item Customizable colors and border width
+@end itemize\n")
+    (home-page "https://github.com/conformal/spectrwm")
+    (license license:isc)))