From mboxrd@z Thu Jan 1 00:00:00 1970 From: George Clemmer Subject: Re: Guix and Emacs Integration for Polyglot Development Date: Mon, 10 Sep 2018 21:10:39 -0400 Message-ID: <875zzczvn4.fsf@gmail.com> References: <871sbowlws.fsf@devnulllabs.io> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([208.118.235.92]:44834) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fzXGj-0003Jg-3R for help-guix@gnu.org; Mon, 10 Sep 2018 21:15:09 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fzXCU-0005gz-RY for help-guix@gnu.org; Mon, 10 Sep 2018 21:10:46 -0400 Received: from mail-ua1-x930.google.com ([2607:f8b0:4864:20::930]:38489) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fzXCU-0005gE-MS for help-guix@gnu.org; Mon, 10 Sep 2018 21:10:42 -0400 Received: by mail-ua1-x930.google.com with SMTP id o11-v6so19094455uak.5 for ; Mon, 10 Sep 2018 18:10:42 -0700 (PDT) In-reply-to: <871sbowlws.fsf@devnulllabs.io> List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-guix-bounces+gcggh-help-guix=m.gmane.org@gnu.org Sender: "Help-Guix" To: Kenny Ballou Cc: help-guix@gnu.org Kenny Ballou writes: > I would like to be able to specify a project's dependencies in a > manifest file, add any environment variables as necessary, and have > Emacs be aware of those variables when entering that environment. Hi Kenny, I have experimented with various schemes for managing projects in guix. I have tried 'guix environment', 'guix package', and 'guix system vm'. FWIW, I have ended up "running" projects with an script that includes ... GCP_ROOT=$gcp_root guix package \ --profile=$gcp_root/.guix-profile \ -m $gcp_root/.manifest.scm eval $(guix package -p /var/guix/profiles/system/profile \ -p $gcp_root/.guix-profile --search-paths=exact) ... where $gcp_root is the project directory. This effectively replaces the "default user profile" with a "custom project profile" ($gcp_root/.guix-profile). I put the emacs project config in $gcp_root/.emacs and run emacs with a script that includes ... $GCP_ROOT/.guix-profile/bin/emacs \ --no-site-file \ --eval='(let ((guix-env (concat (getenv "GCP_ROOT") "/.guix-profile"))) (when (and guix-env (require (quote guix-emacs) nil t)) (guix-emacs-autoload-packages guix-env)))' \ --no-init-file \ --eval='(setq user-emacs-directory (concat (getenv "GCP_ROOT") "/.emacs.d/"))' \ --eval='(load (concat (getenv "GCP_ROOT") "/.emacs"))' \ --debug-init \ "$@" The net effect: a custom emacs config running in a custom profile for each project. I use Makefiles to maintain $gcp_root/.manifest.scm, $gcp_root/.emacs, etc. and GNU screen to run/juggle these projects. HTH - George