From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp10.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 4LwvEFGXcGQ2YAAASxT56A (envelope-from ) for ; Fri, 26 May 2023 13:26:09 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp10.migadu.com with LMTPS id 4EELD1GXcGRhNQAAG6o9tA (envelope-from ) for ; Fri, 26 May 2023 13:26:09 +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 D85342C384 for ; Fri, 26 May 2023 13:26:08 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1q2VZa-0002qm-S7; Fri, 26 May 2023 07:25:35 -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 1q2VZW-0002oU-1w for help-guix@gnu.org; Fri, 26 May 2023 07:25:26 -0400 Received: from mail-wm1-x32c.google.com ([2a00:1450:4864:20::32c]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1q2VZS-0002rJ-Cy for help-guix@gnu.org; Fri, 26 May 2023 07:25:25 -0400 Received: by mail-wm1-x32c.google.com with SMTP id 5b1f17b1804b1-3f3284dff6cso788695e9.0 for ; Fri, 26 May 2023 04:25:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1685100317; x=1687692317; h=content-transfer-encoding:mime-version:message-id:date:references :in-reply-to:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=p2/guCtFstSizQIUwzz6d4XF631uJKIhr8OEJ0BQrnY=; b=PKvdTY+6x0becNEnfpPCoJU02/O5iwFNNL6bJCW/gIkqshxhaRLbUD6nBzpbTn+0sb ztaPTXQ8cxLZXh0qiAbPw60npb9g2ysSSCiBubkdkWVFubAf0u59USYtWx6uyXv50b0F YLSH7abg8q7CnOBBmtWgvNrjaJ4sP32IGraYg7IWSPWqTwWvQkNqL9YIJk2AOs0KTyNi PcL4qZrQf0Y6gWfTsDA+tmPHsQ+JcJGs8+v7/Z4yUNvtBRpn50mEQwZ9tGukEa3g0slv cEhQpFLzSv4NMjq6BfsUZ8PhPekEnxd3kJbO/Kk0ZigqxfN/nwD1AeKKRMIP1eWJ81ZW cyAw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1685100317; x=1687692317; h=content-transfer-encoding:mime-version:message-id:date:references :in-reply-to:subject:to:from:x-gm-message-state:from:to:cc:subject :date:message-id:reply-to; bh=p2/guCtFstSizQIUwzz6d4XF631uJKIhr8OEJ0BQrnY=; b=cZ9bzHgmNxZZzqdW8lgEb+EX4C+GpA9Y+Yx53AVualWUp0DwWisOxLZGRlhfeb8O/3 rttlfZuxk4gFDzGtwZ2R+61MJyXyhTA26m8z9TWo3qOyGN5lStNLEs2mAzsZkz1Y7XFj Ycab/w2qILqj909Ew3GVm++LMucIpimSpIW7MeDXg8F4Xg59LCDx8BwzalAO/ePjG+KN Oc4jpfMy8IIOitjDUwtidApVnlomwulrQ9BzYo9QIVLXoGNgT+X/vykJoU0Z6uLDn9Yx TUTQn5L8NSAu6hWLDycD07VGYb0XOsF/HSCQ2Temdhr971VzszMIjdFwrUmjMc6EREY2 VecA== X-Gm-Message-State: AC+VfDze5jL8q3liIwTg1EKLwvyW0XYihyI+zz34bmtfdqpf1wg5dKbZ 2P39Ql/Wm9jzicMhw430k3ZsI1+SWO8= X-Google-Smtp-Source: ACHHUZ7ZQPdps7/VtZ5KHEGuCTvtSII+HuFyb7bs01Jl+iblN76uH3xOMcCrMB8Y9gdQEHiZ7ZooGA== X-Received: by 2002:a05:600c:5103:b0:3f6:602:97af with SMTP id o3-20020a05600c510300b003f6060297afmr1409235wms.3.1685100317228; Fri, 26 May 2023 04:25:17 -0700 (PDT) Received: from pfiuh07 ([193.48.40.241]) by smtp.gmail.com with ESMTPSA id 24-20020a05600c021800b003f080b2f9f4sm8496747wmi.27.2023.05.26.04.25.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 26 May 2023 04:25:16 -0700 (PDT) From: Simon Tournier To: Rodrigo Morales , help-guix@gnu.org Subject: Re: Newbie: Define package that downloads multiple files from an open directory In-Reply-To: References: Date: Fri, 26 May 2023 12:14:11 +0200 Message-ID: <87ttvztn64.fsf@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Received-SPF: pass client-ip=2a00:1450:4864:20::32c; envelope-from=zimon.toutoune@gmail.com; helo=mail-wm1-x32c.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 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_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=1685100368; a=rsa-sha256; cv=none; b=KB6E//0KjyQZwAU1Wgfyb77NUwKR8TlmxzYNoDEsirFrKPTIaBqZ3OaXUG0oXBYK3x7ECE GCVFmyQw0tkVoKjhX69QFtCu794btLhIgPLAWnGo4Smfr4nmUmXeU9FyQ7fdp7nxJysrOE E2FRyk3PayQLW4tPXQl6Tv2dT7n6GvqZRNrRUsvabqxYOYNlMwNbKedcQgRQXubHjFmJl2 c9UH5eLyqU9qQ5eYPS6qF3KuIF5gir9R/4oTpTkDitqjBmwTz+QvEWUCMHAcvzFkR+M+/4 SxmNirfcTcOPLYIRfD3QWrJKJAMaC2Kuql0cFUQh7Z0o9PqxqjDTgBfEBR/00g== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20221208 header.b=PKvdTY+6; 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=1685100368; 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: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post:dkim-signature; bh=p2/guCtFstSizQIUwzz6d4XF631uJKIhr8OEJ0BQrnY=; b=TqXO9dtu69X+zA9X3rAscrNUblyjxQ5aZ0qr7XHHQ7k3gUmIOPmDI1SsvkKRYXquFL0E6o a8FRrycBeh0j/PN4s29lZT7O9JINHRIfPhxzszirZJdopu18O4M08J+40MLchn7o0aqCu0 4XduyVKYdV2zMNaeO1eXrM5NMFXQgGt2i6EnQFGqLmgYy/s7UwT+8hLEffJlu/tt3HyEpx efutjjkduuVaT9zrBDKYkphSZAB5pyfF0iVnwQXgUqokFR/a2uf2PcOaRP75Sk3S6/TKwF 7UXzv1SiXXoJcOqFtM0DLOmirWi9SF4uIMuaE0X/gX6qU7xaVjwyVDr3PZ07xA== X-Migadu-Scanner: scn1.migadu.com Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20221208 header.b=PKvdTY+6; 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: -4.83 X-Spam-Score: -4.83 X-Migadu-Queue-Id: D85342C384 X-TUID: Nt1ekyhMLHW2 Hi, On ven., 26 mai 2023 at 05:22, Rodrigo Morales wrote: > | (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/blind= text/blindtext.dtx") > | (sha256 > | (base32 > | "10sfm4648v1ywki639jsl5darkcil1is462w0v65xxr75k4l1ywl")))) > | (build-system copy-build-system) > | (arguments > | '(#:install-plan > | '(("blindtext.dtx" "share/")))))) > `---- [...] > 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? You could add an =E2=80=99inputs=E2=80=99 that is an =E2=80=99origin=E2=80= =99 with the file you want. Something like: --8<---------------cut here---------------start------------->8--- (arguments `(#:install-plan '(("blindtext.dtx" "share/")) #:phases (modify-phases %standard-phases (add-after 'unpack 'add-ins (lambda* (#:key outputs inputs #:allow-other-keys) (let ((out (string-append (assoc-ref outputs "out") "/share/")= )) (mkdir-p out) (copy-file (assoc-ref inputs "ins") (string-append out "/blindtext.ins")))))))) (inputs `(("ins" ,(origin (method url-fetch) (uri "http://tug.ctan.org/tex-archive/macros/latex/contrib= /blindtext/blindtext.ins") (sha256 (base32 "1jfcyz6dw6q65b4hxi39917i9i5lkh3mh8v9zhpn4qqzgc1yj2bp"))= )))))) --8<---------------cut here---------------end--------------->8--- and then, --8<---------------cut here---------------start------------->8--- $ tree $(guix build -L /tmp/pkg my-package-1) /gnu/store/3l2r0sc93dii3j9clfgfwv4j3gnh3ynh-my-package-1-1.0 =E2=94=94=E2=94=80=E2=94=80 share =E2=94=9C=E2=94=80=E2=94=80 blindtext.dtx =E2=94=94=E2=94=80=E2=94=80 blindtext.ins 2 directories, 2 files --8<---------------cut here---------------end--------------->8--- However, since it looks like TeXLive packages, you might be interested by =E2=80=99simple-texlive-package=E2=80=99 from (gnu packages tex). --8<---------------cut here---------------start------------->8--- (define* (simple-texlive-package name locations hash #:key trivial?) "Return a template for a simple TeX Live package with the given NAME, downloading from a list of LOCATIONS in the TeX Live repository, and expect= ing the provided output HASH. If TRIVIAL? is provided, all files will simply be copied to their outputs; otherwise the TEXLIVE-BUILD-SYSTEM is used." --8<---------------cut here---------------end--------------->8--- Well, this procedure is not exported and it=E2=80=99s probably not exactly = what you want. Hope that helps, simon