From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp10.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms9.migadu.com with LMTPS id ECJJLzOkL2RRYQEASxT56A (envelope-from ) for ; Fri, 07 Apr 2023 07:03:47 +0200 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp10.migadu.com with LMTPS id eJ9aLjOkL2SMVAEAG6o9tA (envelope-from ) for ; Fri, 07 Apr 2023 07:03:47 +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 80AAF2C7F4 for ; Fri, 7 Apr 2023 07:03:47 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pkdb2-0006Xg-9U; Fri, 07 Apr 2023 00:21:08 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pkdb0-0006XW-OR for help-guix@gnu.org; Fri, 07 Apr 2023 00:21:06 -0400 Received: from mail-vs1-xe2f.google.com ([2607:f8b0:4864:20::e2f]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pkday-0003FV-EE for help-guix@gnu.org; Fri, 07 Apr 2023 00:21:06 -0400 Received: by mail-vs1-xe2f.google.com with SMTP id g17so36040308vst.10 for ; Thu, 06 Apr 2023 21:21:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1680841262; h=to:subject:message-id:date:from:mime-version:from:to:cc:subject :date:message-id:reply-to; bh=rsPXXI0GzRhb6ny9qID0AimOedPpfxqM3DK/jeaxVFc=; b=L297aeEoxSxytf5gQdsJ8W1LpcrXcVFZdXWWCUCCshr6F66GBIx6nVnWa504cwk36R T7H3Dc0JN1UKEvFrtA7s4S7QZaBYbKeMu2mt7DfrKTsGuJR12vBflcRUNyKGmjiUXBFL CkPwuJvekErHV16NYSUUSy7YSeIDedHT1HE1yRD+A3C+uplLji1pQT1KAXTSTeXbHa8Q L3iKNSp/ZpRBQAM/3VmtFWrNIrzy4O5bCTzkB1yPt7NzC8ZjGlfye47h/atFjbeYhAiV V0r99acRugga9XKieJnI2qJhK3J378An030DDjsmNHwQVKzAuydYwv/95z9EgX6N9VJv LI+g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1680841262; h=to:subject:message-id:date:from:mime-version:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=rsPXXI0GzRhb6ny9qID0AimOedPpfxqM3DK/jeaxVFc=; b=yxF0+BDRjT+SB3nLFUhkTPTOEh95AXCytTF02AS2lx1CqihafnSex447h60+QGHQWC 0uzZXRNknUhxeRd6XXqXVjaJdt10zcqA8ZMvvWDO5f8yP3n1Uak/GRTGfjjgQDfhEiKr fuT7Zufh2V2rrytgLb/OQdhvChjYDGWN2exXpTPrDF1C1cCT7igawrk051MmXEPJheDf Ln7yjqxhNdgxEE+fQbiqyyfeYXQRQyjQvwvY0TU6wRhElAK6TcuusDvEXM6+i+VC/rtc aiLZ6Bp2cVV2JCxuIuqFQzwtXiPwI9QH7XsJhv9f5oI0FaiZNN7nTgeUyeGC/CxccIN7 RfVg== X-Gm-Message-State: AAQBX9f0dq/OPBbZG3+ZFCchxS5rQUZHcmBefFLrhXfDLsFv7wrQaB6+ OKZ3OJvq1Gb2hMWjH8L43reSeYBmAZCg7pUdxgieutRmXtk= X-Google-Smtp-Source: AKy350a9xvQy9Jt8pbY4+jGjkiMDlsyE1bMbWK6QNYzn2zNYaUbalj+4wtV2XzB265D9iz0ldxI61fz473mxTEx9P9U= X-Received: by 2002:a67:d28a:0:b0:425:8cbd:f74f with SMTP id z10-20020a67d28a000000b004258cbdf74fmr453846vsi.3.1680841262211; Thu, 06 Apr 2023 21:21:02 -0700 (PDT) MIME-Version: 1.0 From: Rodrigo Morales Date: Fri, 7 Apr 2023 04:20:46 +0000 Message-ID: Subject: Newbie: How to debug my custom packages? Is there something like Emacs' edebug but for Guix packages? To: help-guix@gnu.org Received-SPF: pass client-ip=2607:f8b0:4864:20::e2f; envelope-from=moralesrodrigo1100@gmail.com; helo=mail-vs1-xe2f.google.com X-Spam_score_int: -17 X-Spam_score: -1.8 X-Spam_bar: - X-Spam_report: (-1.8 / 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, FREEMAIL_ENVFROM_END_DIGIT=0.25, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.29 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-bounces+larch=yhetil.org@gnu.org X-Migadu-Country: US X-Migadu-Flow: FLOW_IN ARC-Seal: i=1; s=key1; d=yhetil.org; t=1680843827; a=rsa-sha256; cv=none; b=hiHL7yotnXWXJ1ojmAFQsW03Iz8xCquFFXEtOSD+Lnk9hxhxtkqdS0dtW0nkVSRYFA4EFw yH8uuEmdyczhaAWdsEEjSR1OYp2fP/B/t0/J9R9l3ze3sM+I0iZLag61/rGkGhIyVjLPAd dDcExBYsfOsMxwdVF0zNPCoB7vMkYe0R9ZMPFnO/qYfBn0qoNbN03KZvrzKwrS0b9GM16g rz8FUcCgl7ugxOcpngl6D0y089JgyYmb1SYY5VP6GJnqnY+nhSc6z/GFXE/UufzdfJOMM2 KKkfwFwc+sfGS1AfGIcYQe/afvR5unRHX9iLTRl/TCYTwDZr23GYuEC1WyDDYQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("body hash did not verify") header.d=gmail.com header.s=20210112 header.b=L297aeEo; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none); 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" ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1680843827; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=+w8tUhV8PF59Oav6fed7h41BlRAGlyVkSKMu4wKtito=; b=kzEgnOQaHrFwStCNdrnrY+8wWRySE3d+84SbGzDGnFRBG90CBLxPyumPovBBhmbXmOzPHZ kAb+13RbdRkv4Z/+Jw41UP6X/DJ8XLPihMQnkhdGL704e8f1mRB0zlym1NBJJ+91j/zVcW moFSoFZbU3Rk6/QovhjMchy8iGql1Qwtj7hY1TnwdzPZ3QCtAyBR2/TiAmpTi1L3U2XJps qU2uNwBJ0ahE/7Gxs35N1oe0Rhb8JPMw92jbzUr22iyiO5Y0Yay5ioudwCpd+18AYLCXd5 sNE7x8F9zjVkAqevLCn25bfPW4t9hIBoFg0Xv7ra3njojFDECNdRAyWQTRGMCg== X-Migadu-Spam-Score: 6.98 X-Migadu-Scanner: scn1.migadu.com Authentication-Results: aspmx1.migadu.com; dkim=fail ("body hash did not verify") header.d=gmail.com header.s=20210112 header.b=L297aeEo; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none); 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-Spam-Score: 6.98 X-Migadu-Queue-Id: 80AAF2C7F4 X-TUID: n59iGz9aAxqT Table of Contents _________________ 1. The problem 2. Additional information 1 The problem ============= I'm learning how to define my own Guix packages. To debug the packages that I write, I'm currently repeatedly executing the command `guix package -i' , check whether the downloaded files have been placed in the correct locations. If the installation failed, I switched back to the previous generation, do some changes and repeat the same process. However, I feel there's a better way to do this, because this is a rather slow process. Besides that, there are some variables whose value I don't know how to print or see their current value during the entire installation of the package. For example, I've defined the following Guix package (see code block below). In this package, I'd like to be able to know the result of the evaluation of `(string-append #$output "/share/rime-data")' during installation. I know this can be inferred, because `#$output' is a commonly used term. However, some sexps are more complex and I'd also be interested in see the results they yield to. ,---- | (define-module (rime) | #:use-module (guix licenses) | #:use-module (guix packages) | #:use-module (guix gexp) | #:use-module (guix build-system trivial) | #:use-module (guix git-download)) | | (define-public rime-wubi-8105 | (package | (name "rime-wubi-8105") | (version "1.0") | (source (origin | (method git-fetch) | (uri (git-reference | (url "https://github.com/rdrg109/wubi-8105") | (commit "3e81f26ac6f261ad5bb361ef23bc4a7df6a088d1"))) | (file-name (git-file-name name version)) | (sha256 | (base32 | "133vf7gsicqikv4kyl1rx0d1yiblgihis1x8gm9h21k59ql8gadn")))) | (build-system trivial-build-system) | (arguments | (list | #:modules `((guix build utils)) | #:builder | #~(begin | (use-modules (guix build utils)) | (chdir (assoc-ref %build-inputs "source")) | (install-file "wubi86_8105.dict.yaml" (string-append #$output "/share/rime-data")) | (install-file "wubi86_8105.schema.yaml" (string-append #$output "/share/rime-data"))))) | (synopsis "Wubi86 input method of standard Chinese characters for RIME") | (description "This package contains a RIME dictionary and schema for the 86 version | of Wubi, a shape-based input method for Chinese characters. The domain | of characters are those characters from the Table of General Standard | Chinese Characters (https://www.wikidata.org/wiki/Q14941454).") | (home-page "https://github.com/rdrg109/wubi-8105") | (license lgpl3))) `---- 2 Additional information ======================== I have previously defined my own Emacs packages and what I found useful was the [edebug utility] which allows me to step through any step of the function and see the value of any variable at any point. I'm wondering if there's something like that but for Guix packages. Any other tool that can help me debug the packages that I write is also appreciated. [edebug utility]: https://www.gnu.org/software/emacs/manual/html_node/elisp/Using-Edebug.html)