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 ms9.migadu.com with LMTPS id aHB1B1FCcGRUHgEASxT56A (envelope-from ) for ; Fri, 26 May 2023 07:23:29 +0200 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 2FhoB1FCcGR+eAEAauVa8A (envelope-from ) for ; Fri, 26 May 2023 07:23:29 +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 8BA0AFCF3 for ; Fri, 26 May 2023 07:23:28 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1q2Pub-0005zF-QY; Fri, 26 May 2023 01:22:49 -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 1q2Pua-0005yz-Sa for help-guix@gnu.org; Fri, 26 May 2023 01:22:48 -0400 Received: from mail-vk1-xa35.google.com ([2607:f8b0:4864:20::a35]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1q2PuZ-00040U-3E for help-guix@gnu.org; Fri, 26 May 2023 01:22:48 -0400 Received: by mail-vk1-xa35.google.com with SMTP id 71dfb90a1353d-457493916bfso228749e0c.3 for ; Thu, 25 May 2023 22:22:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1685078566; x=1687670566; h=to:subject:message-id:date:from:mime-version:from:to:cc:subject :date:message-id:reply-to; bh=oEsSSuS6vbT0ig6GwOpj5s3g1SDoFz99BcsQw4xr+PE=; b=gH1DfkMnfPisfOp6gknRzgh9FlHb7Q2uQn2pqX8Z+VLkm/NDnqIjeIt5ax+QXDpv8v KPbVco1UQynE73MApgnFziGwczOQXJLIENBS24PNpc5OC52uuO9p2uizyKAUD+ljWd6E VVDsyUFeUigQYDYqGtnroaVgnbHItQZhH2c2IIEkDp37gu+Wvp1WqVl5a/2tWVAQlyGx 6AcnCZ05jEpD6qDkp16S+fpk+r5RSxVG7ZMzsN4A+su65seNs5m5tGdG2oPoM6WsdX2d OQNydXeO8PRqdZFw28INpp4jEWp6yX/8sb26DQ9K4WL379bekFoOQHytgXDvtFeS1s6U D8Sw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1685078566; x=1687670566; h=to:subject:message-id:date:from:mime-version:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=oEsSSuS6vbT0ig6GwOpj5s3g1SDoFz99BcsQw4xr+PE=; b=abThY690Xi8uSE/ELWvzAzzEwXrzK7QRhSmUXhe5neIR8HDtuuARb1ri1sT3U3648i vtJS7ODM8ChM/lEEjBsedhjTzdhE2S4+yykLFZa+FNK50cGbOt/ql69G/UUxx5BdgXDi f8w6D/3Twj/uN0Z2ZfGLguToXkisp9DycOPqhEgY53qNsZJueC4NDNzecwNhiumJT9vB V8x3Gg9JjDNQYL9MFfqLDy3y0VkAiaNeEo4Gy3xFqvOfcZvK/KyYoFI+sqRBe78BU9a5 iTJ/fcaaojmgNdyWw5D47JwrGoA8+1BkLMjcd1MZr8DpYPbr++KUSzgG0ARYT0rxTCaC BwUw== X-Gm-Message-State: AC+VfDzEUaNzh7ztewUoKZn35FtzYZq6kDo9orFwo7QTbml1L4/VP+Hl sFhnKFRETugU5n/5HCAh7txhV+EmXMVsR6KHAw593rZMvKQ= X-Google-Smtp-Source: ACHHUZ5KdJVABxOHXxsXN4lEjCKqZuCkpN0GjdsGHu8aifZ8vc9nSjQHe+U5FN43C4Adr51eVlk/caLvP6Loss16zoY= X-Received: by 2002:a1f:d087:0:b0:457:2a78:122e with SMTP id h129-20020a1fd087000000b004572a78122emr197254vkg.14.1685078565570; Thu, 25 May 2023 22:22:45 -0700 (PDT) MIME-Version: 1.0 From: Rodrigo Morales Date: Fri, 26 May 2023 05:22:29 +0000 Message-ID: Subject: Newbie: Define package that downloads multiple files from an open directory To: help-guix@gnu.org Content-Type: text/plain; charset="UTF-8" Received-SPF: pass client-ip=2607:f8b0:4864:20::a35; envelope-from=moralesrodrigo1100@gmail.com; helo=mail-vk1-xa35.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, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_ENVFROM_END_DIGIT=0.25, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, 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-bounces+larch=yhetil.org@gnu.org X-Migadu-Flow: FLOW_IN X-Migadu-Country: US ARC-Seal: i=1; s=key1; d=yhetil.org; t=1685078608; a=rsa-sha256; cv=none; b=RzsffiidUtVnic++jISKsCSjTcMz2pndk/r+cCWx/ZpuqIlcvH0yLquTMJlxKfhejiwLc7 g6bpGGWHSu+p2T0mBRf4n75o/DsEUJaWTmoH2TZUn6Ud0TcUm+eM5V9fYUoVRZE7ff0MtK t0eVYi3V47Timh8Ljd1QgP/icOMLdnPmxaVGGiRmPZUX++KfeLVRhFT+n5qam4MY4f1rW8 kkDDuZNpbfqJQhL7PuilFCf4r1CDvduxFIMg20bYANO3urFilLd18+Xq8gQCdG7xt9d1DZ DYCaRCLLRYwcAVzIhnVEG/kfSiimSDPkEE9TJBfxHdFgWJ3I0F9pY+k07UhiQg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20221208 header.b=gH1DfkMn; dmarc=pass (policy=none) header.from=gmail.com; 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=1685078608; 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=oEsSSuS6vbT0ig6GwOpj5s3g1SDoFz99BcsQw4xr+PE=; b=eAxjtOXQsv04lekluz6ran/QO1ql7Y01+ROH9N9crWpM3Sjt0cm4ngZ/goofAOvlsSLXEh gwSvybO1EBRkJo7GeX8JA8Jlx4mOLt2miCcfQWDg7Yi9z0x1X1uCHaLgdxHgnov6Q/p/3K Zzk977qUQ39uS+Q1gqI/v2Xq9bPBpyt9OaZRom7Fa027OnP4jPUZI+x0sGZCWhQ4T6asU+ 8bK3IgdoQsIt5TKjjErImyB/VHwBK+N81wU9W8sKDfgzCQUPS02OaAUk/rIeKeKYL1jlxu auF+GS8E8SBNnb5/DYtFpEWCKvW8/Ig2NfLaTykmHS0BD+3WRtTvhjeEg+5q8w== X-Migadu-Scanner: scn1.migadu.com Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20221208 header.b=gH1DfkMn; dmarc=pass (policy=none) header.from=gmail.com; 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: -6.33 X-Spam-Score: -6.33 X-Migadu-Queue-Id: 8BA0AFCF3 X-TUID: dKBGUzkkCjiR Table of Contents _________________ 1. The context 2. What I know 3. The question 4. Additional information about enquiry 1 The context ============= Suppose there's an open directory publicly available on the Internet. I want to define a Guix package that downloads multiple files from that directory. 2 What I know ============= I know how to define a package that downloads a single file. Let's consider [this] directory for our experimentation (I chose it because it has relatively small files). Suppose I want to download the file `blindtext.dtx' and make it available in `~/.guix-profile/share'. My package definition would look as it follows. ,---- | cat ~/my/git-repos/guix-packages/my/test.scm `---- ,---- | (define-module (my test) | #:use-module (guix licenses) | #:use-module (guix packages) | #:use-module (guix download) | #:use-module (guix build-system copy)) | | (define-public my-package-1 | (package | (name "my-package-1") | (version "1.0") | (home-page "My home-page") | (synopsis "My synopsis") | (description "My description") | (license gpl3+) | (source | (origin | (method url-fetch) | (uri "http://tug.ctan.org/tex-archive/macros/latex/contrib/blindtext/blindtext.dtx") | (sha256 | (base32 | "10sfm4648v1ywki639jsl5darkcil1is462w0v65xxr75k4l1ywl")))) | (build-system copy-build-system) | (arguments | '(#:install-plan | '(("blindtext.dtx" "share/")))))) `---- I would install that package with the following command. ,---- | guix package --no-substitutes -L ~/my/git-repos/guix-packages -i my-package-1 `---- ,---- | The following package will be installed: | my-package-1 1.0 | | hint: Consider setting the necessary environment variables by running: | | GUIX_PROFILE="/home/rdrg/.guix-profile" | . "$GUIX_PROFILE/etc/profile" | | Alternately, see `guix package --search-paths -p | "/home/rdrg/.guix-profile"'. | `---- The file gets created in the following path which is symlinked to the following file in `/gnu/store'. ,---- | realpath ~/.guix-profile/share/blindtext.dtx `---- ,---- | /gnu/store/mmqc8wav2jj3m3harisvawl1r881glpv-my-package-1-1.0/share/blindtext.dtx `---- [this] 3 The question ============== Let's suppose I want to define a single Guix package that downloads the files `blindtext.dtx' and `blindtext.ins' (that is, two files instead of one) and makes them available at `~/.guix-profile/share'. What would the package definition look like? 4 Additional information about enquiry ====================================== Please ignore the following three points: + the parent directory of has a ZIP file which is the compressed version of that directory + Guix already has a package for `blindtext' called `texlive-latex-blindtext' + Guix has some utilities for handling packages from CTAN or Tex Live (see which mentions `simple-texlive-package') In other words, consider that the directory we are using for our experimentation is an arbitrary directory on the Internet and that there's no way of downloading the compressed version of that directory. I'm poing this out because I'm more interessted in learning how to define a package that downlaods multiple files instead of finding a workaround that installs `blindtext'.