From: Nam Nguyen <namn@berkeley.edu>
To: 33753@debbugs.gnu.org
Subject: [bug#33753] [PATCH 1/3] gnu: Add stumpwm modules.
Date: Tue, 25 Dec 2018 00:19:00 -0800 [thread overview]
Message-ID: <20181225081901.19657-1-namn@berkeley.edu> (raw)
In-Reply-To: <20181215020600.2713-1-namn@berkeley.edu>
* gnu/packages/lisp.scm (stumpwm-cpu, stumpwm-mem, stumpwm-hostname)
(stumpwm-battery-portable, stumpwm-winner-mode, stumpwm-swm-gaps)
(stumpwm-pinentry): New public variables.
(stumpwm-contrib, stumpwm-module): New private variables.
---
gnu/packages/lisp.scm | 104 ++++++++++++++++++++++++++++++++++++++++++
1 file changed, 104 insertions(+)
diff --git a/gnu/packages/lisp.scm b/gnu/packages/lisp.scm
index 261e720e2..4fb9a8a00 100644
--- a/gnu/packages/lisp.scm
+++ b/gnu/packages/lisp.scm
@@ -12,6 +12,7 @@
;;; Copyright © 2018 Alex Vong <alexvong1995@gmail.com>
;;; Copyright © 2018 Pierre Neidhardt <mail@ambrevar.xyz>
;;; Copyright © 2018 Pierre Langlois <pierre.langlois@gmx.com>
+;;; Copyright © 2018 Nam Nguyen <namn@berkeley.edu>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -1032,6 +1033,109 @@ productive, customizable lisp based systems.")
(inherit (sbcl-package->cl-source-package stumpwm))
(name "cl-stumpwm")))
+(define stumpwm-contrib
+ (let ((commit "bd47cec14f7299711ac29468d2e1364d38a81bee")
+ (revision "1"))
+ (package
+ (name "stumpwm-contrib")
+ (version (git-version "0.0.1" revision commit))
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/stumpwm/stumpwm-contrib.git")
+ (commit commit)))
+ (file-name (string-append name "-" version "-checkout"))
+ (sha256
+ (base32
+ "0kh9vpmxssjvxgvl6ihpn0qh4l660n64iq80ivhagdvr8s045ddj"))))
+ (build-system asdf-build-system/sbcl)
+ (inputs
+ `(("stumpwm" ,stumpwm "lib")))
+ (home-page "https://github.com/stumpwm/stumpwm-contrib")
+ (synopsis "Collection of StumpWM modules")
+ (description "Modules are a way to extend StumpWM using Lisp
+code.")
+ (license (list license:gpl2+ ; TODO: swm-gaps Missing license?
+ license:gpl3+ ; cpu, mem, battery-portable,
+ ; winner-mode, pinentry
+ license:bsd-2))))) ; hostname
+
+(define* (stumpwm-module mod cat syn desc)
+ (package (inherit stumpwm-contrib)
+ (name (string-append "stumpwm-" mod))
+ (arguments
+ `(#:tests? #f ; No tests exist.
+ #:asd-file (string-append ,cat "/" ,mod "/" ,mod ".asd")
+ #:asd-system-name ,mod
+ #:phases
+ (modify-phases %standard-phases
+ ;; Keep this module's sources and delete the rest.
+ (add-after 'check 'copy-module-sources
+ (lambda* (#:key outputs #:allow-other-keys)
+ (let* ((out (assoc-ref outputs "out"))
+ (clisp (string-append out "/share/common-lisp"))
+ (sbcl-source (string-append clisp "/sbcl-source"))
+ (source (string-append sbcl-source "/"
+ ,mod "/" ,cat "/" ,mod))
+ (tmp (string-append out "/" ,mod)))
+ (mkdir-p tmp)
+ (copy-recursively source tmp)
+ (delete-file-recursively sbcl-source)
+ (copy-recursively tmp
+ (string-append sbcl-source "/" ,mod))
+ (delete-file-recursively tmp))
+ #t)))))
+ (synopsis syn)
+ (description desc)))
+
+(define-public stumpwm-cpu
+ (stumpwm-module "cpu" "modeline"
+ "Display CPU info"
+ "Display CPU info in the StumpWM modeline."))
+
+(define-public stumpwm-mem
+ (stumpwm-module "mem" "modeline"
+ "Display memory info"
+ "Display memory info in the StumpWM modeline."))
+
+(define-public stumpwm-hostname
+ (stumpwm-module "hostname" "modeline"
+ "Display hostname"
+ "Display hostname in the StumpWM modeline."))
+
+(define-public stumpwm-battery-portable
+ (stumpwm-module "battery-portable" "modeline"
+ "Display laptop battery info"
+ "Display laptop battery info in the StumpWM
+modeline."))
+
+(define-public stumpwm-winner-mode
+ (stumpwm-module "winner-mode" "util"
+ "Emacs' winner-mode for StumpWM"
+ "Winner mode records changes in the window
+configuration so that changes can be undone. It hooks into StumpWM to
+dump layouts. This only works per group."))
+
+(define-public stumpwm-swm-gaps
+ (stumpwm-module "swm-gaps" "util"
+ "Pretty (useless) gaps for StumpWM"
+ "Add gaps to StumpWM running along various borders."))
+
+(define-public stumpwm-pinentry
+ (let ((pinentry (stumpwm-module "pinentry" "util"
+ "Integrate GnuPG Agent with StumpWM"
+ "GnuPG Agent uses
+@code{stumpwm-pinentry} to ask for your password.")))
+ (package (inherit pinentry)
+ (inputs
+ `(("sbcl-cffi" ,sbcl-cffi)
+ ("sbcl-usocket-server" ,sbcl-usocket-server)
+ ("sbcl-percent-encoding" ,sbcl-percent-encoding)
+ ,@(package-inputs stumpwm-contrib)))
+ (propagated-inputs
+ `(("netcat" ,netcat))))))
+
;; The slynk that users expect to install includes all of slynk's contrib
;; modules. Therefore, we build the base module and all contribs first; then
;; we expose the union of these as `sbcl-slynk'. The following variable
--
2.20.1
next prev parent reply other threads:[~2018-12-25 8:20 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-12-15 2:06 [bug#33753] [PATCH 1/3] gnu: Add stumpwm-contrib Nam Nguyen
2018-12-15 2:09 ` [bug#33753] [PATCH 2/3] gnu: Add stumpwm-cpu Nam Nguyen
2018-12-15 2:09 ` [bug#33753] [PATCH 3/3] gnu: emacs-stumpwm-mode: Use source and version of stumpwm-cpu Nam Nguyen
2018-12-15 2:50 ` [bug#33753] stumpwm-contrib Nam Nguyen
2018-12-21 17:06 ` Ludovic Courtès
2018-12-21 18:18 ` Pierre Neidhardt
[not found] ` <875zvlv8r1.fsf@dustycloud.org>
2018-12-24 10:01 ` Nam Nguyen
2018-12-24 10:14 ` Pierre Neidhardt
2018-12-24 10:20 ` Efraim Flashner
2018-12-25 9:01 ` Nam Nguyen
2018-12-26 7:13 ` Nam Nguyen
2018-12-27 10:51 ` Pierre Neidhardt
2018-12-24 9:21 ` [bug#33753] [PATCH 1/3] gnu: Add stumpwm modules Nam Nguyen
2018-12-24 9:21 ` [bug#33753] [PATCH 2/3] gnu: Add sbcl-percent-encoding Nam Nguyen
2018-12-24 9:21 ` [bug#33753] [PATCH 3/3] gnu: emacs-stumpwm-mode: Use source and version of stumpwm-cpu Nam Nguyen
2018-12-25 8:19 ` Nam Nguyen [this message]
2018-12-25 8:19 ` [bug#33753] [PATCH 2/3] gnu: Add sbcl-percent-encoding Nam Nguyen
2020-03-23 7:16 ` [bug#33753] [PATCH 0/3] ttf-fonts module in StumpWM Oleg Pykhalov
2020-03-23 7:24 ` [bug#33753] [PATCH 1/3] gnu: Add sbcl-clx-truetype Oleg Pykhalov
2020-03-23 7:24 ` [bug#33753] [PATCH 2/3] gnu: emacs-stumpwm-mode: Update to 0.0.1-1.dd5b037 Oleg Pykhalov
2020-03-23 7:24 ` [bug#33753] [PATCH 3/3] gnu: Add sbcl-stumpwm-ttf-fonts Oleg Pykhalov
2020-03-23 9:06 ` [bug#33753] [PATCH 1/3] gnu: Add sbcl-clx-truetype Guillaume Le Vaillant
2020-03-30 20:24 ` bug#33753: " Oleg Pykhalov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://guix.gnu.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20181225081901.19657-1-namn@berkeley.edu \
--to=namn@berkeley.edu \
--cc=33753@debbugs.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/guix.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).