unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: "jgart" <jgart@dismail.de>
To: guix-devel@gnu.org
Subject: Re: Adding %conf-dir breaks module
Date: Sat, 29 Jul 2023 02:57:24 +0000	[thread overview]
Message-ID: <cdb986eb8c05a69b2552f9d8d426a0c2@dismail.de> (raw)
In-Reply-To: <0df40263fada8bd56adf4cce49e54a00@dismail.de>

(define-module (confetti features common-lisp)
  #:use-module (rde features)
  #:use-module (rde features emacs)
  #:use-module (rde features predicates)
  #:use-module (confetti srfi srfi-197)
  #:use-module (guixrus packages guix)
  #:use-module (guixrus packages common lisp)
  #:use-module (gnu home services)
  #:use-module (gnu packages emacs-xyz)
  #:use-module (gnu packages lisp)
  #:use-module (gnu packages lisp-xyz)
  #:use-module (gnu services)
  #:use-module (guix gexp)
  #:use-module (guix packages)
  #:export (feature-common-lisp))

;; This is OK.
(define x 3)

;; But this is not OK. How come?
(define %conf-dir
  (dirname (current-filename)))

;; (define (path-join . args)
;;   (string-join args "/"))

;; (define (config-file file)
;;   (local-file (path-join %conf-dir file)))

(define* (feature-common-lisp
          #:key
          (lisp-implementation sbcl)
          (init-file "lisp/sbclrc.lisp"))
  "Configure Common Lisp support."
  (ensure-pred file-like? lisp-implementation)

  ;; TODO: Use path like or whatnot.
  (ensure-pred string? init-file)

  (feature
   (name 'common-lisp)
   (home-services-getter
    (lambda (config)
      (list
       (simple-service 'add-guixrus-home-packages home-profile-service-type
                       (list sbcl-cl-guix-utils guixrus-scripts sbcl-slynk sbcl))
       (simple-service 'add-rus-shell-home-envs home-environment-variables-service-type
                       '(("GUIX_EXTENSIONS_PATH" . "$HOME/.guix-home/profile/share/guix/extensions")))
         (simple-service 'add-sbclrc-home-file home-files-service-type
                       (list `(".sbclrc" ,(local-file init-file)))))))))


  reply	other threads:[~2023-07-29  3:06 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-07-29  2:54 Adding %conf-dir breaks module jgart
2023-07-29  2:57 ` jgart [this message]
2023-07-30 22:02 ` Attila Lendvai

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=cdb986eb8c05a69b2552f9d8d426a0c2@dismail.de \
    --to=jgart@dismail.de \
    --cc=guix-devel@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).