all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Nam Nguyen <namn@berkeley.edu>
To: 33753@debbugs.gnu.org
Subject: [bug#33753] stumpwm-contrib
Date: Tue, 25 Dec 2018 23:13:21 -0800	[thread overview]
Message-ID: <20181226071321.GA28866@antelope> (raw)
In-Reply-To: <20181225090121.GA18066@antelope>

I did some investigating by querying within stumpwm.

C-t ; brings up a stumpwm prompt.
---8<------------------------------------------------------------
eval-line (print *module-dir*)

/gnu/store/...stumpwm-18.11-lib/.stumpwm.d/modules/
---8<------------------------------------------------------------

It seems to set *module-dir* at build time to be
/gnu/store/...stumpwm-18.11-lib/.stumpwm.d/modules/. However, this .stump.d
doesn't exist and it was created when stumpwm was compiled. There are
also potentially a FHS assumption with (getenv "HOME") and it happens to
evaluate to the /gnu/store item.

StumpWM gives option #1 of setting module-dir at build time of
StumpWM. I could try patching
---8<------------------------------------------------------------
> (pathname-as-directory (concat (getenv "HOME") "/.stumpwm.d/modules"))
---8<------------------------------------------------------------
in order to store the modules at some standard, system-wide location? Hard
coding it as /var/guix/profiles/per-user/user/guix-profile/share/common-lisp
is incorrect because guix won't build as the user. Maybe I can force stumpwm
and the stumpwm-contrib modules to use the same stumpwm library. This seems
tricky/impossible, though, since they are all individual modules.

StumpWM also offers option #2 of calling set-module-dir to set this
variable at run-time in ~/.stumpwmrc. This is how it currently works and
it seems more simple.
---8<-------------------  ~/.stumpwmrc --------------------------
(set-module-dir "~/.guix-profile/share/common-lisp/sbcl-bundle-systems")
---8<------------------------------------------------------------

*module-dir* is essentially a seed for *load-path*, which is where the
files like cpu.asd and cpu--system.fasl are. With the current setup,
load-path is populated correctly.
---8<------------------------------------------------------------
eval-line (print *load-path*)

/gnu/store/stumpwm-cpu/lib/sbcl/"
...
/gnu/store/stumpwm-mem/lib/sbcl/"
---8<------------------------------------------------------------

Option #3 is to use "add-to-load-path", but that seems similar to
Option #1. I suppose this is a matter of investigating how stumpwm
handles its modules/extensions. What I know thus far points me to err
toward setting module-dir at run-time, since it is a one-liner.

Relevant snippets from module.lisp
(https://github.com/stumpwm/stumpwm/blob/master/module.lisp)

---8<------------------------------------------------------------
(defvar *module-dir*
  (pathname-as-directory (concat (getenv "HOME") "/.stumpwm.d/modules"))
  "The location of the contrib modules on your system.")

(defun build-load-path (path)
  "Maps subdirectories of path, returning a list of all subdirs in the
  path which contain any files ending in .asd"
  ...

(defvar *load-path* nil
  "A list of paths in which modules can be found, by default it is
  populated by any asdf systems found in `*module-dir*' set from the
  configure script when StumpWM was built, or later by the user using
  `add-to-load-path'")

(defun set-module-dir (dir)
  "Sets the location of the for StumpWM to find modules"
  (when (stringp dir)
    (setf dir (pathname (concat dir "/"))))
  (setf *module-dir* dir)
  (init-load-path *module-dir*))
---8<------------------------------------------------------------

  reply	other threads:[~2018-12-26  7:14 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 [this message]
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 ` [bug#33753] [PATCH 1/3] gnu: Add stumpwm modules Nam Nguyen
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

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20181226071321.GA28866@antelope \
    --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 external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.