From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id yLgvLFO4l2JneQAAbAwnHQ (envelope-from ) for ; Wed, 01 Jun 2022 21:04:51 +0200 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id gPb9K1O4l2JbNgEAauVa8A (envelope-from ) for ; Wed, 01 Jun 2022 21:04:51 +0200 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id B81D218DCC for ; Wed, 1 Jun 2022 21:04:50 +0200 (CEST) Received: from localhost ([::1]:46400 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nwTeD-0005mh-6x for larch@yhetil.org; Wed, 01 Jun 2022 15:04:49 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:34874) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nwTcM-0004fa-Fc for help-guix@gnu.org; Wed, 01 Jun 2022 15:02:55 -0400 Received: from mout01.posteo.de ([185.67.36.65]:37505) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nwTcJ-0006Qo-IZ for help-guix@gnu.org; Wed, 01 Jun 2022 15:02:54 -0400 Received: from submission (posteo.de [185.67.36.169]) by mout01.posteo.de (Postfix) with ESMTPS id 902E1240027 for ; Wed, 1 Jun 2022 21:02:47 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1654110167; bh=bwbuXWIfUjWUJ7cyw6EuB33Qi8JEie6jhnQRT5mG6tU=; h=From:To:Cc:Subject:Date:From; b=mAIqXGvGE9jI6SLMUtz1De+GSDm9cgc6EGV6AQOWbZLvuw8oIuzwbYwCubvknuuga HxHi52sgHDoLCs+H06hj3XO1NBBIsW5IFBYqk2T0alcSychxMv2xl0el++5bIs5aFz zIc502efZ1I/82AQx7AB+H3QfGNY2MFe3gBmLN+2BJc9qb7mOsQ/JbnFG3kf0TN3Vv WkRj5EOZsGFSK5IyI8+JLbt86kB4dD/0fH/5ujzDWnQCSm1vPRhYGaG0Je8ERVoBSG ihKCxy0AeZQKqwvW2Hs55tTDpL9+Yv4JvPplc74O5ktFYE0rVtNwfUWkRftfnGgaIF yPqe4jMri9hhA== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4LCz6t3XvQz6tmH; Wed, 1 Jun 2022 21:02:46 +0200 (CEST) From: Fredrik Salomonsson To: Einar Largenius Cc: Guix mailing list Subject: Re: Setting up a geiser development environment In-Reply-To: <87r149ms0x.fsf@lysator.liu.se> References: <877d66efmq.fsf@lysator.liu.se> <87tu9apcrc.fsf@posteo.net> <87r149ms0x.fsf@lysator.liu.se> Date: Wed, 01 Jun 2022 19:02:44 +0000 Message-ID: <875ylkb417.fsf@d2.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Received-SPF: pass client-ip=185.67.36.65; envelope-from=plattfot@posteo.net; helo=mout01.posteo.de X-Spam_score_int: -43 X-Spam_score: -4.4 X-Spam_bar: ---- X-Spam_report: (-4.4 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: help-guix@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-guix-bounces+larch=yhetil.org@gnu.org Sender: "Help-Guix" X-Migadu-Flow: FLOW_IN X-Migadu-To: larch@yhetil.org X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1654110291; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post:dkim-signature; bh=3I4j9aIWN7x7Y0PKa9DEEjc4ovZLv6hHID8wu2muPV4=; b=Wq01DUlFAChRJ3/lHdNrqVaJXTPIgnGyXPcgvBD14u/BvlOjDc4Bx5vA9LFgqjKdBbZveH ZMClHLL1TxZKBWoTPqGC587Bzl+qgaDqy55mFQ/Ka8I6Rx1ndn0XD2VcQKy/nkMDu1qCZA WeLmb4RmrXaH0JYEwPeQIjVhFHLP23wL1Tf9kXiGNoCWvAEuu+0eV7f2nZCEoFm6LSWLjl k0KgjeZTM7wOyAmE5BHYL3rzReRPuXK6PgGwkPwmO1z0xe2+BtLAyTX5blE1b+OlwiJWxN o1qFwWeMImP15hWlIOeGFNhbzjDUEu2IE9P9Y6nCSY9EqpkBdlXjPpvfLjROPQ== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1654110291; a=rsa-sha256; cv=none; b=pwb+vsgsGygmxq8sTO9mi0TTEiJtkgb/phatqbBMsBanBgQMQC3AH2syUSRPqOltsT3ntR 19Aouxd79iddYd5fzWHjIT//y8RLPsmx38ysYXfEyQgxdyC7tWbLBq8gejnkR1AeuInJ+c HrfIge3ySwrdinVottDIuz9YHZ+S2azhf3BaYzUqciI829EBnRVCKtX4iLDYd67ij2s8pk k0gHRY1ggZM2sOsiynKuKa4tcM7pqYitig/wrceOKhjLkoYmcqBbZS/oV25uSznXaN5MtJ UrzbJ8rgyE+6AUdPRxrw9k1BPkqaAuLh7+eWV+9+o1wpsWpAqCPVa1SY+5TyqQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=mAIqXGvG; dmarc=pass (policy=none) header.from=posteo.net; spf=pass (aspmx1.migadu.com: domain of "help-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="help-guix-bounces+larch=yhetil.org@gnu.org" X-Migadu-Spam-Score: -5.73 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=mAIqXGvG; dmarc=pass (policy=none) header.from=posteo.net; spf=pass (aspmx1.migadu.com: domain of "help-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="help-guix-bounces+larch=yhetil.org@gnu.org" X-Migadu-Queue-Id: B81D218DCC X-Spam-Score: -5.73 X-Migadu-Scanner: scn0.migadu.com X-TUID: 1Q+1yfB4mxuR Hej, Einar Largenius writes: > Hi, thanks for the reply. > > I want to have geiser accessible. It would make trailing and error and > finding symbols much easier. > >> (use-modules (gnu packages)) > > I forgot to include this in my example. The Geiser repl tells me there are > no code for the module. It works fine when using guix repl though. > > I checked the value of %load-path when I start geiser and compare it > with the value I get with guix repl. They look very similar except the > load path provided with guix repl is provides an additional path: > > "/gnu/store/6qfk8gs9qyk5vx79bb62gf4gz9n7wp95-guix-module-union/share/= guile/site/3.0" > > I don't find anything similar in my .guix-profile. Yeah, it is the same on my machine. I'm using guix on a foreign distro. I poked around with this a bit yesterday but couldn't find a satisfying solution. But my solution for #2 came quite close. > > I see a few alternatives. > > 1. Identify which package includes this "guix-module-union" and add it > to my profile. The one that includes that is guix itself. And that is stamped into the guix commandline tool. See: cat `which guix` Or guix/self.scm:581 and guix/self.scm:515 in the source code. Closest you get is adding guix to a temporary profile like guix shell guix guile I would not recommend adding guix to your .guix-profile, as that messes up quite a few things. The guix you install is not neccessary the guix you are running. It gets really meta when you install your package manager with your package manager :). So I would recommend using `guix=C2=A0shell` for that. > 2. Dynamically add the path using wildcards to my .guile startup file. > Adding a hardcoded path will break this during every update. This will not break during every update, but highly likely to break when you run `guix=C2=A0gc`. As it is then paths are deleted in the store. Best I came up with is to first export the development environment of guix using: guix shell guile --development guix --export-manifest This will give you something that looks like this: ---8<----------------------------------------------------------------------= ----- ;; What follows is a "manifest" equivalent to the command line you gave. ;; You can store it in a file that you may then pass to any 'guix' command ;; that accepts a '--manifest' (or '-m') option. (concatenate-manifests (list (specifications->manifest (list "guile")) (package->development-manifest (specification->package "guix")))) ---------------------------------------------------------------------------= >8--- Then add your current guix's guile paths to the guile environment variables (assuming you have bash or something equivalent): ---8<----------------------------------------------------------------------= ----- export GUILE_LOAD_PATH=3D$HOME/.config/guix/current/share/guile/site/3.0:$G= UILE_LOAD_PATH export GUILE_LOAD_COMPILED_PATH=3D$HOME/.config/guix/current/lib/guile/3.0/= site-ccache:$GUILE_LOAD_COMPILED_PATH ---------------------------------------------------------------------------= >8--- Just adding the current guix's guile paths to guile will not include the dependencies guix needs. E.g. you'll see error messages like these `no code for module (gcrypt hash)` when trying to use (gnu packages). This is what `--development guix` in guix shell or `(package->development-manifest (specification->package "guix"))` in the manifest do. I.e. it will specify the development environment for guix. Then you can either use `guix shell -m ` to setup the package environment or `guix package -m ` to install the packages to your .guix-profile. Note that `guix package -m ` will remove all packages installed to the profile that are not listed in the manifest. So do a `guix package --export-manifest` first and combine that with the manifest above. An alternative to the autogenerated manifest from `guix shell`, is to simply fetch the propagated-inputs from the guix package and add that to the manifest: ---8<----------------------------------------------------------------------= ----- (use-modules (guix packages) ;; For package-propagated-inputs (gnu packages) ;; For specifications->manifest (gnu packages package-management)) ;; Access to the guix package (specifications->manifest `( "guile" ,@(map car (package-propagated-inputs guix)) )) ---------------------------------------------------------------------------= >8--- The (map car =E2=80=A6) is to just return the name of each propagated-input= of the guix package. As for the `(=E2=80=A6) and ,@ see the quasiquote section= in the guile manual[0]. [0] https://www.gnu.org/software/guile/manual/html_node/Expression-Syntax.h= tml > 3. Change so that geiser uses "guix repl" instead of "guile" when > starting a repl. > I quickly tested this by setting `geiser-guile-binary` to "guix repl". But it expects a name to a binary and not a binary with arguments. It is probably doable but would require more hacking to get this to work. > I lack the experience with both guix and scheme so none of the above > would be easy to do for me. The last alternative would probably be the > easiest for me. > I would say try my suggestion for #2. But if you just want to quickly get going with playing around with the repl. Use: guix shell guix guile -- emacs A caveat with the guix shell command is that the guix you get is most likely not the same guix you are running outside of the guix shell environment. And I'm far from an expert in either guix or guile so there are probably better ways to set this up. --=20 s/Fred[re]+i[ck]+/Fredrik/g