README 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  1. -*- mode: org -*-
  2. * About
  3. Guile-Daemon is a small Guile program that loads your initial
  4. configuration file, and then reads and evaluates Guile expressions that
  5. you send to a FIFO file. That's basically it.
  6. Normally, =guile-daemon= will not exit: it's a daemon, so it just "sits"
  7. on a FIFO file waiting for commands.
  8. Along with =guile-daemon= program, Guile-Daemon provides =gdpipe= shell
  9. script that redirects commands to the default FIFO file.
  10. Finally, you can also connect to the daemon using a socket file (for
  11. example, with =M-x geiser-connect-local= if you use [[https://github.com/jaor/geiser][Geiser]]).
  12. By default, socket and FIFO files are placed in
  13. [[file:$XDG_CONFIG_HOME/guile-daemon/run]] directory
  14. ([[file:$HOME/.config/guile-daemon/run]] if XDG_CONFIG_HOME is not set).
  15. * Usage
  16. Simply run =guile-daemon= (remember, it won't fork!), and then use
  17. =gdpipe= to evaluate anything, like this:
  18. #+BEGIN_SRC sh
  19. gdpipe '(format #t "load path: ~a~%" %load-path)'
  20. #+END_SRC
  21. (on a console where =guile-daemon= is running you should see the load
  22. path)
  23. I use Guile-Daemon as an OSD daemon, see [[https://github.com/alezost/guile-daemon-config][my config]].
  24. * Building from Git
  25. Requirements for building from git:
  26. - [[http://gnu.org/software/guile/][GNU Guile]]
  27. - [[http://gnu.org/software/autoconf/][GNU Autoconf]]
  28. - [[http://gnu.org/software/automake/][GNU Automake]]
  29. Run =./autogen.sh= to generate the build system infrastructure. After
  30. that, the program can be built and installed with the usual sequence of
  31. commands of the GNU Build System:
  32. #+BEGIN_SRC sh
  33. $ ./configure
  34. $ make
  35. # make install
  36. #+END_SRC
  37. ** Pre-installation environment
  38. It is possible to use/test Guile-Daemon without installing (i.e., after
  39. running =make= but before running =make install=) with the help of
  40. =pre-inst-env= script in the top build tree, like this:
  41. #+BEGIN_SRC sh
  42. $ ./pre-inst-env guile-daemon &
  43. $ ./pre-inst-env gdpipe ...
  44. #+END_SRC
  45. If you live in Emacs, you may find =pre-inst-env.el= more useful. If
  46. you load this file (for example, with =M-x load-file=), it will set the
  47. required environment inside Emacs, so you can run =guile-daemon= and
  48. =gdpipe= in =M-x shell= without prefixing them with =.../pre-inst-env=.
  49. And more importantly, you can start Geiser and use (daemon ...) modules
  50. there!
  51. * Building/installing with Guix
  52. The latest version of Guile-Daemon can be installed with [[http://www.gnu.org/software/guix/][GNU Guix]]:
  53. [[https://www.gnu.org/software/guix/packages/g.html#guile-daemon]].
  54. Also this repository contains [[file:guix.scm]] file which can be used to
  55. build/install Guile-Daemon using the git checkout, or to make a
  56. development environment for it (see the commentary in that file for more
  57. details).