From patchwork Wed Aug 16 17:28:18 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Simon Tournier X-Patchwork-Id: 52949 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 1846F27BBEA; Wed, 16 Aug 2023 18:29:22 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_INVALID,DKIM_SIGNED,FREEMAIL_FROM,MAILING_LIST_MULTI, SPF_HELO_PASS autolearn=ham autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id D423627BBE2 for ; Wed, 16 Aug 2023 18:29:20 +0100 (BST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qWKKV-0007t4-99; Wed, 16 Aug 2023 13:29:11 -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 1qWKKN-0007sc-Bk for guix-patches@gnu.org; Wed, 16 Aug 2023 13:29:03 -0400 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qWKKN-0001pf-1C for guix-patches@gnu.org; Wed, 16 Aug 2023 13:29:03 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qWKKM-0008Vr-De for guix-patches@gnu.org; Wed, 16 Aug 2023 13:29:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#62008] [PATCH 0/2] Update Disarchive to 0.5.0 Resent-From: Simon Tournier Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Wed, 16 Aug 2023 17:29:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 62008 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: To: Ludovic =?utf-8?q?Court=C3=A8s?= Cc: 62008@debbugs.gnu.org Received: via spool by 62008-submit@debbugs.gnu.org id=B62008.169220690932679 (code B ref 62008); Wed, 16 Aug 2023 17:29:02 +0000 Received: (at 62008) by debbugs.gnu.org; 16 Aug 2023 17:28:29 +0000 Received: from localhost ([127.0.0.1]:42008 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qWKJo-0008V1-Ur for submit@debbugs.gnu.org; Wed, 16 Aug 2023 13:28:29 -0400 Received: from mail-wr1-x429.google.com ([2a00:1450:4864:20::429]:38197) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qWKJn-0008Ul-6T for 62008@debbugs.gnu.org; Wed, 16 Aug 2023 13:28:27 -0400 Received: by mail-wr1-x429.google.com with SMTP id ffacd0b85a97d-3159b524c56so1059632f8f.1 for <62008@debbugs.gnu.org>; Wed, 16 Aug 2023 10:28:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1692206901; x=1692811701; h=mime-version:message-id:date:references:in-reply-to:subject:cc:to :from:from:to:cc:subject:date:message-id:reply-to; bh=Ajri2KmmJWTu6T1tNsENiHUD2k3qySxcLbjAS5dfbec=; b=Hz/EvjcScrRKDPMIkojw6ZNMiTOuiomSEPFnubZiZ/dGUuCsjQR/ZWQKhue18vk71s hwfb1TPxu2xYHAICgGPInyxpWLJM4uQ7W9BB1R3iEjshr2c9mh+jxIy/lOgnUXJ3Qdnb fF2urbWsTH0EzIWjVvu9gi6KWXIugWdwwarkQol2x6LQD6BGvvDP1O89WzZBueZc1B09 9pMkx/v7iPrGJy0TqFLIkkvFJwYBdfR5YoKKxd9EWT6OtvfuhjeTfVLs96wkOtK8Y9ts gYkmwwKQrn2GvTHa8Gh11YN9I2kf/4GV5akcC5MaDX/rYgdOXmnyBAGDsFCCxZLnpGPv E+ww== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1692206901; x=1692811701; h=mime-version:message-id:date:references:in-reply-to:subject:cc:to :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=Ajri2KmmJWTu6T1tNsENiHUD2k3qySxcLbjAS5dfbec=; b=YSfxK4d9clb1aJXeKprWbrQgRmCQkfvFb0RfNeR9aYu6BMgIH9O7a3/FOYYic/dWB8 2cdD5Z1l8Jc/UQbTSxt7VpqDbUs5RojwBPVICNQzHKzKsdGqXlGyu9pBclttig0Q5hbR e5GwkLeU4Zna/5sj7+Jbe6LU6cTaflXnWyoduovU/uPtwHLt1mBUn6CIEWEuFJT/n7KT rqxJlpHu6WJ9f/J426hYdNQpfkOK7Lg5iTEDi09psP2rG754ay/6d6+0uiRn64kdgApZ 0WcqVSPDDZFuxaRq1SJl4kFIJjSCLcOoOGZBf0faLNwiEnHh5wvhPhqS0j7S++PEG8Ss qMEg== X-Gm-Message-State: AOJu0YwgXlQA4seK5qBKHaP0Os/r452dv8ebmUl/1kQEm308ohZBOqHD tJfyGjjmH8qlw5AVyK4sFWcwJuZ8+1M= X-Google-Smtp-Source: AGHT+IHNTI/KUkea5+IC8ddmAsNxZ4Dtqji7bhIzdvRaY49IGm/K0hnw+FlvTRgEfZc/oTkGsDlOcA== X-Received: by 2002:a5d:62c9:0:b0:317:ead9:3363 with SMTP id o9-20020a5d62c9000000b00317ead93363mr1919024wrv.5.1692206901263; Wed, 16 Aug 2023 10:28:21 -0700 (PDT) Received: from pfiuh07 ([193.48.40.241]) by smtp.gmail.com with ESMTPSA id y2-20020adffa42000000b00317e6f06e22sm22093210wrr.77.2023.08.16.10.28.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 16 Aug 2023 10:28:20 -0700 (PDT) From: Simon Tournier In-Reply-To: <87bkl0imja.fsf@gnu.org> References: <20230306191814.3638619-1-zimon.toutoune@gmail.com> <20230306191950.3639176-1-zimon.toutoune@gmail.com> <87jzzsevsh.fsf_-_@gnu.org> <87a60odep4.fsf@gmail.com> <87bkl1aukx.fsf@gnu.org> <87bkl0omtg.fsf@gmail.com> <87bkl0imja.fsf@gnu.org> Date: Wed, 16 Aug 2023 19:28:18 +0200 Message-ID: <87fs4iew25.fsf@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-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches Hi Ludo, You closed this but the issue is still there, no? :-) On Fri, 10 Mar 2023 at 17:44, Ludovic Courtès wrote: > Simon Tournier skribis: > >> On ven., 10 mars 2023 at 09:17, Ludovic Courtès wrote: >> >>> Hmm good point. So maybe we need to wrap after all, and also keep >>> propagated inputs (as an example, (guix build download) uses the >>> Disarchive modules directly, not the command.) >> >> I am proposing to have ’package/inherit’, >> >> 1. ’disarchive’: the standalone CLI with wrap >> 2. ’guile-disarchive’: the library with propagated-inputs > > I think having a single package is more convenient: it would both > propagate inputs and wrap the binaries as you proposed. Because of this error: --8<---------------cut here---------------start------------->8--- $ guix shell -C disarchive -- disarchive disassemble hello-2.12.1 Backtrace: In ice-9/boot-9.scm: [...] ice-9/boot-9.scm:3329:6: In procedure resolve-interface: no code for module (gcrypt hash) --8<---------------cut here---------------end--------------->8--- solved by adding the package guile, $ guix shell -C disarchive guile -- disarchive disassemble hello-2.12.1 then, I think the contrary: having two packages is more convenient. Well, from my point of view, two packages would be consistent with other Guix packages as pandoc and ghc-pandoc for instance. Plain name for the CLI and -name for the library in , somehow. The compiler/interpreter propagated/wrapped only with the CLI. Somehow, I am proposing this attached patch. Then tweaking around. Cheers, simon diff --git a/gnu/packages/backup.scm b/gnu/packages/backup.scm index d484c34826..e60570b037 100644 --- a/gnu/packages/backup.scm +++ b/gnu/packages/backup.scm @@ -1256,9 +1256,9 @@ (define-public burp backup.") (license license:agpl3))) -(define-public disarchive +(define-public guile-disarchive (package - (name "disarchive") + (name "guile-disarchive") (version "0.5.0") (source (origin (method url-fetch) @@ -1290,6 +1290,42 @@ (define-public disarchive compression parameters used by Gzip.") (license license:gpl3+))) +(define-public disarchive + (package/inherit guile-disarchive + (name "disarchive") + (arguments + (list + #:modules `((ice-9 popen) + ,@%gnu-build-system-modules) + #:phases + #~(modify-phases %standard-phases + (add-after 'install 'wrap-program + (lambda* (#:key inputs outputs #:allow-other-keys) + (let* ((effective + (read (open-pipe* OPEN_READ + (string-append #$guile-3.0 "/bin/guile") + "-c" "(write (effective-version))"))) + (scm-dir (string-append "/share/guile/site/" effective)) + (go-dir (string-append "/lib/guile/" effective + "/site-ccache/")) + (modules (list #$output + #$guile-bytestructures + #$guile-gcrypt + #$guile-lzma)) + (scm-path + (map (lambda (module) (string-append module scm-dir)) + modules)) + (go-path + (map (lambda (module) (string-append module scm-dir)) + modules))) + (wrap-program (string-append #$output "/bin/disarchive") + `("PATH" ":" prefix (,(string-append #$output "/bin"))) + `("GUILE_LOAD_PATH" ":" prefix ,scm-path) + `("GUILE_LOAD_COMPILED_PATH" ":" prefix ,go-path)))))))) + (inputs + (list guile-3.0 guile-gcrypt guile-lzma zlib)) + (propagated-inputs (list)))) + (define-public borgmatic (package (name "borgmatic")