From debbugs-submit-bounces@debbugs.gnu.org Fri Feb 17 09:56:43 2023 Received: (at 61343) by debbugs.gnu.org; 17 Feb 2023 14:56:43 +0000 Received: from localhost ([127.0.0.1]:40984 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pT2AF-0007xg-31 for submit@debbugs.gnu.org; Fri, 17 Feb 2023 09:56:43 -0500 Received: from mail-wr1-f52.google.com ([209.85.221.52]:44837) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pT2A9-0007xN-0O for 61343@debbugs.gnu.org; Fri, 17 Feb 2023 09:56:37 -0500 Received: by mail-wr1-f52.google.com with SMTP id ba10so915768wrb.11 for <61343@debbugs.gnu.org>; Fri, 17 Feb 2023 06:56:36 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1676645791; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=A2LCfKH/5SaXcgXYU5U98B32MLZGfXffUG43avL/JL0=; b=WF3Abz6tSwAF5kOefetkQqeil88+496hj3lnvkgDURqoVSOO6lVI7ofG8i7KBGgE2q vpzeyausQYiMOs92FCyfxDxpcjhPrzZvAHzrnsXewLJquPLv6P30FOY84V+MZ2RaKRPp 020ZZsH/5I3Wmyw2ms1Eh6wJ9fw5jjrIPjPrBMtEs/JdftKxyS6c/oC5Ou5MvjfHXiL9 h7Uk4ZTXSpZIwQ4AaBYGBXEG/q4dj4kkCGvwl1zV0rFl0QDFxi6y3kkvMMlLGpTvPnyq gxIwKZkSQKMo2zn6uwrNftezoxZ+c/T5nX2lexXOuYNv9qd8pfNAFHtBa1RvvqrU6DHt gBHQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1676645791; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=A2LCfKH/5SaXcgXYU5U98B32MLZGfXffUG43avL/JL0=; b=IgPoTolflYAei9X7BMI1Tcm38TgMb9rz+syexRTM3AzDgvGOJ5LBqO9ukowOOZi6eH /89BmmSEhJjTwazOWU2xHIOaeuihh1lIXvZx++OF/I/nFZNTYggWs7pm9xMigO34dl0g GtCca/zmyUEkyCKcTlgY65g/JhAFz1x/4H9dYrJep6pAAaZl2TxjxYG8CeZ3q+vL3lx7 G09wZiD05vvtDoOxVs9HJpMsnrnKPSpwmmrIKLw41S0WxF8V9wdDJino3byD9b/51xT3 Hr2BBEB6n4VCd961Vawew8Sb+xKI+2Ocw4uKpul/RXoKAyoaqARZupP+aPi/gGUvW/3V 70BQ== X-Gm-Message-State: AO0yUKXGR+YFBFM1T4xfoDRvaE25PLCp4QnTkyKpMhZOhYbJ8iXfTbSy DQZkIYfw2bjjLxgWAw0JIcc= X-Google-Smtp-Source: AK7set+c5uR0SkGEEZxF3SM9DCrRqp6s1Ctsk1v5+CGFqUy2KgO5msr7SSEyr2a8bFSaNmwKw6Hhng== X-Received: by 2002:a5d:504c:0:b0:2c5:5e37:653a with SMTP id h12-20020a5d504c000000b002c55e37653amr810258wrt.7.1676645790705; Fri, 17 Feb 2023 06:56:30 -0800 (PST) Received: from localhost.localdomain ([193.48.40.241]) by smtp.gmail.com with ESMTPSA id j2-20020adfea42000000b002c5804b6afasm4495839wrn.67.2023.02.17.06.56.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 17 Feb 2023 06:56:30 -0800 (PST) From: Simon Tournier To: Josselin Poiret via Bug reports for GNU Guix , Simon Tournier , =?UTF-8?q?=E5=AE=8B=E6=96=87=E6=AD=A6?= , 61343@debbugs.gnu.org Subject: [PATCH v2] scripts: repl: Extend REPL %load-path with all channels. Date: Fri, 17 Feb 2023 15:56:27 +0100 Message-Id: <20230217145627.85062-1-zimon.toutoune@gmail.com> X-Mailer: git-send-email 2.38.1 In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 61343 Cc: Josselin Poiret X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Fixes . Reported by 宋文武 . * guix/scripts/repl.scm (define-command): Before starting the REPL, run (current-profile) which makes available all channels. --- Hi, Instead I am proposing this, it avoids to load all the module. For testing, once applied to some Guix checkout, just run: $ ./pre-inst-env guix pull --disable-authentication -C /tmp/channels.scm -p /tmp/new $ echo '(use-modules (rde features))' | /tmp/new/bin/guix repl /dev/stdin where /tmp/channels.scm reads, (list (channel (name 'rde) (url "https://git.sr.ht/~abcdw/rde") (introduction (make-channel-introduction "257cebd587b66e4d865b3537a9a88cccd7107c95" (openpgp-fingerprint "2841 9AC6 5038 7440 C7E9 2FFA 2208 D209 58C1 DEB0")))) (channel (name 'guix) (url "/home/simon/src/guix/guix"))) tweaking the path to your Guix checkout. Cheers, simon guix/scripts/repl.scm | 1 + 1 file changed, 1 insertion(+) diff --git a/guix/scripts/repl.scm b/guix/scripts/repl.scm index 787c63d48e..fc55d79c41 100644 --- a/guix/scripts/repl.scm +++ b/guix/scripts/repl.scm @@ -211,6 +211,7 @@ (define script ((guile) (save-module-excursion (lambda () + (current-profile) ;Run (%package-module-path) as explained above. (set-user-module) ;; Do not exit repl on SIGINT. ((@@ (ice-9 top-repl) call-with-sigint) base-commit: cb45e9d0dc6cbe6f69a858f71252411610b4ce82 -- 2.38.1