From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id 4HrZNLziXmO9YQEAbAwnHQ (envelope-from ) for ; Sun, 30 Oct 2022 21:46:52 +0100 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id sLz5NLziXmNAUgEAauVa8A (envelope-from ) for ; Sun, 30 Oct 2022 21:46:52 +0100 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 8D62F81F5 for ; Sun, 30 Oct 2022 21:46:52 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1opFCB-0003IE-S8; Sun, 30 Oct 2022 16:46:15 -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 1opFCA-0003I7-0S for guix-devel@gnu.org; Sun, 30 Oct 2022 16:46:14 -0400 Received: from mail-wm1-x331.google.com ([2a00:1450:4864:20::331]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1opFC7-0002mp-Dk for guix-devel@gnu.org; Sun, 30 Oct 2022 16:46:13 -0400 Received: by mail-wm1-x331.google.com with SMTP id l16-20020a05600c4f1000b003c6c0d2a445so6965364wmq.4 for ; Sun, 30 Oct 2022 13:46:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=beadling-co-uk.20210112.gappssmtp.com; s=20210112; h=mime-version:date:message-id:subject:to:from:user-agent:from:to:cc :subject:date:message-id:reply-to; bh=BUVF38OBFnPoS1OOcd2M9pYl9vWPzPLFH697kMJobyQ=; b=yX4XhfJBt0kaMugEgyl2DGTv70v0vsD+XQFsOG+we4fI71z2O1kG8pJ8XTULRobPH5 n5/AGPasme+bct2CirStzQQqB4eJCmkUKNaTysd+YjwrWVOELDDrMqJQOAUYDEV3n3J/ lLHlFIGxr0Gmm5j0XcGfNLqrNkH7xQMaWQC0hB+Gy5uKJ4NHns99UX+bz/RZBRe75pFH 7ySopnw5qFg2pKZTB5VUGo16cv4uxu0InQCycEgsBzElGWJaOasGYBrWmoIJLrn4K4Kk NeJSd6pgv8oa9mRo8PCRaBpaYf7UomnE+q2lQMc0utyMDoy2P5CKI8uulgTqGzM8UAwW AVRw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=mime-version:date:message-id:subject:to:from:user-agent :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=BUVF38OBFnPoS1OOcd2M9pYl9vWPzPLFH697kMJobyQ=; b=opx2PxymwZNoHgYdYS4gf6/9nLjWplOLanUNISbAEz5thmPlcAzx6vQyEGROIuutLh AkfHGDZ4H1ovkDJuxi6dpU78IRScCYDszoxARQrsDxUKOa3GYgwFWM4TMKYn7Nfez5M6 KG1I15GBvORZZHlPgdp98CgSvvjPZmT27UpycBG1Ehv4+PLftXOrcw2Ybg1sFF62WcbG tTsY7+ohUG00smaTJiZKjpG92JQ++Lr27g0h3H/2SwFh07rc2JNUnDkCsjwb2ng6FLi3 6kUp6scUdhhE/t9d9AcaHUbAJL+Rmiz/TP04q4sgLzlXfHDnUve25IZLyDQzna24GLHM FMvg== X-Gm-Message-State: ACrzQf2FqGkah588K1XztcEWDEWjgTemjDmNIPOEmaSy9INV5KbliElH 6EC0+oUbTMGMHi4JP23wSPGfd50Rgqqvsvg6 X-Google-Smtp-Source: AMsMyM5hdicqAo3iCZFYmH0j6A2Tffr+toQX75M9X/iCf46uaxIzHsPNxzuT0cUz+p+O0x68g1oJcg== X-Received: by 2002:a05:600c:4ed0:b0:3cd:3422:62d8 with SMTP id g16-20020a05600c4ed000b003cd342262d8mr15917090wmq.154.1667162767600; Sun, 30 Oct 2022 13:46:07 -0700 (PDT) Received: from xps13 ([2a02:6b61:74a5:0:3e3e:75ff:de88:7a90]) by smtp.gmail.com with ESMTPSA id bo30-20020a056000069e00b0022cce7689d3sm6158101wrb.36.2022.10.30.13.46.06 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 30 Oct 2022 13:46:06 -0700 (PDT) User-agent: mu4e 1.4.15; emacs 27.2 From: Phil To: guix-devel@gnu.org Subject: Compile skribilo doc containing guix channel references Message-ID: <87edup9h0y.fsf@beadling.co.uk> Date: Sun, 30 Oct 2022 20:46:05 +0000 MIME-Version: 1.0 Content-Type: text/plain Received-SPF: none client-ip=2a00:1450:4864:20::331; envelope-from=phil@beadling.co.uk; helo=mail-wm1-x331.google.com X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_NONE=0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: guix-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "Guix-devel" Errors-To: guix-devel-bounces+larch=yhetil.org@gnu.org X-Migadu-Flow: FLOW_IN X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1667162812; 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=BUVF38OBFnPoS1OOcd2M9pYl9vWPzPLFH697kMJobyQ=; b=XfN1L6HIoy+XYJUyXNJLyIPlAifsN9adMh2LmjFDNs6wL4kABkhwgXujGeUDp/WJRmd1FD lE9qR0XQtkuTrs6IE+DWhTs7XeVaxestmNe7/nBql6SpcDhrz1EseTKmG53kkytOuv4m1g EOb7yRK/TiacwQ4CJlU7Dydcy6ejwbvdbRRPUuXgQg/0BJFlfQoMXQBgWlh4g3U/l0/AlP jwBCAiTsbfPgiPNXKwOP1LPPkey7j5P5AybNzyVb8zqp/3/UN3Cg2CXviofW28AN2l/1rI W4svxpaFSxhROUiopsJ9O+kbvdFpTO4EMGQomUEpXFwOfU5tkpxouSwMT9bE4w== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1667162812; a=rsa-sha256; cv=none; b=fiIn+52eRFtRpEszSoMxnRMxSL0lGWtXWbg6hrrQ3RlhoiOBwTeh058Qc3vsCWL3wgtQoK NH4dnuO3oPChbvvjvOpaMRfVcsulZrzAzJAssg5sPn3LTUSb4nHw33X9J5Y0gXq/tBqOiq 4UyWxCAInDaWlh94RlS+lfpLTHVJyNJuBW1cSPKQXHpGHTKULIVLHy8LWEGwdfSUVTHZ8G 0A3p6jAT5Gwh1gvvHWs8rwI24TjkxxIeMLbuVAvJGtSvRcYiJNHk78dsVLlfmBEfPn62Z1 kvwwu40EH6RLIlRnZbTZC4Nb53Mk7z4matmsT4fkC9AXN+d3i+7B/dLstMckNg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=beadling-co-uk.20210112.gappssmtp.com header.s=20210112 header.b=yX4XhfJB; dmarc=none; spf=pass (aspmx1.migadu.com: domain of "guix-devel-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-devel-bounces+larch=yhetil.org@gnu.org" X-Migadu-Spam-Score: -8.75 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=beadling-co-uk.20210112.gappssmtp.com header.s=20210112 header.b=yX4XhfJB; dmarc=none; spf=pass (aspmx1.migadu.com: domain of "guix-devel-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-devel-bounces+larch=yhetil.org@gnu.org" X-Migadu-Queue-Id: 8D62F81F5 X-Spam-Score: -8.75 X-Migadu-Scanner: scn0.migadu.com X-TUID: zJMc+T2c2mNL Hi all, I'd like to document a private guix channel using Guile-based document framework: Skribilo - https://www.nongnu.org/skribilo/. The idea is that the guix channel repo will contain a skb file which can then reference code in the channel by setting the source-path and then using the :definition in the source function to reference bits of the package I want to talk about in my document. (source :language [:tab 8] [:definition] [:stop] [:start] [:file]) This works really well, but it got me thinking - what would be even cooler would be if I could import modules in my channel and actually execute channel functions to generate document output as part of the document compilation process, rather than just display the package code! The problem with this is that in order to import modules in my channel, I'd also have to have the guix core modules on my load-path at skribilo compilation time, otherwise skribilo complains when my channel makes use of guix modules. For example, if I just add the channel packages without guix core modules at the top of my skribilo document: (add-to-load-path (string-append (dirname (current-filename)) "/packages")) I understandably get something like the below: no code for module (guix git) Normally when scripting for guix you'd avoid the above problem by using 'guix repl -- some-script.scm' but here I'm using the skribilo executable, *not* guix as the entry point - it's not entirely clear to me how to get the required guix modules onto my load path? As an ill-advised hack I tried the following under guix repl: (use-modules (gnu packages)) (%package-module-path) Then I added the returned paths via add-to-load-path at the top of my skb file. This resulted in: $ GUILE_AUTO_COMPILE=0 guix environment --ad-hoc skribilo -- skribilo --target=html --source-path=.. guix-packages.skb -o index.html ice-9/boot-9.scm:1685:16: In procedure raise-exception: /gnu/store/8bab6fga7858whgd11f0wlsi2zsp4yr2-guix-module-union/share/guile/site/3.0/guix/packages.scm:361:5: Unknown #object: "#~" My guess is there is a better approach - any suggestions? Perhaps I can call the skribilo compiler from inside "guix repl" for example? Cheers, Phil.