From patchwork Tue Oct 5 14:09:36 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Tournier X-Patchwork-Id: 33622 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 2FF2227BBE3; Tue, 5 Oct 2021 15:10:50 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_MSPIKE_H2, SPF_HELO_PASS,T_DKIM_INVALID autolearn=unavailable autolearn_force=no version=3.4.2 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id EC40027BBE1 for ; Tue, 5 Oct 2021 15:10:49 +0100 (BST) Received: from localhost ([::1]:56048 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mXl9c-0004Eq-Tm for patchwork@mira.cbaines.net; Tue, 05 Oct 2021 10:10:48 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:46666) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mXl8t-0004Da-6z for guix-patches@gnu.org; Tue, 05 Oct 2021 10:10:04 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:58231) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mXl8s-0001ZY-VU for guix-patches@gnu.org; Tue, 05 Oct 2021 10:10:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mXl8s-00046j-Ho for guix-patches@gnu.org; Tue, 05 Oct 2021 10:10:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#50515] [PATCH v2 1/2] website: Tweak 'GUIX_WEB_SITE_LOCAL'. References: <20210911001424.9860-1-zimon.toutoune@gmail.com> In-Reply-To: <20210911001424.9860-1-zimon.toutoune@gmail.com> Resent-From: zimoun Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Tue, 05 Oct 2021 14:10:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 50515 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 50515@debbugs.gnu.org Cc: zimoun Received: via spool by 50515-submit@debbugs.gnu.org id=B50515.163344299515751 (code B ref 50515); Tue, 05 Oct 2021 14:10:02 +0000 Received: (at 50515) by debbugs.gnu.org; 5 Oct 2021 14:09:55 +0000 Received: from localhost ([127.0.0.1]:41539 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mXl8l-00045t-Dk for submit@debbugs.gnu.org; Tue, 05 Oct 2021 10:09:55 -0400 Received: from mail-wr1-f41.google.com ([209.85.221.41]:43798) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mXl8j-00045a-6U for 50515@debbugs.gnu.org; Tue, 05 Oct 2021 10:09:54 -0400 Received: by mail-wr1-f41.google.com with SMTP id r7so22078346wrc.10 for <50515@debbugs.gnu.org>; Tue, 05 Oct 2021 07:09:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=QArQn51U+zXCwUtIw8PXoVBpPg++Wgae9DERMWn8Zac=; b=CIaxbL8DFHtarlr8nTZ6FqNbkUSnmPJj1rmfcu1CWzN0gZgLLdsCL8La7241qZVX9G f1SffcO643q30Sih/bRMV2ecceWy3j7wJ3spqDY4I1ZTvWbOOD5t8lwo0vRwkLbP75M7 Bc9+6l5VCtzjk4JEVwLCOnDrCiPVpAAG/dEMAC/k9v6NSG9jzSB/XEvDTN/ABVz6+sRw QKELMP1P+c/UImkrzdjxQvFTJrUJC5axjROBXInB1Q8hzDKqgL2V0GIc2B8/KWoBXUU5 Uss9hwgFiqkDUgJTTh2eX9sJDygcauh0r+85+UgSIM8YNIW8WL4XszkxWVV2FKRCykn1 53Og== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=QArQn51U+zXCwUtIw8PXoVBpPg++Wgae9DERMWn8Zac=; b=h3lykr2nnOmLEWzXqT3cBabnbQhXJTx072tJD53SDTj3BMsBUyaE5NrqtbjDPxeE/r Y+GxTJkbCh9mbt4d1EKC52csl3waeusN6zOerMwlkH01cGrEkcTiakYBirCzqqb6gDfn MxTVu1khx9c/4JW0Wcfy9ArJeJK5+HWohzwLAQ66RpXMY2AxeH1X3HoPLXUDcZNJc5rP CRIhzEDhVmLey6fk4im4FFaTUNY/Q8y926Bx8WcZYsX0Bta0/cUNGC3eWDRBU97i+80i G0Q+YRn1j6E33eDtsvczTDqecCpEhtNuCdkVzQh00cz/dvnQpKL14gjy9AnMQNE14X/U 4W8A== X-Gm-Message-State: AOAM532zI1SkXyW0MPU+TNdiVsC+on9QZx647YKREaoHzC1vcGisDbXb H/q/45DZC6nkPo/TwM5IvvK7y2Fc6QlFRA== X-Google-Smtp-Source: ABdhPJxk0OLVW310u8TA31HNe9DAlczBUZpx8bkQJJQttX14+0isLQ1lsv7OEnEy0mm48me8AqArAw== X-Received: by 2002:adf:f302:: with SMTP id i2mr11829364wro.18.1633442987396; Tue, 05 Oct 2021 07:09:47 -0700 (PDT) Received: from localhost.localdomain ([2a01:e0a:59b:9120:65d2:2476:f637:db1e]) by smtp.gmail.com with ESMTPSA id k9sm17478479wrz.22.2021.10.05.07.09.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 05 Oct 2021 07:09:47 -0700 (PDT) From: zimoun Date: Tue, 5 Oct 2021 16:09:36 +0200 Message-Id: <20211005140937.19272-1-zimon.toutoune@gmail.com> X-Mailer: git-send-email 2.29.2 MIME-Version: 1.0 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" X-getmail-retrieved-from-mailbox: Patches * website/apps/packages/data.scm (%package-list): Compare to 'yes' instead of any value. * website/README: Document it. --- website/README | 8 ++++++++ website/apps/packages/data.scm | 3 ++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/website/README b/website/README index ce2819f..bc623c5 100644 --- a/website/README +++ b/website/README @@ -37,6 +37,14 @@ commands: -- haunt build #+end_example +Any other value than =GUIX_WEB_SITE_LOCAL=yes= will build the full website +considering all the packages and not a small subset. Note that the final +website is built using the following command: + +#+begin_example + guix build -f .guix.scm +#+end_example + ** Serve locally #+begin_example LANG=en_US.UTF-8 guix environment -CN -m manifest.scm \ diff --git a/website/apps/packages/data.scm b/website/apps/packages/data.scm index d1bbc92..eb34d26 100644 --- a/website/apps/packages/data.scm +++ b/website/apps/packages/data.scm @@ -50,7 +50,8 @@ (string X-Patchwork-Id: 33623 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 5BF5027BBE3; Tue, 5 Oct 2021 15:11:04 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_MSPIKE_H2, SPF_HELO_PASS,T_DKIM_INVALID,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.2 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id BDFBD27BBE1 for ; Tue, 5 Oct 2021 15:11:03 +0100 (BST) Received: from localhost ([::1]:56890 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mXl9q-0004pA-Sd for patchwork@mira.cbaines.net; Tue, 05 Oct 2021 10:11:02 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:46668) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mXl8u-0004Dc-6T for guix-patches@gnu.org; Tue, 05 Oct 2021 10:10:07 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:58232) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mXl8t-0001Zu-5n for guix-patches@gnu.org; Tue, 05 Oct 2021 10:10:03 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mXl8t-00046q-0b for guix-patches@gnu.org; Tue, 05 Oct 2021 10:10:03 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#50515] [PATCH v2 2/2] website: Add 'computed-origin-method' packages to 'sources.json'. Resent-From: zimoun Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Tue, 05 Oct 2021 14:10:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 50515 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 50515@debbugs.gnu.org Cc: zimoun Received: via spool by 50515-submit@debbugs.gnu.org id=B50515.163344299715759 (code B ref 50515); Tue, 05 Oct 2021 14:10:02 +0000 Received: (at 50515) by debbugs.gnu.org; 5 Oct 2021 14:09:57 +0000 Received: from localhost ([127.0.0.1]:41541 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mXl8m-000467-P2 for submit@debbugs.gnu.org; Tue, 05 Oct 2021 10:09:57 -0400 Received: from mail-wm1-f46.google.com ([209.85.128.46]:35490) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mXl8k-00045c-7r for 50515@debbugs.gnu.org; Tue, 05 Oct 2021 10:09:55 -0400 Received: by mail-wm1-f46.google.com with SMTP id z184-20020a1c7ec1000000b003065f0bc631so3231328wmc.0 for <50515@debbugs.gnu.org>; Tue, 05 Oct 2021 07:09:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=J1ixy7v9ulTATuLK12zUG+8X8VozY0FWmbsamB2kBk4=; b=W/zL+QsyJKMRUFKEq/KAbAChoV/6UpNyK+Cq0N0LbMdsXmCS/MBkBqpiDiRrnARUAE ff4/fAr4Eijxmfs7s5uGQ+Nxvh8xeQxyAI62kY4Ej50st2swKee9Yz0Jz2QeVty/8/u4 Y8loMW17kLm9iOz4hJugp0FUIh1/V63xYN0y4xjJk6SNkve+FYBjdq6OLQ6sKtUTeSvt /h1Sp/8WqpAOlhqHhRpT0ZG/mD7nqHpJdXKiVG6+kLQLVUrEBCTgKfgNyzpHiPpv9khR DYuY72Q/5zzZynbhE94Sry3nFd5MYuoJoP0Ks9yTrE3SUxgJUlw91x/39PExFsffS0ju hT6w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=J1ixy7v9ulTATuLK12zUG+8X8VozY0FWmbsamB2kBk4=; b=GE6PGrx3ub366G11XvQo4NWBkZpNVfuoxTSbnCksVPN+gdEGhM3/LRh/ydAybbHQDY zly0sB9/KNzDajFVG+HHetdBtfjfE5L3Yu2chX06LDdykQbSfTZxuzNXVwkYLDSOu5RI oIZqTRGpFO03hPir1w1Z+/Nj7IBvk0u3bKjp5F/m7DAKBLXJ/ivi8ltJogBjifOPCFrZ 5GjqhCzdGh4vI31mfmqK35aASeUqDe768gIulPI8TzWMbObcQg+BNDRt4WPjflRuYUCU G6+ydXj2gMZ0wM0CHlbAMVbH/FLkdTFQGEi5GuhWsC0WD1E6DRwtCtdUGDR4NESXBors bnKQ== X-Gm-Message-State: AOAM532ikvGueun4H/GWo5MihFbNsqFI3gNEmxdggbNMaqtgLYQk9Ez7 fr8kU4SsEw17lwyB81QpHjDnBHSOnuR6FA== X-Google-Smtp-Source: ABdhPJwslJTC1xoTpIjBpmQeuZWYqIzPkzpJnLL90NlsavezgnOS+NQhmlVLXhFad4IUp3Kq/JzZ4A== X-Received: by 2002:a1c:4e11:: with SMTP id g17mr2669844wmh.17.1633442988403; Tue, 05 Oct 2021 07:09:48 -0700 (PDT) Received: from localhost.localdomain ([2a01:e0a:59b:9120:65d2:2476:f637:db1e]) by smtp.gmail.com with ESMTPSA id k9sm17478479wrz.22.2021.10.05.07.09.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 05 Oct 2021 07:09:48 -0700 (PDT) From: zimoun Date: Tue, 5 Oct 2021 16:09:37 +0200 Message-Id: <20211005140937.19272-2-zimon.toutoune@gmail.com> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20211005140937.19272-1-zimon.toutoune@gmail.com> References: <20211005140937.19272-1-zimon.toutoune@gmail.com> MIME-Version: 1.0 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" X-getmail-retrieved-from-mailbox: Patches With Guix 9875f9bca3976bf3576eab9be42164fde454597e, the packages considered are IceCat and the Linux kernel; see: gnu/packages/gnuzilla.scm and gnu/packages/linux.scm. * website/apps/packages/builder.scm (gexp-references): Unexported procedure from the module '(guix gexp)'. (origin->json): Add 'computed-origin-method' case. (package-json-builder): Adjust. (sources-json-builder): Idem. [flatten]: New procedure. --- website/apps/packages/builder.scm | 141 +++++++++++++++++++----------- 1 file changed, 89 insertions(+), 52 deletions(-) diff --git a/website/apps/packages/builder.scm b/website/apps/packages/builder.scm index fb53215..9237d89 100644 --- a/website/apps/packages/builder.scm +++ b/website/apps/packages/builder.scm @@ -2,7 +2,7 @@ ;;; Copyright © 2017 Ludovic Courtès ;;; Copyright © 2019 Ricardo Wurmus ;;; Copyright © 2019 Nicolò Balzarotti -;;; Copyright © 2020 Simon Tournier +;;; Copyright © 2020, 2021 Simon Tournier ;;; ;;; Initially written by sirgazil ;;; who waives all copyright interest on this file. @@ -49,11 +49,14 @@ #:use-module ((guix base64) #:select (base64-encode)) #:use-module ((guix describe) #:select (current-profile)) #:use-module ((guix config) #:select (%guix-version)) + #:use-module (guix gexp) #:use-module (json) #:use-module (ice-9 match) #:use-module ((web uri) #:select (string->uri uri->string)) #:export (builder)) +;;; Required by 'origin->json' for 'computed-origin-method' corner cases +(define gexp-references (@@ (guix gexp) gexp-references)) ;;; ;;; Application builder. @@ -98,7 +101,7 @@ (define method (origin-method origin)) - (define uri ;represented as string + (define uri (origin-uri origin)) (define (resolve urls) @@ -106,53 +109,70 @@ (append-map (cut maybe-expand-mirrors <> %mirrors) (map string->uri urls)))) - `((type . ,(cond ((or (eq? url-fetch method) - (eq? url-fetch/tarbomb method) - (eq? url-fetch/zipbomb method)) 'url) - ((eq? git-fetch method) 'git) - ((or (eq? svn-fetch method) - (eq? svn-multi-fetch method)) 'svn) - ((eq? hg-fetch method) 'hg) - (else #nil))) - ,@(cond ((or (eq? url-fetch method) - (eq? url-fetch/tarbomb method) - (eq? url-fetch/zipbomb method)) - `(("urls" . ,(list->vector - (resolve - (match uri - ((? string? url) (list url)) - ((urls ...) urls))))))) - ((eq? git-fetch method) - `(("git_url" . ,(git-reference-url uri)))) - ((eq? svn-fetch method) - `(("svn_url" . ,(svn-reference-url uri)))) - ((eq? svn-multi-fetch method) - `(("svn_url" . ,(svn-multi-reference-url uri)))) - ((eq? hg-fetch method) - `(("hg_url" . ,(hg-reference-url uri)))) - (else '())) - ,@(if (or (eq? url-fetch method) - (eq? url-fetch/tarbomb method) - (eq? url-fetch/zipbomb method)) - (let* ((content-hash (origin-hash origin)) - (hash-value (content-hash-value content-hash)) - (hash-algorithm (content-hash-algorithm content-hash)) - (algorithm-string (symbol->string hash-algorithm))) - `(("integrity" . ,(string-append algorithm-string "-" - (base64-encode hash-value))))) - '()) - ,@(if (eq? method git-fetch) - `(("git_ref" . ,(git-reference-commit uri))) - '()) - ,@(if (eq? method svn-fetch) - `(("svn_revision" . ,(svn-reference-revision uri))) - '()) - ,@(if (eq? method svn-multi-fetch) - `(("svn_revision" . ,(svn-multi-reference-revision uri))) - '()) - ,@(if (eq? method hg-fetch) - `(("hg_changeset" . ,(hg-reference-changeset uri))) - '()))) + (if (eq? method (@@ (guix packages) computed-origin-method)) + ;; Packages in gnu/packages/gnuzilla.scm and gnu/packages/linux.scm + ;; represent their 'uri' as 'promise'. + (match uri + ((? promise? promise) + (match (force promise) + ((? gexp? g) + (map origin->json + (filter-map (match-lambda + ((? gexp-input? thing) + (match (gexp-input-thing thing) + ((? origin? o) o) + (_ #f))) + (_ #f)) + (gexp-references g)))) + (_ `((type . #nil)))))) + ;;Regular packages represent 'uri' as string. + `((type . ,(cond ((or (eq? url-fetch method) + (eq? url-fetch/tarbomb method) + (eq? url-fetch/zipbomb method)) 'url) + ((eq? git-fetch method) 'git) + ((or (eq? svn-fetch method) + (eq? svn-multi-fetch method)) 'svn) + ((eq? hg-fetch method) 'hg) + (else #nil))) + ,@(cond ((or (eq? url-fetch method) + (eq? url-fetch/tarbomb method) + (eq? url-fetch/zipbomb method)) + `(("urls" . ,(list->vector + (resolve + (match uri + ((? string? url) (list url)) + ((urls ...) urls))))))) + ((eq? git-fetch method) + `(("git_url" . ,(git-reference-url uri)))) + ((eq? svn-fetch method) + `(("svn_url" . ,(svn-reference-url uri)))) + ((eq? svn-multi-fetch method) + `(("svn_url" . ,(svn-multi-reference-url uri)))) + ((eq? hg-fetch method) + `(("hg_url" . ,(hg-reference-url uri)))) + (else '())) + ,@(if (or (eq? url-fetch method) + (eq? url-fetch/tarbomb method) + (eq? url-fetch/zipbomb method)) + (let* ((content-hash (origin-hash origin)) + (hash-value (content-hash-value content-hash)) + (hash-algorithm (content-hash-algorithm content-hash)) + (algorithm-string (symbol->string hash-algorithm))) + `(("integrity" . ,(string-append algorithm-string "-" + (base64-encode hash-value))))) + '()) + ,@(if (eq? method git-fetch) + `(("git_ref" . ,(git-reference-commit uri))) + '()) + ,@(if (eq? method svn-fetch) + `(("svn_revision" . ,(svn-reference-revision uri))) + '()) + ,@(if (eq? method svn-multi-fetch) + `(("svn_revision" . ,(svn-multi-reference-revision uri))) + '()) + ,@(if (eq? method hg-fetch) + `(("hg_changeset" . ,(hg-reference-changeset uri))) + '())))) (define (packages-json-builder) "Return a JSON page listing all packages." @@ -167,7 +187,12 @@ ,@(if cpe-name `(("cpe_name" . ,cpe-name)) '()) ,@(if cpe-version `(("cpe_version" . ,cpe-version)) '()) ,@(if (origin? (package-source package)) - `(("source" . ,(origin->json (package-source package)))) + `(("source" . ,(let ((json (origin->json (package-source package)))) + (match json + ((('type . x) other ...) + json) + ((head tail ...) ;multi-origin + head))))) ;XXXX: Improve this approximation '()) ("synopsis" . ,(package-synopsis package)) ,@(if (package-home-page package) @@ -195,11 +220,23 @@ (define (package->json package) `(,@(if (origin? (package-source package)) (origin->json (package-source package)) - `(("type" . "no-origin") + `((type . "no-origin") ("name" . ,(package-name package)))))) + (define (flatten lst) + ;; Convert nested lists to simple list + `(,@(if (null? lst) + '() + (match lst + ((head tail ...) + (match head + ((('type . x) other ...) + (cons head (flatten tail))) + (_ + (append (flatten head) (flatten tail))))))))) + (make-page "sources.json" - `(("sources" . ,(list->vector (map package->json (all-packages)))) + `(("sources" . ,(list->vector (flatten (map package->json (all-packages))))) ("version" . "1") ("revision" . ,(match (current-profile)