From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0 ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id uOGlJNZVWWESaAEAgWs5BA (envelope-from ) for ; Sun, 03 Oct 2021 09:03:50 +0200 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0 with LMTPS id mDJlINZVWWHhJgAA1q6Kng (envelope-from ) for ; Sun, 03 Oct 2021 07:03:50 +0000 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 D47AEFFC8 for ; Sun, 3 Oct 2021 09:03:49 +0200 (CEST) Received: from localhost ([::1]:34664 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mWvXI-0006Mx-9h for larch@yhetil.org; Sun, 03 Oct 2021 03:03:48 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:33160) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mWvWN-0006Mi-GL for help-guix@gnu.org; Sun, 03 Oct 2021 03:02:52 -0400 Received: from mail-40133.protonmail.ch ([185.70.40.133]:49644) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mWvWL-0005a1-4h for help-guix@gnu.org; Sun, 03 Oct 2021 03:02:51 -0400 Date: Sun, 03 Oct 2021 07:02:38 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com; s=protonmail; t=1633244562; bh=sQag/9LH+anVUVX7iaMwNuScIOYru12SVhswK81CNjs=; h=Date:To:From:Reply-To:Subject:From; b=NfBKGXKpxM3da9AFp1jCwaxGFRekuPhKTw4B9j9lg1t8ZCd5QQR3VSGXVGNZ/vVdE HBQdk9CHGuhvEvtnD/LMKIcrtVWeCtUWKZmRwuSQ8MedrtdwZMcZuNtWn5k2UFWy31 mAvGkH2gzXG02Y50B4vy4YQC7Hd0dbMxhd67QJLc= To: help-guix From: phodina Subject: Crates versions and their replacement Message-ID: <_iKORBL8YRhY5YAb01lAkiuJHc2Tyt1WToJJfaKjmuoyYI-Ch4Rt_pJ4EM-5OOTHvPHQwTpKzZ1flPHjrrlPfoxp1_lAEpbohni8fknQXJs=@protonmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Received-SPF: pass client-ip=185.70.40.133; envelope-from=phodina@protonmail.com; helo=mail-40133.protonmail.ch 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_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: help-guix@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: phodina Errors-To: help-guix-bounces+larch=yhetil.org@gnu.org Sender: "Help-Guix" X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1633244629; h=from:from:sender:sender:reply-to: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:list-id:list-help: list-unsubscribe:list-subscribe:list-post:dkim-signature; bh=sQag/9LH+anVUVX7iaMwNuScIOYru12SVhswK81CNjs=; b=EsdeJ/XQwUqcx9RoXYfUodedMR8cVt4cP/joWO6LpHXkmIQceKpDCYYWeIZIBcVVomipOT 22OPIviNfI7cbOCrMjuSPDF0sLok3iBAQD2+LYPS/GGYhfrr+s9UNii4kB7nBGesmLyTaC 2xW/vGGR3Jw2tj/kQzzw4PjoV7zKSqpXvo5FmDH2P/aVTRrx6KJAIjiBzb9EYK3iitCgy9 MKlHHU1CaDwjXF3diXifmZpao1QzLkqJK/Eeyf34AJ/hllCEHYVKvvUB2GgODA2DgeX+/L 9FxobFV8z272lZHb3kzJ1cSe5XPK6wLjPWAocRvDD9XriKVReKYHuQjaA7m0Zg== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1633244629; a=rsa-sha256; cv=none; b=eZZ31/U03E0BlITMnPgYPglG5qmaPeRODq/jeWAfueXtvyVVaWpyUl4Y19hy+zD1gbdYwg A94DS+JGDWZXywVu+JwIw3xLVk+te6w2Fs5OCguxRXwzOfeK+C0TKhukBsnGNkwN77zSuG yCqEfd1puQhCuNsbjkDKq43KGpGrZGGqbT2JYcGJCzo3xM2kSi/n7NPxnIy7G2cAqoV2U4 k0dTm6agrXuTgt6O0D3c7zZzTt6sJCHTNlHha3gpNa2PB8JzzAa5ItVMUIhbHzE8q14PlY AawTIRdZ2li5cK/AgSfU2sZnk7BdNogzqXzn2FynYFucMdclq9KQPzBSMr2QwA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=protonmail.com header.s=protonmail header.b=NfBKGXKp; dmarc=pass (policy=quarantine) header.from=protonmail.com; spf=pass (aspmx1.migadu.com: domain of help-guix-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=help-guix-bounces@gnu.org X-Migadu-Spam-Score: -3.11 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=protonmail.com header.s=protonmail header.b=NfBKGXKp; dmarc=pass (policy=quarantine) header.from=protonmail.com; spf=pass (aspmx1.migadu.com: domain of help-guix-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=help-guix-bounces@gnu.org X-Migadu-Queue-Id: D47AEFFC8 X-Spam-Score: -3.11 X-Migadu-Scanner: scn0.migadu.com X-TUID: 7vkupQhrzxkm Hi Guix, I got questions regarding packaging Rust crates in Guix and unfotunately I haven't found an answer in the documentation nor in the help archive. 1. Sometimes the crate described in the Cargo.toml of a new package is not available but there is another with different higher minor or patch version. It is understandable that the repo will not have all the Rust packages that are on the crates.io. It also applies when the author specifies exact commit. In the gnu/packages/crates-io.scm there is a special phase usually called fix-version-requirements. Here's the excerpt: (add-after 'unpack 'fix-version-requirements (lambda _ (substitute* "Cargo.toml" (("0.7.7") ,(package-version rust-mio-0.7))) #t))))) Now comes the question. How often should it be use and what are the pros and cons? I understand that it's better than the patch as this replaces the version with the correct one on the fly. 2. How do I do multiline replace as with large crate dependency list there are sometimes crates with the same version? Based on the substitute description it replaces only a line but the definition of the crate and the version are on separate lines in the Cargo.toml. Petr