Subject: [bug#61056] [PATCH] gnu: Add jwm.

From: [email-masked]
Date: Wed, 25 Jan 2023 19:15:14 +0800

From: Feng Shu <[email-masked]>

* gnu/packages/wm.scm (jwm): New variable.
---
 gnu/packages/wm.scm | 62 +++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 62 insertions(+)

diff --git a/gnu/packages/wm.scm b/gnu/packages/wm.scm
index a860ed1f93..1fb2b46efc 100644
--- a/gnu/packages/wm.scm
+++ b/gnu/packages/wm.scm
@@ -108,6 +108,7 @@ (define-module (gnu packages wm)
   #:use-module (gnu packages freedesktop)
   #:use-module (gnu packages fribidi)
   #:use-module (gnu packages gawk)
+  #:use-module (gnu packages gettext)
   #:use-module (gnu packages gl)
   #:use-module (gnu packages glib)
   #:use-module (gnu packages gperf)
@@ -2793,6 +2794,67 @@ (define-public hikari
 capabilities.  It is heavily inspired by the Calm Window manager(cwm).")
     (license license:bsd-2)))
 
+(define-public jwm
+  (package
+    (name "jwm")
+    (version "2.4.4")
+    (source
+     (origin
+       (method git-fetch)
+       (uri (git-reference
+             (url "https://github.com/joewing/jwm")
+             (commit "4640d3b48ea64bd57e3cea63e4c4a9cd558e6142")))
+       (file-name (git-file-name name version))
+       (sha256
+        (base32 "0xwk54y8q12y3cvbgrjhda6g4jd5f57bvyasyb9qdbczzxfhvxqw"))))
+    (build-system gnu-build-system)
+    (arguments
+     (list
+      #:tests? #f   ; no check target
+      #:phases
+      #~(modify-phases %standard-phases
+          (add-after 'install 'install-xsession
+            (lambda* (#:key outputs #:allow-other-keys)
+              (let* ((out (assoc-ref outputs "out"))
+                     (xsessions (string-append out "/share/xsessions")))
+                (mkdir-p xsessions)
+                (call-with-output-file
+                    (string-append xsessions "/jwm.desktop")
+                  (lambda (port)
+                    (format port "~
+                     [Desktop Entry]~@
+                     Name=jwm~@
+                     Comment=Joe's Window Manager~@
+                     Exec=~a/bin/jwm~@
+                     Type=XSession~%" out))))
+              #t)))))
+    (native-inputs
+     (list autoconf
+           automake
+           gettext-minimal
+           pkg-config))
+    (inputs
+     (list cairo
+           libjpeg-turbo
+           libpng
+           librsvg
+           libxext
+           libxinerama
+           libxmu
+           libxpm
+           libxrandr
+           libxt
+           pango))
+    (home-page "http://joewing.net/projects/jwm")
+    (synopsis "Joe's Window Manager")
+    (description
+     "JWM is a light-weight window manager for the X11 Window System.  it is
+written in C and uses only Xlib at a minimum.  Because of its small footprint,
+it makes a good window manager for older computers and less powerful systems,
+such as the Raspberry Pi, though it is perfectly capable of running on modern
+systems.")
+    (license license:expat)))
+
 (define-public devour
   (package
     (name "devour")
-- 
2.39.1