From unknown Fri Jun 13 10:26:49 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#35318] [PATCH] Update cargo-build-system to expand package inputs Resent-From: Ivan Petkov Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Fri, 19 Apr 2019 05:35:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 35318 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 35318@debbugs.gnu.org Cc: Danny Milosavljevic , Chris Marusich X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.15556520649227 (code B ref -1); Fri, 19 Apr 2019 05:35:02 +0000 Received: (at submit) by debbugs.gnu.org; 19 Apr 2019 05:34:24 +0000 Received: from localhost ([127.0.0.1]:42903 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hHMAJ-0002Ok-SB for submit@debbugs.gnu.org; Fri, 19 Apr 2019 01:34:24 -0400 Received: from eggs.gnu.org ([209.51.188.92]:38741) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hHMAH-0002OY-Lz for submit@debbugs.gnu.org; Fri, 19 Apr 2019 01:34:22 -0400 Received: from lists.gnu.org ([209.51.188.17]:52996) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1hHMAC-0003Cn-Ft for submit@debbugs.gnu.org; Fri, 19 Apr 2019 01:34:16 -0400 Received: from eggs.gnu.org ([209.51.188.92]:53123) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hHMAB-0001Oc-8P for guix-patches@gnu.org; Fri, 19 Apr 2019 01:34:16 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50,FREEMAIL_FROM autolearn=disabled version=3.3.2 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hHMAA-0003CA-6Q for guix-patches@gnu.org; Fri, 19 Apr 2019 01:34:15 -0400 Received: from mail-pg1-x543.google.com ([2607:f8b0:4864:20::543]:41986) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hHMA9-0003BX-QW for guix-patches@gnu.org; Fri, 19 Apr 2019 01:34:14 -0400 Received: by mail-pg1-x543.google.com with SMTP id p6so2194922pgh.9 for ; Thu, 18 Apr 2019 22:34:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:mime-version:date:subject:cc:to:message-id; bh=7eD03KTjs23n1Bxq+YMPnHhIbfSn6VwcdlOKvFMPYxw=; b=JZgRZsju5zbl/0TMi3Dc2DighgUs3pku0FPQpEKAs6T7aJs7oolU3VPCP+hdbCanow L7kzwPDpmSo4cL4msbKCU8zxmC6t3/BP63jvdmULC8zi6FqvM+qhf2nClILi9WmYnalN nkXPfgdp+JLD14m+WZScR0nmXPVE0eRYME8hsdp1sSj+zxo80ox2c2i6nJQZACyUNMLv mrb8sPGdjKL0WexNxuL5UBRafTnwKPuw0BWKG5bybu/OiAiQQmvet+zhtzPsVi/28ebq lAkz5UqfJH0Gn3T0eYB1/2QhtVsa6w9f6QEIr17QqP3TwpgfpxTPEdAGPStORWeC3CRJ QSkw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:mime-version:date:subject:cc:to:message-id; bh=7eD03KTjs23n1Bxq+YMPnHhIbfSn6VwcdlOKvFMPYxw=; b=uRTwjGbYywdyv1D11qCFloSdWqrT0zyXsRQYe+mjUYOO58F1Hgy9zwgAACyYSr2u2m W1xCieQ0OZeHu64apL9SJhrFGqPKbvH9QGiZs9zZIDCDlzTPvQR9pn1EfiUtIAUUKOmu 26m48kL5J6T2ZO9fKZti+BQj7JgiRiGC7wRkyXG70MOU2blz/gny6IMgKI60NdP59Pdu SUrOqGUfXPkzivLz62PRBs5jjFdPTkKpghRTsEF2Dn+JYThQM6oDraH7QPS8OECwSfXy 58rDVAsx7E6as7LisDBUVmD/3/moYbzg7K6NIOYhYTmcqCCQRLlz3crc9Xpuhy7oA95j pcCg== X-Gm-Message-State: APjAAAUkK9C0mlMtNLyjX2oHTQlI3RCy2+26dbZA4/y5cAEeBeGu6tcX NlwN9jsx4J/YgrOziIqsFp825sbaiy57gA== X-Google-Smtp-Source: APXvYqwf7zNjLCNocDc0JRa/IRbiEzkKbtx/Q061QIQv7VvKYeTxJyDxO7k42LSX1yPxM3Jpx4LoIw== X-Received: by 2002:a62:b418:: with SMTP id h24mr1837256pfn.145.1555652051604; Thu, 18 Apr 2019 22:34:11 -0700 (PDT) Received: from ?IPv6:2601:602:9a00:1784:ad2d:2e19:4d0f:abb4? ([2601:602:9a00:1784:ad2d:2e19:4d0f:abb4]) by smtp.gmail.com with ESMTPSA id g4sm6904533pfc.75.2019.04.18.22.34.09 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 18 Apr 2019 22:34:10 -0700 (PDT) From: Ivan Petkov Content-Type: multipart/mixed; boundary="Apple-Mail=_DA76C889-91C6-47B0-A08C-2578701A12D6" Mime-Version: 1.0 (Mac OS X Mail 11.5 \(3445.9.1\)) Date: Thu, 18 Apr 2019 22:34:05 -0700 Message-Id: X-Mailer: Apple Mail (2.3445.9.1) X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:4864:20::543 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Spam-Score: -1.3 (-) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.3 (--) --Apple-Mail=_DA76C889-91C6-47B0-A08C-2578701A12D6 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 When building, cargo requires the source of all transitive dependencies = to be present in its index. Rather than force package definitions to list out all transitive inputs, = the build system will automatically expand the inputs as necessary. Because it is possible for crates to have apparent cycles in their = native dependencies, the build system must take some measures to work around potential = cycles. This patch series takes an initial naive stab at resolving the problem, by never building = native-inputs. I plan on revisiting this sometime soon and making the system a bit more = intelligent (namely building native-inputs where possible and breaking any cycles). = But for now this should unblock working on package definitions. I=E2=80=99ve also included three rust crates as a proof of concept that = the system works and it handles potential native-input cycles. These crates do nothing on their own, but = they=E2=80=99re heavily depended upon by the rest of the crates ecosystem, so they will eventually be = useful to have in guix. =E2=80=94Ivan --Apple-Mail=_DA76C889-91C6-47B0-A08C-2578701A12D6 Content-Disposition: attachment; filename=0001-packages-allow-dynamic-input-closure-computation.patch Content-Type: application/octet-stream; x-unix-mode=0644; name="0001-packages-allow-dynamic-input-closure-computation.patch" Content-Transfer-Encoding: quoted-printable =46rom=20ca6dfd9451f22c4d6dc02aa7eceee0c35800dd57=20Mon=20Sep=2017=20= 00:00:00=202001=0AFrom:=20Ivan=20Petkov=20=0A= Date:=20Tue,=2016=20Apr=202019=2003:32:44=20-0700=0ASubject:=20[PATCH=20= 1/4]=20packages:=20allow=20dynamic=20input=20closure=20computation=0A=0A= *=20guix/packages:=20(transitive-inputs):=20Rename=20to=0A= package-transitive-dependencies.=0A(package-transitive-dependencies):=20= Add=20proc=20parameter=20and=20use=20it.=0A(transitive-inputs):=20Add=20= it.=0A---=0A=20guix/packages.scm=20|=2023=20+++++++++++++++++------=0A=20= 1=20file=20changed,=2017=20insertions(+),=206=20deletions(-)=0A=0Adiff=20= --git=20a/guix/packages.scm=20b/guix/packages.scm=0Aindex=20= c94a651f27..658b2427ca=20100644=0A---=20a/guix/packages.scm=0A+++=20= b/guix/packages.scm=0A@@=20-4,6=20+4,7=20@@=0A=20;;;=20Copyright=20=C2=A9=20= 2015=20Eric=20Bavier=20=0A=20;;;=20Copyright=20=C2=A9= =202016=20Alex=20Kost=20=0A=20;;;=20Copyright=20=C2=A9=20= 2017=20Efraim=20Flashner=20=0A+;;;=20Copyright=20= =C2=A9=202019=20Ivan=20Petkov=20=0A=20;;;=0A=20= ;;;=20This=20file=20is=20part=20of=20GNU=20Guix.=0A=20;;;=0A@@=20-95,6=20= +96,7=20@@=0A=20=20=20=20=20=20=20=20=20=20=20=20=20= package-direct-sources=0A=20=20=20=20=20=20=20=20=20=20=20=20=20= package-transitive-sources=0A=20=20=20=20=20=20=20=20=20=20=20=20=20= package-direct-inputs=0A+=20=20=20=20=20=20=20=20=20=20=20=20= package-transitive-dependencies=0A=20=20=20=20=20=20=20=20=20=20=20=20=20= package-transitive-inputs=0A=20=20=20=20=20=20=20=20=20=20=20=20=20= package-transitive-target-inputs=0A=20=20=20=20=20=20=20=20=20=20=20=20=20= package-transitive-native-inputs=0A@@=20-650,13=20+652,13=20@@=20= specifies=20modules=20in=20scope=20when=20evaluating=20SNIPPET."=0A=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= #:deprecation-warnings=20#t=20;to=20avoid=20a=20rebuild=0A=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= #:guile-for-build=20guile-for-build))))=0A=20=0A-(define=20= (transitive-inputs=20inputs)=0A-=20=20"Return=20the=20closure=20of=20= INPUTS=20when=20considering=20the=20'propagated-inputs'=0A-edges.=20=20= Omit=20duplicate=20inputs,=20except=20for=20those=20already=20present=20= in=20INPUTS=0A-itself.=0A+(define=20(package-transitive-dependencies=20= inputs=20proc)=0A+=20=20"Return=20the=20closure=20of=20INPUTS=20when=20= considering=20the=20edges=20extracted=0A+from=20each=20package=20via=20= PROC.=20=20Omit=20duplicate=20inputs,=20except=20for=20those=0A+already=20= present=20in=20INPUTS=20itself.=0A=20=0A=20This=20is=20implemented=20as=20= a=20breadth-first=20traversal=20such=20that=20INPUTS=20is=0A-preserved,=20= and=20only=20duplicate=20propagated=20inputs=20are=20removed."=0A= +preserved,=20and=20only=20duplicate=20extracted=20inputs=20are=20= removed."=0A=20=20=20(define=20(seen?=20seen=20item=20outputs)=0A=20=20=20= =20=20;;=20FIXME:=20We're=20using=20pointer=20identity=20here,=20which=20= is=20extremely=20sensitive=0A=20=20=20=20=20;;=20to=20memoization=20in=20= package-producing=20procedures;=20see=0A@@=20-680,7=20+682,7=20@@=20= preserved,=20and=20only=20duplicate=20propagated=20inputs=20are=20= removed."=0A=20=20=20=20=20=20=20=20=20=20=20=20(loop=20rest=20result=20= propagated=20first?=20seen)=0A=20=20=20=20=20=20=20=20=20=20=20=20(loop=20= rest=0A=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20(cons=20= input=20result)=0A-=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= (cons=20(package-propagated-inputs=20package)=20propagated)=0A+=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20(cons=20(proc=20package)=20= propagated)=0A=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= first?=0A=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= (vhash-consq=20package=20outputs=20seen))))=0A=20=20=20=20=20=20=20= ((input=20rest=20...)=0A@@=20-696,6=20+698,15=20@@=20PACKAGE's=20= inputs."=0A=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= (_=20#f))=0A=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= (package-direct-inputs=20package))))=0A=20=0A+(define=20= (transitive-inputs=20inputs)=0A+=20=20"Return=20the=20closure=20of=20= INPUTS=20when=20considering=20the=20'propagated-inputs'=0A+edges.=20=20= Omit=20duplicate=20inputs,=20except=20for=20those=20already=20present=20= in=20INPUTS=0A+itself.=0A+=0A+This=20is=20implemented=20as=20a=20= breadth-first=20traversal=20such=20that=20INPUTS=20is=0A+preserved,=20= and=20only=20duplicate=20propagated=20inputs=20are=20removed."=0A+=20=20= (package-transitive-dependencies=20inputs=20package-propagated-inputs))=0A= +=0A=20(define=20(package-transitive-sources=20package)=0A=20=20=20= "Return=20PACKAGE's=20direct=20sources,=20and=20their=20direct=20= sources,=20recursively."=0A=20=20=20(delete-duplicates=0A--=20=0A2.21.0=0A= =0A= --Apple-Mail=_DA76C889-91C6-47B0-A08C-2578701A12D6 Content-Disposition: attachment; filename=0002-build-system-cargo-expand-transitive-package-inputs.patch Content-Type: application/octet-stream; x-unix-mode=0644; name="0002-build-system-cargo-expand-transitive-package-inputs.patch" Content-Transfer-Encoding: quoted-printable =46rom=207b42290f238d5ab50d83232ec6d95db665a98302=20Mon=20Sep=2017=20= 00:00:00=202001=0AFrom:=20Ivan=20Petkov=20=0A= Date:=20Tue,=2016=20Apr=202019=2003:37:44=20-0700=0ASubject:=20[PATCH=20= 2/4]=20build-system/cargo:=20expand=20transitive=20package=20inputs=0A=0A= *=20guix/build/cargo:=20(package-target-inputs):=20Add=20it.=0A= (expand-inputs):=20Add=20it.=0A(expand-native-inputs):=20Add=20it.=0A= (lower):=20Use=20new=20variables.=0A---=0A=20guix/build-system/cargo.scm=20= |=2066=20+++++++++++++++++++++++++++++++++++--=0A=201=20file=20changed,=20= 64=20insertions(+),=202=20deletions(-)=0A=0Adiff=20--git=20= a/guix/build-system/cargo.scm=20b/guix/build-system/cargo.scm=0Aindex=20= dc137421e9..65dcd5d339=20100644=0A---=20a/guix/build-system/cargo.scm=0A= +++=20b/guix/build-system/cargo.scm=0A@@=20-121,6=20+121,68=20@@=20to=20= NAME=20and=20VERSION."=0A=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20#:outputs=20(cons=20= "src"=20outputs)=0A=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20#:guile-for-build=20= guile-for-build))=0A=20=0A+(define=20package-target-inputs=0A+=20=20= (lambda=20(pkg)=0A+=20=20=20=20(append=20(package-inputs=20pkg)=0A+=20=20= =20=20=20=20=20=20=20=20=20=20(package-propagated-inputs=20pkg))))=0A+=0A= +(define*=20(expand-inputs=20inputs)=0A+=20=20"Return=20the=20transitive=20= target=20inputs=20for=20each=20package=20in=20INPUTS.=0A+=0A+Cargo=20= requires=20all=20transitive=20crate=20dependencies=20to=20be=20available=20= in=20its=20index,=0A+even=20if=20they=20are=20optional=20(this=20is=20so=20= it=20can=20generate=20deterministic=0A+Cargo.lock=20files=20regardless=20= of=20the=20target=20platform=20or=20enabled=20features).=0A+=0A+Rather=20= than=20burden=20the=20package=20definition=20to=20expand=20these,=20= we'll=20automate=0A+that=20process=20in=20the=20build=20system."=0A+=20=20= (package-transitive-dependencies=20inputs=20package-target-inputs))=0A+=0A= +(define*=20(expand-native-inputs=20native-inputs)=0A+=20=20"Return=20= the=20transitive=20target=20inputs=20for=20each=20package=20in=20= NATIVE-INPUTS.=0A+=0A+We=20need=20all=20transitive=20crate=20= dependencies=20for=20any=20cargo=20dev-dependencies,=0A+but=20this=20is=20= only=20needed=20when=20building/testing=20a=20crate=20directly=0A+(i.e.=20= we=20will=20never=20need=20transitive=20dev-dependencies=20for=20any=20= dependency=0A+crates).=0A+=0A+In=20addition,=20we=20need=20to=20modify=20= any=20native-inputs=20to=20avoid=20any=20apparent=0A+cycles.=20Cargo=20= does=20not=20permit=20cyclic=20dependencies=20between=20crates,=20= however,=0A+it=20permits=20cycles=20to=20occur=20via=20dev-dependencies.=20= For=20example,=20if=20crate=20X=0A+depends=20on=20crate=20Y,=20crate=20= Y's=20tests=20could=20pull=20in=20crate=20X=20to=20to=20verify=0A= +everything=20builds=20properly=20(this=20is=20a=20rare=20scenario,=20= but=20it=20it=20happens=20for=0A+example=20with=20the=20`proc-macro2`=20= and=20`quote`=20crates).=20This=20is=20allowed=20by=20cargo=0A+because=20= tests=20are=20built=20as=20a=20pseudo-crate=20which=20happens=20to=20= depend=20on=20the=0A+X=20and=20Y=20crates,=20forming=20an=20acyclic=20= graph.=0A+=0A+Cargo=20ultimately=20needs=20only=20the=20crate=20sources=20= available=20when=20doing=20a=20build.=0A+Ultimately,=20if=20a=20cycle=20= is=20detected,=20we=20can=20break=20it=20by=20replacing=20the=20current=0A= +crate=20we're=20trying=20to=20build=20with=20a=20no-op=20build=20which=20= only=20packages=20the=20crate=0A+source;=20cargo=20will=20then=20find=20= the=20source=20available=20in=20its=20index=20and=20build=20things=0A= +properly."=0A+=20=20(map=0A+=20=20=20=20(lambda=20(dep)=0A+=20=20=20=20=20= =20(match=20dep=0A+=20=20=20=20=20=20=20((name=20input=20rest=20...)=0A+=20= =20=20=20=20=20=20=20;;=20TODO:=20Starting=20out=20real=20simple=20by=20= ensuring=20no=20native-inputs=20are=0A+=20=20=20=20=20=20=20=20;;=20= actually=20built=20so=20we=20don't=20accidentally=20hit=20a=20cycle.=20= We=20can=20revisit=0A+=20=20=20=20=20=20=20=20;;=20this=20later=20and=20= more=20intelligently=20replace=20any=20dependency=20on=20the=20cycle=0A+=20= =20=20=20=20=20=20=20;;=20root=20with=20a=20version=20of=20the=20root=20= with=20#:skip-build?=20enabled.=0A+=20=20=20=20=20=20=20=20;;=0A+=20=20=20= =20=20=20=20=20;;=20Right=20now=20this=20means=20that=20if=20a=20package=20= shows=20up=20in=20both=20input=0A+=20=20=20=20=20=20=20=20;;=20and=20= native-input=20closures,=20we'll=20try=20to=20build=20it's=20src=20= output=20twice.=0A+=20=20=20=20=20=20=20=20;;=0A+=20=20=20=20=20=20=20=20= ;;=20This=20also=20means=20that=20we're=20potentially=20setting=20the=20= #:skip-build?=0A+=20=20=20=20=20=20=20=20;;=20flag=20on=20non=20= cargo-build-system=20packages,=20but=20this=20should=20be=20okay=0A+=20=20= =20=20=20=20=20=20;;=20for=20now.=0A+=20=20=20=20=20=20=20=20(let*=20= ((translated-input=20(package=0A+=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20(inherit=20= input)=0A+=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20(inputs=20'())=0A+=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20(propagated-inputs=20'())=0A+=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= (native-inputs=20'())=0A+=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20(arguments=20= '(#:skip-build?=20#t)))))=0A+=20=20=20=20=20=20=20=20=20=20`(,name=20= ,translated-input=20,@rest)))))=0A+=20=20=20= (package-transitive-dependencies=20native-inputs=20= package-target-inputs)))=0A+=0A=20(define*=20(lower=20name=0A=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20#:key=20source=20inputs=20= native-inputs=20outputs=20system=20target=0A=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20(rust=20(default-rust))=0A@@=20-139,13=20+201,13=20= @@=20to=20NAME=20and=20VERSION."=0A=20=20=20=20=20=20=20=20=20=20= (host-inputs=20`(,@(if=20source=0A=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20`(("source"=20= ,source))=0A=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20'())=0A-=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20,@inputs=0A+=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20,@(expand-inputs=20inputs)=0A= =20=0A=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20;;=20Keep=20the=20standard=20inputs=20of=20'gnu-build-system'=0A=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= ,@(standard-packages)))=0A=20=20=20=20=20=20=20=20=20=20(build-inputs=20= `(("cargo"=20,rust=20"cargo")=0A=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20("rustc"=20,rust)=0A-=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= ,@native-inputs))=0A+=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20,@(expand-native-inputs=20native-inputs)))=0A=20=20=20= =20=20=20=20=20=20=20(outputs=20outputs)=0A=20=20=20=20=20=20=20=20=20=20= (build=20cargo-build)=0A=20=20=20=20=20=20=20=20=20=20(arguments=20= (strip-keyword-arguments=20private-keywords=20arguments)))))=0A--=20=0A= 2.21.0=0A=0A= --Apple-Mail=_DA76C889-91C6-47B0-A08C-2578701A12D6 Content-Disposition: attachment; filename=0003-gnu-crate-add-unicode-xid.patch Content-Type: application/octet-stream; x-unix-mode=0644; name="0003-gnu-crate-add-unicode-xid.patch" Content-Transfer-Encoding: quoted-printable =46rom=20922e985c684b4fcafe30f1c25d698396ffb58191=20Mon=20Sep=2017=20= 00:00:00=202001=0AFrom:=20Ivan=20Petkov=20=0A= Date:=20Tue,=2016=20Apr=202019=2003:40:14=20-0700=0ASubject:=20[PATCH=20= 3/4]=20gnu:=20crate:=20add=20unicode-xid=0A=0Agnu/local.mk:=20= (GNU_SYSTEM_MODULES):=20Add=20new=20file.=0Agnu/packages/crates-io.scm:=20= (rust-unicode-xid):=20New=20variable.=0A---=0A=20gnu/local.mk=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20|=20=201=20+=0A=20= gnu/packages/crates-io.scm=20|=2045=20= ++++++++++++++++++++++++++++++++++++++=0A=202=20files=20changed,=2046=20= insertions(+)=0A=20create=20mode=20100644=20gnu/packages/crates-io.scm=0A= =0Adiff=20--git=20a/gnu/local.mk=20b/gnu/local.mk=0Aindex=20= 41924a7de5..bf44af76b7=20100644=0A---=20a/gnu/local.mk=0A+++=20= b/gnu/local.mk=0A@@=20-121,6=20+121,7=20@@=20GNU_SYSTEM_MODULES=20=3D=09=09= =09=09\=0A=20=20=20%D%/packages/cpp.scm=20=09=09=09=09\=0A=20=20=20= %D%/packages/cppi.scm=09=09=09=09\=0A=20=20=20%D%/packages/cran.scm=09=09= =09=09\=0A+=20=20%D%/packages/crates-io.scm=09=09=09\=0A=20=20=20= %D%/packages/cross-base.scm=09=09=09\=0A=20=20=20%D%/packages/crypto.scm=09= =09=09\=0A=20=20=20%D%/packages/cryptsetup.scm=09=09=09\=0Adiff=20--git=20= a/gnu/packages/crates-io.scm=20b/gnu/packages/crates-io.scm=0Anew=20file=20= mode=20100644=0Aindex=200000000000..533fe0d21e=0A---=20/dev/null=0A+++=20= b/gnu/packages/crates-io.scm=0A@@=20-0,0=20+1,45=20@@=0A+;;;=20GNU=20= Guix=20---=20Functional=20package=20management=20for=20GNU=0A+;;;=20= Copyright=20=C2=A9=202019=20Ivan=20Petkov=20=0A= +;;;=0A+;;;=20This=20file=20is=20part=20of=20GNU=20Guix.=0A+;;;=0A+;;;=20= GNU=20Guix=20is=20free=20software;=20you=20can=20redistribute=20it=20= and/or=20modify=20it=0A+;;;=20under=20the=20terms=20of=20the=20GNU=20= General=20Public=20License=20as=20published=20by=0A+;;;=20the=20Free=20= Software=20Foundation;=20either=20version=203=20of=20the=20License,=20or=20= (at=0A+;;;=20your=20option)=20any=20later=20version.=0A+;;;=0A+;;;=20GNU=20= Guix=20is=20distributed=20in=20the=20hope=20that=20it=20will=20be=20= useful,=20but=0A+;;;=20WITHOUT=20ANY=20WARRANTY;=20without=20even=20the=20= implied=20warranty=20of=0A+;;;=20MERCHANTABILITY=20or=20FITNESS=20FOR=20= A=20PARTICULAR=20PURPOSE.=20=20See=20the=0A+;;;=20GNU=20General=20Public=20= License=20for=20more=20details.=0A+;;;=0A+;;;=20You=20should=20have=20= received=20a=20copy=20of=20the=20GNU=20General=20Public=20License=0A+;;;=20= along=20with=20GNU=20Guix.=20=20If=20not,=20see=20= .=0A+=0A+(define-module=20(gnu=20packages=20= crates-io)=0A+=20=20#:use-module=20(guix=20build-system=20cargo)=0A+=20=20= #:use-module=20(guix=20download)=0A+=20=20#:use-module=20((guix=20= licenses)=20#:prefix=20license:)=0A+=20=20#:use-module=20(guix=20= packages))=0A+=0A+(define-public=20rust-unicode-xid=0A+=20=20(package=0A= +=20=20=20=20(name=20"rust-unicode-xid")=0A+=20=20=20=20(version=20= "0.1.0")=0A+=20=20=20=20(source=0A+=20=20=20=20=20=20(origin=0A+=20=20=20= =20=20=20=20=20(method=20url-fetch)=0A+=20=20=20=20=20=20=20=20(uri=20= (crate-uri=20"unicode-xid"=20version))=0A+=20=20=20=20=20=20=20=20= (file-name=0A+=20=20=20=20=20=20=20=20=20=20(string-append=20name=20"-"=20= version=20".tar.gz"))=0A+=20=20=20=20=20=20=20=20(sha256=0A+=20=20=20=20=20= =20=20=20=20=20(base32=0A+=20=20=20=20=20=20=20=20=20=20=20=20= "1z57lqh4s18rr4x0j4fw4fmp9hf9346h0kmdgqsqx0fhjr3k0wpw"))))=0A+=20=20=20=20= (build-system=20cargo-build-system)=0A+=20=20=20=20(home-page=0A+=20=20=20= =20=20=20"https://github.com/unicode-rs/unicode-xid")=0A+=20=20=20=20= (synopsis=20"Determine=20Unicode=20XID=20related=20properties")=0A+=20=20= =20=20(description=20"Determine=20whether=20characters=20have=20the=20= XID_Start=0A+or=20XID_Continue=20properties=20according=20to=20Unicode=20= Standard=20Annex=20#31.")=0A+=20=20=20=20;;=20Dual=20licensed.=0A+=20=20=20= =20(license=20(list=20license:asl2.0=20license:expat))))=0A--=20=0A= 2.21.0=0A=0A= --Apple-Mail=_DA76C889-91C6-47B0-A08C-2578701A12D6 Content-Disposition: attachment; filename=0004-gnu-crate-Add-proc-macro2-and-quote.patch Content-Type: application/octet-stream; x-unix-mode=0644; name="0004-gnu-crate-Add-proc-macro2-and-quote.patch" Content-Transfer-Encoding: quoted-printable =46rom=2070f96162e55ac1d1116a5d94134d61aa769f8be7=20Mon=20Sep=2017=20= 00:00:00=202001=0AFrom:=20Ivan=20Petkov=20=0A= Date:=20Tue,=2016=20Apr=202019=2003:42:27=20-0700=0ASubject:=20[PATCH=20= 4/4]=20gnu:=20crate:=20Add=20proc-macro2=20and=20quote=0A=0A*=20= gnu/packages/crates-io.scm:=20(rust-proc-macro2):=20New=20variable.=0A= (rust-quote):=20New=20variable.=0A---=0A=20gnu/packages/crates-io.scm=20= |=2048=20++++++++++++++++++++++++++++++++++++++=0A=201=20file=20changed,=20= 48=20insertions(+)=0A=0Adiff=20--git=20a/gnu/packages/crates-io.scm=20= b/gnu/packages/crates-io.scm=0Aindex=20533fe0d21e..90e08731ea=20100644=0A= ---=20a/gnu/packages/crates-io.scm=0A+++=20b/gnu/packages/crates-io.scm=0A= @@=20-43,3=20+43,51=20@@=0A=20or=20XID_Continue=20properties=20according=20= to=20Unicode=20Standard=20Annex=20#31.")=0A=20=20=20=20=20;;=20Dual=20= licensed.=0A=20=20=20=20=20(license=20(list=20license:asl2.0=20= license:expat))))=0A+=0A+(define-public=20rust-proc-macro2=0A+=20=20= (package=0A+=20=20=20=20(name=20"rust-proc-macro2")=0A+=20=20=20=20= (version=20"0.4.27")=0A+=20=20=20=20(source=0A+=20=20=20=20=20=20(origin=0A= +=20=20=20=20=20=20=20=20(method=20url-fetch)=0A+=20=20=20=20=20=20=20=20= (uri=20(crate-uri=20"proc-macro2"=20version))=0A+=20=20=20=20=20=20=20=20= (file-name=0A+=20=20=20=20=20=20=20=20=20=20(string-append=20name=20"-"=20= version=20".tar.gz"))=0A+=20=20=20=20=20=20=20=20(sha256=0A+=20=20=20=20=20= =20=20=20=20=20(base32=0A+=20=20=20=20=20=20=20=20=20=20=20=20= "05c92v787snyaq4ss16vxc9mdv6zndfgsdq8k3hnnyffmsf7ycad"))))=0A+=20=20=20=20= (build-system=20cargo-build-system)=0A+=20=20=20=20(native-inputs=0A+=20=20= =20=20=20=20`(("rust-quote"=20,rust-quote=20"src")))=0A+=20=20=20=20= (inputs=0A+=20=20=20=20=20=20`(("rust-unicode-xid"=20,rust-unicode-xid=20= "src")))=0A+=20=20=20=20(home-page=20= "https://github.com/alexcrichton/proc-macro2")=0A+=20=20=20=20(synopsis=20= "Stable=20implementation=20of=20the=20upcoming=20new=20`proc_macro`=20= API")=0A+=20=20=20=20(description=20"This=20package=20provides=20a=20= stable=20implementation=20of=20the=20upcoming=20new=0A+`proc_macro`=20= API.=20=20Comes=20with=20an=20option,=20off=20by=20default,=20to=20also=20= reimplement=20itself=0A+in=20terms=20of=20the=20upstream=20unstable=20= API.")=0A+=20=20=20=20;;=20Dual=20licensed.=0A+=20=20=20=20(license=20= (list=20license:asl2.0=20license:expat))))=0A+=0A+(define-public=20= rust-quote=0A+=20=20(package=0A+=20=20=20=20(name=20"rust-quote")=0A+=20=20= =20=20(version=20"0.6.12")=0A+=20=20=20=20(source=0A+=20=20=20=20=20=20= (origin=0A+=20=20=20=20=20=20=20=20(method=20url-fetch)=0A+=20=20=20=20=20= =20=20=20(uri=20(crate-uri=20"quote"=20version))=0A+=20=20=20=20=20=20=20= =20(file-name=0A+=20=20=20=20=20=20=20=20=20=20(string-append=20name=20= "-"=20version=20".tar.gz"))=0A+=20=20=20=20=20=20=20=20(sha256=0A+=20=20=20= =20=20=20=20=20=20=20(base32=0A+=20=20=20=20=20=20=20=20=20=20=20=20= "1nw0klza45hf127kfyrpxsxd5jw2l6h21qxalil3hkr7bnf7kx7s"))))=0A+=20=20=20=20= (build-system=20cargo-build-system)=0A+=20=20=20=20(inputs=0A+=20=20=20=20= =20=20`(("rust-proc-macro2"=20,rust-proc-macro2=20"src")))=0A+=20=20=20=20= (home-page=20"https://github.com/dtolnay/quote")=0A+=20=20=20=20= (synopsis=20"Quasi-quoting=20macro=20quote!(...)")=0A+=20=20=20=20= (description=20"Quasi-quoting=20macro=20quote!(...)")=0A+=20=20=20=20;;=20= Dual=20licensed.=0A+=20=20=20=20(license=20(list=20license:asl2.0=20= license:expat))))=0A--=20=0A2.21.0=0A=0A= --Apple-Mail=_DA76C889-91C6-47B0-A08C-2578701A12D6 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=us-ascii --Apple-Mail=_DA76C889-91C6-47B0-A08C-2578701A12D6-- From unknown Fri Jun 13 10:26:49 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#35318] [PATCH] Update cargo-build-system to expand package inputs Resent-From: Ivan Petkov Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sat, 04 May 2019 16:41:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 35318 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 35318@debbugs.gnu.org Cc: Danny Milosavljevic , Chris Marusich Received: via spool by 35318-submit@debbugs.gnu.org id=B35318.15569880488244 (code B ref 35318); Sat, 04 May 2019 16:41:02 +0000 Received: (at 35318) by debbugs.gnu.org; 4 May 2019 16:40:48 +0000 Received: from localhost ([127.0.0.1]:52091 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hMxiS-00028u-53 for submit@debbugs.gnu.org; Sat, 04 May 2019 12:40:48 -0400 Received: from mail-pg1-f171.google.com ([209.85.215.171]:38718) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hMxiQ-00028i-GY for 35318@debbugs.gnu.org; Sat, 04 May 2019 12:40:46 -0400 Received: by mail-pg1-f171.google.com with SMTP id j26so4282280pgl.5 for <35318@debbugs.gnu.org>; Sat, 04 May 2019 09:40:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=w6ZAUaAe215XaAXECk3rw+XedmV0Y0jhJb7Sz4lHo04=; b=ok+YdQyIZyCOD2soc6ZTNCXRKYn/fp5jSiBz/jDY1krbxaRSgrzNb/Lzx83UhxXvjI MHMPNdfhBUwY28vO8LvbgalI0SO8STm9wCz4eUCRvjicMJmJOVV2VNXRILOKKsJBrOOw WVA0U1zxbL1RA9+qqf2xtsYAwS8jfxuJPzCaHGnGzlYwKYiD65WO5TvMTgHUb9AJxGrB iRhkBAutX1VnkFID3PQ1eWK3aFeqTPSMfF7b/biveiPe7i0cEfpI7g78dZGVLUdBVAuC CoLSKkROmidkESvQaO+absdpZCCbN5NLo2xjznTvhmSQRM6mprkjL2ySXAge4kNotIZZ md7w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=w6ZAUaAe215XaAXECk3rw+XedmV0Y0jhJb7Sz4lHo04=; b=CHj418vaFh2o7YZPB/5I9xWfNie0iKS4S5wp76E/9VRw4R975ZY7TGINCK4gSSiT0B J2MEYIoprmc4llrJJHpa/5GjrHHui5NPsJbPC/CygJ4HXsJOKshsMpk/685m9OJNK2j+ 3k+6e7lZfWZ/P/KPoZuASOsDac6Uqgl2uk5IJVwZ6PObDMZ0lxoyO845FuO88oWJjlds TJ1QgAJt3hGUBYCCySzP1xt08E22hkYOWvmFy+Yv4eUQ9No0qvmEtcEUgRiGaKfsGrd8 aWngECLk60oGIJHR495pMkhjbJM7di1yecnCcs5GVhoU0DHzggGsc8o7/tmyNhc9uGux RVnQ== X-Gm-Message-State: APjAAAVWvwMt/cabvW2d2E0IfRUog9tVvn/jH0L/qHeXI0HeppgAkYMF P6gNbD51buUVgKrpnja7PNauu46M7mw= X-Google-Smtp-Source: APXvYqwpRqjBdkSfHv+gEO8Kifcd6GdLJaMMeuiqCce89HUvYD0kWRNxnrYEnPUvvP357zQ2nHlemA== X-Received: by 2002:a63:db10:: with SMTP id e16mr19720791pgg.142.1556988040333; Sat, 04 May 2019 09:40:40 -0700 (PDT) Received: from ?IPv6:2601:602:9a00:1784:65e4:63e5:d86d:c501? ([2601:602:9a00:1784:65e4:63e5:d86d:c501]) by smtp.gmail.com with ESMTPSA id w38sm13940562pgk.90.2019.05.04.09.40.39 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 04 May 2019 09:40:39 -0700 (PDT) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 11.5 \(3445.9.1\)) From: Ivan Petkov In-Reply-To: Date: Sat, 4 May 2019 09:40:37 -0700 Content-Transfer-Encoding: quoted-printable Message-Id: References: X-Mailer: Apple Mail (2.3445.9.1) X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Friendly ping! Thanks, =E2=80=94Ivan= From unknown Fri Jun 13 10:26:49 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#35318] [PATCH] Update cargo-build-system to expand package inputs Resent-From: Danny Milosavljevic Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sat, 04 May 2019 18:32:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 35318 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Ivan Petkov , Cc: 35318@debbugs.gnu.org, Chris Marusich Received: via spool by 35318-submit@debbugs.gnu.org id=B35318.155699469127843 (code B ref 35318); Sat, 04 May 2019 18:32:02 +0000 Received: (at 35318) by debbugs.gnu.org; 4 May 2019 18:31:31 +0000 Received: from localhost ([127.0.0.1]:52264 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hMzRb-0007F1-66 for submit@debbugs.gnu.org; Sat, 04 May 2019 14:31:31 -0400 Received: from dd26836.kasserver.com ([85.13.145.193]:43788) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hMzRZ-0007Es-8Z for 35318@debbugs.gnu.org; Sat, 04 May 2019 14:31:29 -0400 Received: from localhost (178.113.194.41.wireless.dyn.drei.com [178.113.194.41]) by dd26836.kasserver.com (Postfix) with ESMTPSA id 7130633606E0; Sat, 4 May 2019 20:31:27 +0200 (CEST) Date: Sat, 4 May 2019 20:31:23 +0200 From: Danny Milosavljevic Message-ID: <20190504203123.2af2049f@scratchpost.org> In-Reply-To: References: X-Mailer: Claws Mail 3.17.3 (GTK+ 2.24.32; x86_64-unknown-linux-gnu) MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; boundary="Sig_//Po.yk7a7xIBKdYHnEAOuUj"; protocol="application/pgp-signature" X-Spam-Score: -0.7 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) --Sig_//Po.yk7a7xIBKdYHnEAOuUj Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable Hi Ludo, Hi Ivan, @Ludo: Could you take a look at patch 1? It's allowing the lookup of transitive dependencies in Guix to be more flexible. Is it OK? It's used in patch 2 in order to consider both inputs and propagated inputs rather than just propagated inputs. @Ivan: Thanks! I've tested it and it works. But I don't understand yet why you change the role of "inputs" compared to how it is in the rest of Guix. You have this: +(define-public rust-proc-macro2 + (package [...] + (build-system cargo-build-system) + (native-inputs + `(("rust-quote" ,rust-quote "src"))) + (inputs + `(("rust-unicode-xid" ,rust-unicode-xid "src"))) [...] Here, inputs refer to SOURCE parts of packages which are definitely not referred to at runtime. Does "guix gc --references ...rust-proc-macro2..." really refer to the source of rust-unicode-xid ? I checked, it doesn't, neither for the "src" derivation nor for the "out" derivation. I think the general approach is good but I'm not certain that this won't break other parts of Guix. If it doesn't, fine. @Ludo: WDYT? Details: A Rust crate has dependencies and dev-dependencies. The crate needs the dev-dependencies only when building, not at runtime. Let "transitives of X" mean "X and transitives of immediate dependencies of= X and transitives of immediate dev-dependencies of X", recursively. The crate needs the source code of all its transitives to be available when building, but needs none of the source code at runtime. A crate at run time only requires the immediate, if even that (probably not= !), dependencies and none of the dev-dependencies, and not as source code. So it's really not a propagated-input, although it kinda seems like a weird version of a propagated-input while building (something like a native-propagated-input). If this can't be generalized (and I'm not sure of that--Go has a similar static library-y view), we could also do those as (arguments ...) for the rust build system only--although not sure how to do the resolving of transitives then. --Sig_//Po.yk7a7xIBKdYHnEAOuUj Content-Type: application/pgp-signature Content-Description: OpenPGP digital signature -----BEGIN PGP SIGNATURE----- iQEzBAEBCAAdFiEEds7GsXJ0tGXALbPZ5xo1VCwwuqUFAlzN2nsACgkQ5xo1VCww uqXiQAgAnsh6D7ZoDv+8JU2L3Tvi484coVCFAHiHHV/2Shcy+I8O3jvgnibnToFA Nt9n1jZ/LgI33ikjAU/MsdCebS5EUmfiguQj8UHv7eem9kw3CPAHmZE9dAoYFs/P Kz5LZaQWmpCV6vonQco5DHHTiS/EKmDgS4AWNLqeZv42/pP3BHYG0Sy/w4qIDYm5 emni8sEnsJzSFG1qhvyV/i3Ywg07VqmNRh7FRgFFCUHb+pf5V375L6OaHT8+0fsX gGxNBKfWa7e+9qRkz2fBCyuFwZtysPbixkjzKYAg3GXS47Bk9euZ2AKYaiRed7OU tnFno5v+ZkKt3XYMXnfP7BIkLKXKrw== =oYVS -----END PGP SIGNATURE----- --Sig_//Po.yk7a7xIBKdYHnEAOuUj-- From unknown Fri Jun 13 10:26:49 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#35318] [PATCH] Update cargo-build-system to expand package inputs Resent-From: Ivan Petkov Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sat, 04 May 2019 21:10:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 35318 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Danny Milosavljevic Cc: ludo@gnu.org, 35318@debbugs.gnu.org, Chris Marusich Received: via spool by 35318-submit@debbugs.gnu.org id=B35318.155700419820614 (code B ref 35318); Sat, 04 May 2019 21:10:02 +0000 Received: (at 35318) by debbugs.gnu.org; 4 May 2019 21:09:58 +0000 Received: from localhost ([127.0.0.1]:52465 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hN1uw-0005MQ-8C for submit@debbugs.gnu.org; Sat, 04 May 2019 17:09:58 -0400 Received: from mail-pg1-f196.google.com ([209.85.215.196]:46646) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hN1uu-0005MC-4L for 35318@debbugs.gnu.org; Sat, 04 May 2019 17:09:56 -0400 Received: by mail-pg1-f196.google.com with SMTP id t187so335098pgb.13 for <35318@debbugs.gnu.org>; Sat, 04 May 2019 14:09:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=T0UjZrsxTgWMZxWxzoeQAmQBEi9Twfg1X5Jy9fi8OWw=; b=POtZs3EX8RHaEELlDs2g6inv3zyrTsQQkATcug3c/kqbDaWOydikSpUlinw+1P46CT UJ07AVQ4HJUNj+ia4YhrcRIBjPDV87Da61cHPnWsnT8QUakyHjqLoyDo3khqBjGsOLg1 g9nnHO3Sl/+QME6UlICh8oMaNUD8hWHNfGVDPoa61dYelaQYVGVtGgS1B6er6qiIAaPN WRCf6RBkI4eaM9KfdtvEIGcX+e5r6CCxbRY4O5ZnMNb+DJ/sLlpxterpiNjNXWDvFsWT Zgu7jWB2R/i8UQuWjRDw3+EoJDA+fiYeovoarbrDV3mOUkmpnU/5CgZel09nPS9h6gxB odvQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=T0UjZrsxTgWMZxWxzoeQAmQBEi9Twfg1X5Jy9fi8OWw=; b=XO7a/dEnhjMf/tVIbnWx9W/yTAtBtb1w512we5AWZzdqp3Tnl6cIvq7MPymG1I7+RI ZnAcmaLGY86QMFYhDWa7qGr2C/D5o+NhOZWKjhn0q4wclL2PDioic6IqUANfaR3rHDnr YxIx8FGsbJ8PlDFqEA9O8zrFju6xiIHfmKORTjZcgbjvt4QtKDMrKgeAUv19z5yveEFI Y3yrHZI8aqXfK8NGSItMM9ix81LVDPwI3Yp/7vSlhQoPzauA0Ihiv0b5zd53LCVK3Qmr YanrtJm3ntVqACFVzVYpZhUYfngjfKkF+EraG7Q/5vE3BIeBk95k/mLmAtgrSsPzkmH5 r+sQ== X-Gm-Message-State: APjAAAUGLUOWHD/VLB3g7pw/tnvzdTebB8opQs3Ya4TPNCZz0A/j6xsR dpImqbLW1hSnA2dbdz/4KY0= X-Google-Smtp-Source: APXvYqwkp77N+RCrQMIksUp2Sn8FkTVAMgGIcHP17rpIzk+RK3Cv5HmNTsxJneERmYmyctkAT3NxBg== X-Received: by 2002:a63:1160:: with SMTP id 32mr21159018pgr.106.1557004189977; Sat, 04 May 2019 14:09:49 -0700 (PDT) Received: from ?IPv6:2601:602:9a00:1784:8023:e5c2:46d2:3baf? ([2601:602:9a00:1784:8023:e5c2:46d2:3baf]) by smtp.gmail.com with ESMTPSA id e16sm6132698pgv.89.2019.05.04.14.09.49 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 04 May 2019 14:09:49 -0700 (PDT) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 11.5 \(3445.9.1\)) From: Ivan Petkov In-Reply-To: <20190504203123.2af2049f@scratchpost.org> Date: Sat, 4 May 2019 14:09:44 -0700 Content-Transfer-Encoding: quoted-printable Message-Id: <0222B4A7-FFCD-42C3-B8EA-2CD933F1ADA4@gmail.com> References: <20190504203123.2af2049f@scratchpost.org> X-Mailer: Apple Mail (2.3445.9.1) X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Hi Danny, Thanks for the feedback! > On May 4, 2019, at 11:31 AM, Danny Milosavljevic = wrote: >=20 > @Ivan: >=20 > Thanks! I've tested it and it works. >=20 > But I don't understand yet why you change the role of "inputs" = compared > to how it is in the rest of Guix. >=20 > You have this: >=20 > +(define-public rust-proc-macro2 > + (package > [...] > + (build-system cargo-build-system) > + (native-inputs > + `(("rust-quote" ,rust-quote "src"))) > + (inputs > + `(("rust-unicode-xid" ,rust-unicode-xid "src"))) > [...] >=20 > Here, inputs refer to SOURCE parts of packages which are definitely = not > referred to at runtime. Does "guix gc --references = ...rust-proc-macro2..." > really refer to the source of rust-unicode-xid ? I checked, it = doesn't, > neither for the "src" derivation nor for the "out" derivation. >=20 > I think the general approach is good but I'm not certain that this = won't > break other parts of Guix. If it doesn't, fine. @Ludo: WDYT? To my understanding, Guix only needs the inputs and native-inputs to be = present in the store during build time, and only propagated-inputs need to be = present in the store during runtime. Since cargo crates don=E2=80=99t need the = source present at runtime, propagated-inputs seemed inappropriate to me. Pardon my ignorance on Guix, but what do you mean by =E2=80=9Cchanging = the role of inputs=E2=80=9D? Unless by this you mean changing the semantics of = =E2=80=9Cexpanding=E2=80=9D the inputs, then yes this is a departure from the existing usage. In my = mind, I want the Guix package definition to mirror the cargo one as it would = be a nightmare to maintain a list of the expanded transitive packages in each definition by hand. > Details: >=20 > A Rust crate has dependencies and dev-dependencies. >=20 > The crate needs the dev-dependencies only when building, not at = runtime. >=20 > Let "transitives of X" mean "X and transitives of immediate = dependencies of X and > transitives of immediate dev-dependencies of X", recursively. >=20 > The crate needs the source code of all its transitives to be available = when > building, but needs none of the source code at runtime. >=20 > A crate at run time only requires the immediate, if even that = (probably not!), > dependencies and none of the dev-dependencies, and not as source code. >=20 > So it's really not a propagated-input, although it kinda seems like a = weird > version of a propagated-input while building (something like a > native-propagated-input). >=20 > If this can't be generalized (and I'm not sure of that--Go has a = similar > static library-y view), we could also do those as (arguments ...) for = the > rust build system only--although not sure how to do the resolving of > transitives then. If this needs to be it=E2=80=99s own Guix concept, perhaps it would be = along the lines of propagated-native-inputs? I opted to make the cargo-build-system perform the work of the = transitive lookups since I wasn=E2=80=99t sure if this would truly be a generalized = feature=E2=80=A6 =E2=80=94Ivan= From unknown Fri Jun 13 10:26:49 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#35318] [PATCH] Update cargo-build-system to expand package inputs Resent-From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 06 May 2019 08:02:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 35318 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Ivan Petkov Cc: Danny Milosavljevic , 35318@debbugs.gnu.org, Chris Marusich Received: via spool by 35318-submit@debbugs.gnu.org id=B35318.155712966615854 (code B ref 35318); Mon, 06 May 2019 08:02:02 +0000 Received: (at 35318) by debbugs.gnu.org; 6 May 2019 08:01:06 +0000 Received: from localhost ([127.0.0.1]:55631 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hNYYc-00047e-1g for submit@debbugs.gnu.org; Mon, 06 May 2019 04:01:06 -0400 Received: from eggs.gnu.org ([209.51.188.92]:59228) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hNYYZ-000470-Ds for 35318@debbugs.gnu.org; Mon, 06 May 2019 04:01:05 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:34688) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hNYYQ-0005PB-SM; Mon, 06 May 2019 04:00:57 -0400 Received: from [2001:660:6102:320:e120:2c8f:8909:cdfe] (port=47550 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1hNYYQ-0002z9-4q; Mon, 06 May 2019 04:00:54 -0400 From: Ludovic =?UTF-8?Q?Court=C3=A8s?= References: Date: Mon, 06 May 2019 10:00:50 +0200 In-Reply-To: (Ivan Petkov's message of "Thu, 18 Apr 2019 22:34:05 -0700") Message-ID: <87ftpsnhal.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Hello, Ivan Petkov skribis: > From ca6dfd9451f22c4d6dc02aa7eceee0c35800dd57 Mon Sep 17 00:00:00 2001 > From: Ivan Petkov > Date: Tue, 16 Apr 2019 03:32:44 -0700 > Subject: [PATCH 1/4] packages: allow dynamic input closure computation > > * guix/packages: (transitive-inputs): Rename to > package-transitive-dependencies. > (package-transitive-dependencies): Add proc parameter and use it. > (transitive-inputs): Add it. There=E2=80=99s nothing written in terms of =E2=80=9Cdependencies=E2=80=9D;= instead everything is written in terms of =E2=80=9Cinputs=E2=80=9D, so I=E2=80=99d like to rem= ain consistent here. If we need something more specific, I=E2=80=99d rather see it as a private procedure in (guix build-system cargo-build-system). Danny wrote: > It's used in patch 2 in order to consider both inputs and propagated inpu= ts > rather than just propagated inputs. I=E2=80=99m not sure I want to know the details :-), but it seems to be what =E2=80=98package-transitive-inputs=E2=80=99 does, no? (define (package-transitive-inputs package) "Return the transitive inputs of PACKAGE---i.e., its direct inputs along with their propagated inputs, recursively." (transitive-inputs (package-direct-inputs package))) Do you have an example of a package where this is not enough? Thanks, Ludo=E2=80=99. From unknown Fri Jun 13 10:26:49 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#35318] [PATCH] Update cargo-build-system to expand package inputs Resent-From: Ivan Petkov Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 06 May 2019 16:05:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 35318 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Ludovic =?UTF-8?Q?Court=C3=A8s?= Cc: Danny Milosavljevic , 35318@debbugs.gnu.org, Chris Marusich Received: via spool by 35318-submit@debbugs.gnu.org id=B35318.155715868410117 (code B ref 35318); Mon, 06 May 2019 16:05:02 +0000 Received: (at 35318) by debbugs.gnu.org; 6 May 2019 16:04:44 +0000 Received: from localhost ([127.0.0.1]:57279 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hNg6e-0002d5-DE for submit@debbugs.gnu.org; Mon, 06 May 2019 12:04:44 -0400 Received: from mail-pf1-f193.google.com ([209.85.210.193]:44782) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hNg6a-0002cb-6l for 35318@debbugs.gnu.org; Mon, 06 May 2019 12:04:41 -0400 Received: by mail-pf1-f193.google.com with SMTP id y13so7001301pfm.11 for <35318@debbugs.gnu.org>; Mon, 06 May 2019 09:04:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=SMSHCOqtPMwLVB6+5wcEHjEZYUgh33HldOyVOif1vpE=; b=YBgIzBRj+wMZD23OgfD2KM8QV4kYiTtZLs2Ux2mr213ao3eVHYk/ukAP0+0Lhc95KJ WMZnaBz2dUC3tl/QXi0o0O5S97p7HcdtWizfA8YvyGs+6oZgxqiVfa2x3mPKIGSyMcNv myIm5tFocqBFYv0b5AK4gnyegxnSbFVKiIQ5rT937ny3/RN80e612MWm1RJlDPv2X3uu xfzoX3mJ/7bBRU7W1Wkz1ueiGJqtkfoAVrLF25tNob2GxVz4LJ9uMs+ZmTflc2PVCkQh C8GXXsf1TgyT/9nCsOc8aUXpX5mgntYVzngZn7Dn6froBeIYh4S33dmePw0HeX5iahoO rV7w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=SMSHCOqtPMwLVB6+5wcEHjEZYUgh33HldOyVOif1vpE=; b=C7ytBD4kzJasHIFH4fP1LQ0aQuOwnmx+7UzRwaiOpRdHmxebu1oLDcGekWfViLSznH IRn56okHcvOrwGIyMBwVd3WvrBiTPMcse6o4LElDRKnvWpyEEOobJk43dksEQTSRmYN4 bJiDWv1B/cPvjXSRuehw9LAyrwghou5rMgg94zOvIYLhXN0adCUlFmCBCZWM9NURE9HC JkTMgwbhgnwAqyYQUdJAk3gMEzj9vOMZHEn/HDAIoK2m/QhvIRFm79/gNzf3y3NZpWkW 6JyVbfZWk+sa1TcnRBA2wkabWYhxVf6h93GHcOpK3DtHw5/oVlZELs2D4w6cihwhzHDO tWjQ== X-Gm-Message-State: APjAAAWowXEI/amGypvHjntAp2Z4YyRy6aiOWWzZKnhcFdsRIVxjAB7g MLfDMnBIWnZMTPv5w2RbY6I= X-Google-Smtp-Source: APXvYqyleCcnNa07YWj9vMk9q9iyA+LsTB0gyGow3n0O7BxNmkUUU3ZDFDYIBS8U8LfHn8yuHNhotw== X-Received: by 2002:a63:e408:: with SMTP id a8mr14654028pgi.146.1557158674253; Mon, 06 May 2019 09:04:34 -0700 (PDT) Received: from ?IPv6:2601:602:9a00:1784:b0ad:9200:f1ef:367f? ([2601:602:9a00:1784:b0ad:9200:f1ef:367f]) by smtp.gmail.com with ESMTPSA id r8sm13913243pfn.11.2019.05.06.09.04.32 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 06 May 2019 09:04:33 -0700 (PDT) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 11.5 \(3445.9.1\)) From: Ivan Petkov In-Reply-To: <87ftpsnhal.fsf@gnu.org> Date: Mon, 6 May 2019 09:04:32 -0700 Content-Transfer-Encoding: quoted-printable Message-Id: <2C03880B-F90E-4949-9637-DC918B6D40A0@gmail.com> References: <87ftpsnhal.fsf@gnu.org> X-Mailer: Apple Mail (2.3445.9.1) X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Hi Ludo, > On May 6, 2019, at 1:00 AM, Ludovic Court=C3=A8s wrote: >=20 > There=E2=80=99s nothing written in terms of =E2=80=9Cdependencies=E2=80=9D= ; instead everything > is written in terms of =E2=80=9Cinputs=E2=80=9D, so I=E2=80=99d like = to remain consistent here. I admit, I wasn=E2=80=99t feeling very inspired with coming up with a = name, but I wanted to avoid confusing it with the existing package-transitive-inputs = procedure. > If we need something more specific, I=E2=80=99d rather see it as a = private > procedure in (guix build-system cargo-build-system). I wanted to reuse the core traversal/memoization that was defined in the=20= original package-transitive-inputs procedure, but I can fork the = implementation as a private procedure in the cargo-build-system for now. > I=E2=80=99m not sure I want to know the details :-), but it seems to = be what > =E2=80=98package-transitive-inputs=E2=80=99 does, no? package-transitive-inputs captures all transitive propagated-inputs, but = the cargo-build-system needs all transitive propagated-inputs and regular = inputs as well (modeling cargo dependencies as propagated-inputs does not seem appropriate). Thanks, =E2=80=94Ivan= From unknown Fri Jun 13 10:26:49 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#35318] [PATCH] Update cargo-build-system to expand package inputs Resent-From: Ivan Petkov Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Thu, 09 May 2019 23:18:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 35318 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 35318@debbugs.gnu.org Cc: Danny Milosavljevic , Ludovic =?UTF-8?Q?Court=C3=A8s?= , Chris Marusich Received: via spool by 35318-submit@debbugs.gnu.org id=B35318.155744387617395 (code B ref 35318); Thu, 09 May 2019 23:18:01 +0000 Received: (at 35318) by debbugs.gnu.org; 9 May 2019 23:17:56 +0000 Received: from localhost ([127.0.0.1]:36682 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hOsIW-0004WV-9V for submit@debbugs.gnu.org; Thu, 09 May 2019 19:17:56 -0400 Received: from mail-pl1-f193.google.com ([209.85.214.193]:35119) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hOsIU-0004WE-D2 for 35318@debbugs.gnu.org; Thu, 09 May 2019 19:17:54 -0400 Received: by mail-pl1-f193.google.com with SMTP id g5so1868935plt.2 for <35318@debbugs.gnu.org>; Thu, 09 May 2019 16:17:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:subject:from:in-reply-to:date:cc:message-id:references :to; bh=lgMtd3cdRkkRCUXWMwgbFlzeMqneRXRKKzlMQXE9ePI=; b=SSL6E2tgj3CFb3GzdeW0yp2KiRjv/bKW8Ix9s/hOgpqwsKWIaWm/zN638e6En428ls UFbqX2SljP/a4OLJC+QWGlmTp0RPgfc1+sHesvW+yz+Vz/WLSfaNpWu92m5xUp/4Zgmf 1G2rQUtpq0x534wj9xPxVFeRRvhS4oVK/6WpOuYqTg7xMGL/DHv/lVk7uRFpqs747dgW fc02gNWwp7kDX8ZrYlziwUaJg/G4aEpA52eD8yW9TEESICq58V4YrjCYLrNcHipyws52 r3mwEV76KGvrN7qTukvMXrl5rNIYXOqx/4KC3IhtCuxiPrFCe3V9rTfvTcTdo82OO8zK eEyA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:subject:from:in-reply-to:date:cc :message-id:references:to; bh=lgMtd3cdRkkRCUXWMwgbFlzeMqneRXRKKzlMQXE9ePI=; b=pUrrlDPnSjHsguDIOXsFSYSdFLTT8CSBqt7ItqMpByO3+V5xdzIMvsZRgfPJfMw6t6 W8yknobQVBGhBtUyQkCiiRO5YIpaHsM1137AGhpkpWIbZYvrd47wCoUWg3mJx5DvqjNh BEx2cYpioCltVFu9C3bE4HvB/4XNrEqRJ73tJ4FWzslVJ6ZzLB9nATeMLZzfWE8A24ck XYDOzHW+Hh4QuzuD2ecWbFWdyIBPeCX+u2JfLRwMtUharl4o7Gl/k6SXLOx2YKoI9Fqf OL/IyVsbos+TET4DRi8V0h0lsAOSvelzpjVCFhO/at/1pF9RjOM2Fe8Ovq/waqziwgEl 7YNQ== X-Gm-Message-State: APjAAAXA46Nn+jeOOmyXm9CqC7i7NreroklJGenSrxaUM9HV2gDuBnAU 4DusFVYIJk/57tsbvOU1njmzyKO0AdYSmQ== X-Google-Smtp-Source: APXvYqxRUVyJFt89yOeYbKL+mmD56Sd5h4MLAtbpQ9kSAqerFdq34YZx0a2Zf5Ut7L6X0sPuhDRmpg== X-Received: by 2002:a17:902:b602:: with SMTP id b2mr8753532pls.293.1557443868573; Thu, 09 May 2019 16:17:48 -0700 (PDT) Received: from ?IPv6:2601:602:9a00:1784:5cf7:781d:af51:f841? ([2601:602:9a00:1784:5cf7:781d:af51:f841]) by smtp.gmail.com with ESMTPSA id j32sm3820146pgi.73.2019.05.09.16.17.47 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 09 May 2019 16:17:47 -0700 (PDT) Content-Type: multipart/mixed; boundary="Apple-Mail=_2C46378E-E9AF-4521-97B6-762564BE25C7" Mime-Version: 1.0 (Mac OS X Mail 11.5 \(3445.9.1\)) From: Ivan Petkov In-Reply-To: <2C03880B-F90E-4949-9637-DC918B6D40A0@gmail.com> Date: Thu, 9 May 2019 16:17:46 -0700 Message-Id: <074E4899-C4FF-4A76-8E97-093378D2F8D5@gmail.com> References: <87ftpsnhal.fsf@gnu.org> <2C03880B-F90E-4949-9637-DC918B6D40A0@gmail.com> X-Mailer: Apple Mail (2.3445.9.1) X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) --Apple-Mail=_2C46378E-E9AF-4521-97B6-762564BE25C7 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 Updated the patch series as per Ludo=E2=80=99s feedback. Thanks, =E2=80=94Ivan --Apple-Mail=_2C46378E-E9AF-4521-97B6-762564BE25C7 Content-Disposition: attachment; filename=0001-build-system-cargo-expand-transitive-package-inputs.patch Content-Type: application/octet-stream; x-unix-mode=0644; name="0001-build-system-cargo-expand-transitive-package-inputs.patch" Content-Transfer-Encoding: quoted-printable =46rom=203ac8a092fad93754e323f7d9bec2af1a3912b36f=20Mon=20Sep=2017=20= 00:00:00=202001=0AFrom:=20Ivan=20Petkov=20=0A= Date:=20Tue,=2016=20Apr=202019=2003:37:44=20-0700=0ASubject:=20[PATCH=20= 1/3]=20build-system/cargo:=20expand=20transitive=20package=20inputs=0A=0A= *=20guix/build/cargo:=20(package-target-inputs):=20Add=20it.=0A= (expand-inputs):=20Add=20it.=0A(expand-native-inputs):=20Add=20it.=0A= (package-transitive-dependencies):=20Add=20it.=0A(lower):=20Use=20new=20= variables.=0A---=0A=20guix/build-system/cargo.scm=20|=20105=20= +++++++++++++++++++++++++++++++++++-=0A=201=20file=20changed,=20103=20= insertions(+),=202=20deletions(-)=0A=0Adiff=20--git=20= a/guix/build-system/cargo.scm=20b/guix/build-system/cargo.scm=0Aindex=20= dc137421e9..811a044a8c=20100644=0A---=20a/guix/build-system/cargo.scm=0A= +++=20b/guix/build-system/cargo.scm=0A@@=20-29,6=20+29,8=20@@=0A=20=20=20= #:use-module=20(guix=20build-system)=0A=20=20=20#:use-module=20(guix=20= build-system=20gnu)=0A=20=20=20#:use-module=20(ice-9=20match)=0A+=20=20= #:use-module=20(ice-9=20vlist)=0A+=20=20#:use-module=20(srfi=20srfi-1)=0A= =20=20=20#:use-module=20(srfi=20srfi-26)=0A=20=20=20#:export=20= (%cargo-build-system-modules=0A=20=20=20=20=20=20=20=20=20=20=20=20=20= %cargo-utils-modules=0A@@=20-121,6=20+123,105=20@@=20to=20NAME=20and=20= VERSION."=0A=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20#:outputs=20(cons=20"src"=20outputs)=0A= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20#:guile-for-build=20guile-for-build))=0A=20=0A= +(define=20(package-transitive-dependencies=20inputs)=0A+=20=20"Return=20= the=20closure=20of=20INPUTS=20when=20considering=20the=20'inputs'=20and=0A= +'propagated-inputs'=20edges.=20=20Omit=20duplicate=20inputs,=20except=20= for=20those=0A+already=20present=20in=20INPUTS=20itself.=0A+=0A+This=20= is=20implemented=20as=20a=20breadth-first=20traversal=20such=20that=20= INPUTS=20is=0A+preserved,=20and=20only=20duplicate=20extracted=20inputs=20= are=20removed.=0A+=0A+Forked=20from=20((guix=20packages)=20= transitive-inputs)=20since=20this=20extraction=0A+uses=20slightly=20= different=20rules=20compared=20to=20the=20rest=20of=20guix=20(i.e.=20we=0A= +extract=20more=20than=20just=20propagated-inputs)."=0A+=20=20(define=20= (seen?=20seen=20item=20outputs)=0A+=20=20=20=20;;=20FIXME:=20We're=20= using=20pointer=20identity=20here,=20which=20is=20extremely=20sensitive=0A= +=20=20=20=20;;=20to=20memoization=20in=20package-producing=20= procedures;=20see=0A+=20=20=20=20;;=20.=0A+=20= =20=20=20(match=20(vhash-assq=20item=20seen)=0A+=20=20=20=20=20=20((_=20= .=20o)=20(equal?=20o=20outputs))=0A+=20=20=20=20=20=20(_=20=20=20=20=20=20= =20#f)))=0A+=0A+=20=20(let=20loop=20((inputs=20=20=20=20=20inputs)=0A+=20= =20=20=20=20=20=20=20=20=20=20=20=20(result=20=20=20=20=20'())=0A+=20=20=20= =20=20=20=20=20=20=20=20=20=20(propagated=20'())=0A+=20=20=20=20=20=20=20= =20=20=20=20=20=20(first?=20=20=20=20=20#t)=0A+=20=20=20=20=20=20=20=20=20= =20=20=20=20(seen=20=20=20=20=20=20=20vlist-null))=0A+=20=20=20=20(match=20= inputs=0A+=20=20=20=20=20=20(()=0A+=20=20=20=20=20=20=20(if=20(null?=20= propagated)=0A+=20=20=20=20=20=20=20=20=20=20=20(reverse=20result)=0A+=20= =20=20=20=20=20=20=20=20=20=20(loop=20(reverse=20(concatenate=20= propagated))=20result=20'()=20#f=20seen)))=0A+=20=20=20=20=20=20(((and=20= input=20(label=20(?=20package?=20package)=20outputs=20...))=20rest=20= ...)=0A+=20=20=20=20=20=20=20(if=20(and=20(not=20first?)=20(seen?=20seen=20= package=20outputs))=0A+=20=20=20=20=20=20=20=20=20=20=20(loop=20rest=20= result=20propagated=20first?=20seen)=0A+=20=20=20=20=20=20=20=20=20=20=20= (loop=20rest=0A+=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20(cons=20= input=20result)=0A+=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= (cons=20(append=20(package-inputs=20package)=0A+=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= (package-propagated-inputs=20package))=0A+=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20propagated)=0A+=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20first?=0A+=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20(vhash-consq=20package=20outputs=20seen))))=0A+=20=20=20=20= =20=20((input=20rest=20...)=0A+=20=20=20=20=20=20=20(loop=20rest=20(cons=20= input=20result)=20propagated=20first?=20seen)))))=0A+=0A+(define*=20= (expand-inputs=20inputs)=0A+=20=20"Return=20the=20transitive=20target=20= inputs=20for=20each=20package=20in=20INPUTS.=0A+=0A+Cargo=20requires=20= all=20transitive=20crate=20dependencies=20to=20be=20available=20in=20its=20= index,=0A+even=20if=20they=20are=20optional=20(this=20is=20so=20it=20can=20= generate=20deterministic=0A+Cargo.lock=20files=20regardless=20of=20the=20= target=20platform=20or=20enabled=20features).=0A+=0A+Rather=20than=20= burden=20the=20package=20definition=20to=20expand=20these,=20we'll=20= automate=0A+that=20process=20in=20the=20build=20system."=0A+=20=20= (package-transitive-dependencies=20inputs))=0A+=0A+(define*=20= (expand-native-inputs=20native-inputs)=0A+=20=20"Return=20the=20= transitive=20target=20inputs=20for=20each=20package=20in=20= NATIVE-INPUTS.=0A+=0A+We=20need=20all=20transitive=20crate=20= dependencies=20for=20any=20cargo=20dev-dependencies,=0A+but=20this=20is=20= only=20needed=20when=20building/testing=20a=20crate=20directly=0A+(i.e.=20= we=20will=20never=20need=20transitive=20dev-dependencies=20for=20any=20= dependency=0A+crates).=0A+=0A+In=20addition,=20we=20need=20to=20modify=20= any=20native-inputs=20to=20avoid=20any=20apparent=0A+cycles.=20Cargo=20= does=20not=20permit=20cyclic=20dependencies=20between=20crates,=20= however,=0A+it=20permits=20cycles=20to=20occur=20via=20dev-dependencies.=20= For=20example,=20if=20crate=20X=0A+depends=20on=20crate=20Y,=20crate=20= Y's=20tests=20could=20pull=20in=20crate=20X=20to=20to=20verify=0A= +everything=20builds=20properly=20(this=20is=20a=20rare=20scenario,=20= but=20it=20it=20happens=20for=0A+example=20with=20the=20`proc-macro2`=20= and=20`quote`=20crates).=20This=20is=20allowed=20by=20cargo=0A+because=20= tests=20are=20built=20as=20a=20pseudo-crate=20which=20happens=20to=20= depend=20on=20the=0A+X=20and=20Y=20crates,=20forming=20an=20acyclic=20= graph.=0A+=0A+Cargo=20ultimately=20needs=20only=20the=20crate=20sources=20= available=20when=20doing=20a=20build.=0A+Ultimately,=20if=20a=20cycle=20= is=20detected,=20we=20can=20break=20it=20by=20replacing=20the=20current=0A= +crate=20we're=20trying=20to=20build=20with=20a=20no-op=20build=20which=20= only=20packages=20the=20crate=0A+source;=20cargo=20will=20then=20find=20= the=20source=20available=20in=20its=20index=20and=20build=20things=0A= +properly."=0A+=20=20(map=0A+=20=20=20=20(lambda=20(dep)=0A+=20=20=20=20=20= =20(match=20dep=0A+=20=20=20=20=20=20=20((name=20input=20rest=20...)=0A+=20= =20=20=20=20=20=20=20;;=20TODO:=20Starting=20out=20real=20simple=20by=20= ensuring=20no=20native-inputs=20are=0A+=20=20=20=20=20=20=20=20;;=20= actually=20built=20so=20we=20don't=20accidentally=20hit=20a=20cycle.=20= We=20can=20revisit=0A+=20=20=20=20=20=20=20=20;;=20this=20later=20and=20= more=20intelligently=20replace=20any=20dependency=20on=20the=20cycle=0A+=20= =20=20=20=20=20=20=20;;=20root=20with=20a=20version=20of=20the=20root=20= with=20#:skip-build?=20enabled.=0A+=20=20=20=20=20=20=20=20;;=0A+=20=20=20= =20=20=20=20=20;;=20Right=20now=20this=20means=20that=20if=20a=20package=20= shows=20up=20in=20both=20input=0A+=20=20=20=20=20=20=20=20;;=20and=20= native-input=20closures,=20we'll=20try=20to=20build=20it's=20src=20= output=20twice.=0A+=20=20=20=20=20=20=20=20;;=0A+=20=20=20=20=20=20=20=20= ;;=20This=20also=20means=20that=20we're=20potentially=20setting=20the=20= #:skip-build?=0A+=20=20=20=20=20=20=20=20;;=20flag=20on=20non=20= cargo-build-system=20packages,=20but=20this=20should=20be=20okay=0A+=20=20= =20=20=20=20=20=20;;=20for=20now.=0A+=20=20=20=20=20=20=20=20(let*=20= ((translated-input=20(package=0A+=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20(inherit=20= input)=0A+=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20(inputs=20'())=0A+=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20(propagated-inputs=20'())=0A+=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= (native-inputs=20'())=0A+=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20(arguments=20= '(#:skip-build?=20#t)))))=0A+=20=20=20=20=20=20=20=20=20=20`(,name=20= ,translated-input=20,@rest)))))=0A+=20=20=20= (package-transitive-dependencies=20native-inputs)))=0A+=0A=20(define*=20= (lower=20name=0A=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20#:key=20= source=20inputs=20native-inputs=20outputs=20system=20target=0A=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20(rust=20(default-rust))=0A@@=20= -139,13=20+240,13=20@@=20to=20NAME=20and=20VERSION."=0A=20=20=20=20=20=20= =20=20=20=20(host-inputs=20`(,@(if=20source=0A=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= `(("source"=20,source))=0A=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20'())=0A-=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20,@inputs=0A+=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= ,@(expand-inputs=20inputs)=0A=20=0A=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20;;=20Keep=20the=20standard=20inputs=20= of=20'gnu-build-system'=0A=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20,@(standard-packages)))=0A=20=20=20=20=20=20=20= =20=20=20(build-inputs=20`(("cargo"=20,rust=20"cargo")=0A=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20("rustc"=20= ,rust)=0A-=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20,@native-inputs))=0A+=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20,@(expand-native-inputs=20= native-inputs)))=0A=20=20=20=20=20=20=20=20=20=20(outputs=20outputs)=0A=20= =20=20=20=20=20=20=20=20=20(build=20cargo-build)=0A=20=20=20=20=20=20=20=20= =20=20(arguments=20(strip-keyword-arguments=20private-keywords=20= arguments)))))=0A--=20=0A2.21.0=0A=0A= --Apple-Mail=_2C46378E-E9AF-4521-97B6-762564BE25C7 Content-Disposition: attachment; filename=0002-gnu-crate-add-unicode-xid.patch Content-Type: application/octet-stream; x-unix-mode=0644; name="0002-gnu-crate-add-unicode-xid.patch" Content-Transfer-Encoding: quoted-printable =46rom=20ec8509623a3b59a25a4ae995dca0f18cd5b1ce48=20Mon=20Sep=2017=20= 00:00:00=202001=0AFrom:=20Ivan=20Petkov=20=0A= Date:=20Tue,=2016=20Apr=202019=2003:40:14=20-0700=0ASubject:=20[PATCH=20= 2/3]=20gnu:=20crate:=20add=20unicode-xid=0A=0Agnu/local.mk:=20= (GNU_SYSTEM_MODULES):=20Add=20new=20file.=0Agnu/packages/crates-io.scm:=20= (rust-unicode-xid):=20New=20variable.=0A---=0A=20gnu/local.mk=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20|=20=201=20+=0A=20= gnu/packages/crates-io.scm=20|=2045=20= ++++++++++++++++++++++++++++++++++++++=0A=202=20files=20changed,=2046=20= insertions(+)=0A=20create=20mode=20100644=20gnu/packages/crates-io.scm=0A= =0Adiff=20--git=20a/gnu/local.mk=20b/gnu/local.mk=0Aindex=20= 3f97397c4a..f92db5821c=20100644=0A---=20a/gnu/local.mk=0A+++=20= b/gnu/local.mk=0A@@=20-121,6=20+121,7=20@@=20GNU_SYSTEM_MODULES=20=3D=09=09= =09=09\=0A=20=20=20%D%/packages/cpp.scm=20=09=09=09=09\=0A=20=20=20= %D%/packages/cppi.scm=09=09=09=09\=0A=20=20=20%D%/packages/cran.scm=09=09= =09=09\=0A+=20=20%D%/packages/crates-io.scm=09=09=09\=0A=20=20=20= %D%/packages/cross-base.scm=09=09=09\=0A=20=20=20%D%/packages/crypto.scm=09= =09=09\=0A=20=20=20%D%/packages/cryptsetup.scm=09=09=09\=0Adiff=20--git=20= a/gnu/packages/crates-io.scm=20b/gnu/packages/crates-io.scm=0Anew=20file=20= mode=20100644=0Aindex=200000000000..533fe0d21e=0A---=20/dev/null=0A+++=20= b/gnu/packages/crates-io.scm=0A@@=20-0,0=20+1,45=20@@=0A+;;;=20GNU=20= Guix=20---=20Functional=20package=20management=20for=20GNU=0A+;;;=20= Copyright=20=C2=A9=202019=20Ivan=20Petkov=20=0A= +;;;=0A+;;;=20This=20file=20is=20part=20of=20GNU=20Guix.=0A+;;;=0A+;;;=20= GNU=20Guix=20is=20free=20software;=20you=20can=20redistribute=20it=20= and/or=20modify=20it=0A+;;;=20under=20the=20terms=20of=20the=20GNU=20= General=20Public=20License=20as=20published=20by=0A+;;;=20the=20Free=20= Software=20Foundation;=20either=20version=203=20of=20the=20License,=20or=20= (at=0A+;;;=20your=20option)=20any=20later=20version.=0A+;;;=0A+;;;=20GNU=20= Guix=20is=20distributed=20in=20the=20hope=20that=20it=20will=20be=20= useful,=20but=0A+;;;=20WITHOUT=20ANY=20WARRANTY;=20without=20even=20the=20= implied=20warranty=20of=0A+;;;=20MERCHANTABILITY=20or=20FITNESS=20FOR=20= A=20PARTICULAR=20PURPOSE.=20=20See=20the=0A+;;;=20GNU=20General=20Public=20= License=20for=20more=20details.=0A+;;;=0A+;;;=20You=20should=20have=20= received=20a=20copy=20of=20the=20GNU=20General=20Public=20License=0A+;;;=20= along=20with=20GNU=20Guix.=20=20If=20not,=20see=20= .=0A+=0A+(define-module=20(gnu=20packages=20= crates-io)=0A+=20=20#:use-module=20(guix=20build-system=20cargo)=0A+=20=20= #:use-module=20(guix=20download)=0A+=20=20#:use-module=20((guix=20= licenses)=20#:prefix=20license:)=0A+=20=20#:use-module=20(guix=20= packages))=0A+=0A+(define-public=20rust-unicode-xid=0A+=20=20(package=0A= +=20=20=20=20(name=20"rust-unicode-xid")=0A+=20=20=20=20(version=20= "0.1.0")=0A+=20=20=20=20(source=0A+=20=20=20=20=20=20(origin=0A+=20=20=20= =20=20=20=20=20(method=20url-fetch)=0A+=20=20=20=20=20=20=20=20(uri=20= (crate-uri=20"unicode-xid"=20version))=0A+=20=20=20=20=20=20=20=20= (file-name=0A+=20=20=20=20=20=20=20=20=20=20(string-append=20name=20"-"=20= version=20".tar.gz"))=0A+=20=20=20=20=20=20=20=20(sha256=0A+=20=20=20=20=20= =20=20=20=20=20(base32=0A+=20=20=20=20=20=20=20=20=20=20=20=20= "1z57lqh4s18rr4x0j4fw4fmp9hf9346h0kmdgqsqx0fhjr3k0wpw"))))=0A+=20=20=20=20= (build-system=20cargo-build-system)=0A+=20=20=20=20(home-page=0A+=20=20=20= =20=20=20"https://github.com/unicode-rs/unicode-xid")=0A+=20=20=20=20= (synopsis=20"Determine=20Unicode=20XID=20related=20properties")=0A+=20=20= =20=20(description=20"Determine=20whether=20characters=20have=20the=20= XID_Start=0A+or=20XID_Continue=20properties=20according=20to=20Unicode=20= Standard=20Annex=20#31.")=0A+=20=20=20=20;;=20Dual=20licensed.=0A+=20=20=20= =20(license=20(list=20license:asl2.0=20license:expat))))=0A--=20=0A= 2.21.0=0A=0A= --Apple-Mail=_2C46378E-E9AF-4521-97B6-762564BE25C7 Content-Disposition: attachment; filename=0003-gnu-crate-Add-proc-macro2-and-quote.patch Content-Type: application/octet-stream; x-unix-mode=0644; name="0003-gnu-crate-Add-proc-macro2-and-quote.patch" Content-Transfer-Encoding: quoted-printable =46rom=201cff79e586664fd76bb7eb97fe5228986b32d8b4=20Mon=20Sep=2017=20= 00:00:00=202001=0AFrom:=20Ivan=20Petkov=20=0A= Date:=20Tue,=2016=20Apr=202019=2003:42:27=20-0700=0ASubject:=20[PATCH=20= 3/3]=20gnu:=20crate:=20Add=20proc-macro2=20and=20quote=0A=0A*=20= gnu/packages/crates-io.scm:=20(rust-proc-macro2):=20New=20variable.=0A= (rust-quote):=20New=20variable.=0A---=0A=20gnu/packages/crates-io.scm=20= |=2048=20++++++++++++++++++++++++++++++++++++++=0A=201=20file=20changed,=20= 48=20insertions(+)=0A=0Adiff=20--git=20a/gnu/packages/crates-io.scm=20= b/gnu/packages/crates-io.scm=0Aindex=20533fe0d21e..90e08731ea=20100644=0A= ---=20a/gnu/packages/crates-io.scm=0A+++=20b/gnu/packages/crates-io.scm=0A= @@=20-43,3=20+43,51=20@@=0A=20or=20XID_Continue=20properties=20according=20= to=20Unicode=20Standard=20Annex=20#31.")=0A=20=20=20=20=20;;=20Dual=20= licensed.=0A=20=20=20=20=20(license=20(list=20license:asl2.0=20= license:expat))))=0A+=0A+(define-public=20rust-proc-macro2=0A+=20=20= (package=0A+=20=20=20=20(name=20"rust-proc-macro2")=0A+=20=20=20=20= (version=20"0.4.27")=0A+=20=20=20=20(source=0A+=20=20=20=20=20=20(origin=0A= +=20=20=20=20=20=20=20=20(method=20url-fetch)=0A+=20=20=20=20=20=20=20=20= (uri=20(crate-uri=20"proc-macro2"=20version))=0A+=20=20=20=20=20=20=20=20= (file-name=0A+=20=20=20=20=20=20=20=20=20=20(string-append=20name=20"-"=20= version=20".tar.gz"))=0A+=20=20=20=20=20=20=20=20(sha256=0A+=20=20=20=20=20= =20=20=20=20=20(base32=0A+=20=20=20=20=20=20=20=20=20=20=20=20= "05c92v787snyaq4ss16vxc9mdv6zndfgsdq8k3hnnyffmsf7ycad"))))=0A+=20=20=20=20= (build-system=20cargo-build-system)=0A+=20=20=20=20(native-inputs=0A+=20=20= =20=20=20=20`(("rust-quote"=20,rust-quote=20"src")))=0A+=20=20=20=20= (inputs=0A+=20=20=20=20=20=20`(("rust-unicode-xid"=20,rust-unicode-xid=20= "src")))=0A+=20=20=20=20(home-page=20= "https://github.com/alexcrichton/proc-macro2")=0A+=20=20=20=20(synopsis=20= "Stable=20implementation=20of=20the=20upcoming=20new=20`proc_macro`=20= API")=0A+=20=20=20=20(description=20"This=20package=20provides=20a=20= stable=20implementation=20of=20the=20upcoming=20new=0A+`proc_macro`=20= API.=20=20Comes=20with=20an=20option,=20off=20by=20default,=20to=20also=20= reimplement=20itself=0A+in=20terms=20of=20the=20upstream=20unstable=20= API.")=0A+=20=20=20=20;;=20Dual=20licensed.=0A+=20=20=20=20(license=20= (list=20license:asl2.0=20license:expat))))=0A+=0A+(define-public=20= rust-quote=0A+=20=20(package=0A+=20=20=20=20(name=20"rust-quote")=0A+=20=20= =20=20(version=20"0.6.12")=0A+=20=20=20=20(source=0A+=20=20=20=20=20=20= (origin=0A+=20=20=20=20=20=20=20=20(method=20url-fetch)=0A+=20=20=20=20=20= =20=20=20(uri=20(crate-uri=20"quote"=20version))=0A+=20=20=20=20=20=20=20= =20(file-name=0A+=20=20=20=20=20=20=20=20=20=20(string-append=20name=20= "-"=20version=20".tar.gz"))=0A+=20=20=20=20=20=20=20=20(sha256=0A+=20=20=20= =20=20=20=20=20=20=20(base32=0A+=20=20=20=20=20=20=20=20=20=20=20=20= "1nw0klza45hf127kfyrpxsxd5jw2l6h21qxalil3hkr7bnf7kx7s"))))=0A+=20=20=20=20= (build-system=20cargo-build-system)=0A+=20=20=20=20(inputs=0A+=20=20=20=20= =20=20`(("rust-proc-macro2"=20,rust-proc-macro2=20"src")))=0A+=20=20=20=20= (home-page=20"https://github.com/dtolnay/quote")=0A+=20=20=20=20= (synopsis=20"Quasi-quoting=20macro=20quote!(...)")=0A+=20=20=20=20= (description=20"Quasi-quoting=20macro=20quote!(...)")=0A+=20=20=20=20;;=20= Dual=20licensed.=0A+=20=20=20=20(license=20(list=20license:asl2.0=20= license:expat))))=0A--=20=0A2.21.0=0A=0A= --Apple-Mail=_2C46378E-E9AF-4521-97B6-762564BE25C7-- From unknown Fri Jun 13 10:26:49 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#35318] [PATCH] Update cargo-build-system to expand package inputs Resent-From: Ivan Petkov Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Wed, 15 May 2019 06:09:04 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 35318 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 35318@debbugs.gnu.org Cc: Danny Milosavljevic , Ludovic =?UTF-8?Q?Court=C3=A8s?= , Chris Marusich Received: via spool by 35318-submit@debbugs.gnu.org id=B35318.155790049925192 (code B ref 35318); Wed, 15 May 2019 06:09:04 +0000 Received: (at 35318) by debbugs.gnu.org; 15 May 2019 06:08:19 +0000 Received: from localhost ([127.0.0.1]:50796 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hQn5P-0006YG-EV for submit@debbugs.gnu.org; Wed, 15 May 2019 02:08:19 -0400 Received: from mail-pg1-f193.google.com ([209.85.215.193]:36155) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hQn5N-0006Y3-Ra for 35318@debbugs.gnu.org; Wed, 15 May 2019 02:08:18 -0400 Received: by mail-pg1-f193.google.com with SMTP id a3so807851pgb.3 for <35318@debbugs.gnu.org>; Tue, 14 May 2019 23:08:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=p7y/GfGK/5qDeelByb3jSwnPkY2G/wN5X96NWoxx7g0=; b=PhvOj7nkVY4+xy7smAwWC6V0SVT8VuPeHiFgi1iqkLLw2iAC8DOvzmCYsIU5cl14Ev oEzABmc4OXYIFqRDdT4v6DHhG+8j4PurTWXhsTCJpBsVjC/dGawI/egbjsySiouJ5h79 3psQjLiJEw6yvfoS+RirhobzvjFZrizX2s38udjbbj4aIkWybsX/17XShlvX0eXqJzzu dda6sgC/RLK/WQN6/TRJnw8sUclVHeat9doNA1G4eN7PM9s/ykxWp4LN4BamRS2Wt06Q PYiKDwyK/HoNWpDu2pEvlDvlwY3o5SIIMg4WERUUMLBQ3vrlW0a4xPb4QuNjys/Td2Cn xikQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=p7y/GfGK/5qDeelByb3jSwnPkY2G/wN5X96NWoxx7g0=; b=VS/mOrhBGncXsTiXktN5X7wrvGFhtcjSegcdcc7SxKkJ17p/zrplnqZ8/bahedUA6K oNeAOFrNFpvz8OeLx4MKxNr+xKI5aTKQcjgizxoov/Pc8NmEY+rqWX4Vdo6cWHY5CMzn eIUnk8yIJPoK0R7Kor86e5LgOnXCIrHFpAk3x+hNEWQydUerTFanFehhvC7fh7CGBHpx Nhe1NTzFP32t2PaObNxNyiSjVwlj2POX3i7KKAyMyA+dHQuYQrjb1731BkggqLZOj2l4 2MhL9tKQZ/RKyKgBH+3KWgEi5frhpbJRbJE9jM0s/Pe/ozfiIjnYMcGJsvSGSNNHSh1b jUFg== X-Gm-Message-State: APjAAAU9HIwmAidKuoOwFlWYsLqx8pSRxu33zntHdxOOP0x27Gz2J0uV z0Nv+CDd7sJ4eb4aJoIQV+sRP6QO X-Google-Smtp-Source: APXvYqyWLe3a2ORChBjuUaDFP/7fVKEzVhU6/9Iq3PSPg9JtgQ+zMbazmk9grpVLFUyAp7k7SoPStw== X-Received: by 2002:a63:ee0a:: with SMTP id e10mr28952097pgi.28.1557900491646; Tue, 14 May 2019 23:08:11 -0700 (PDT) Received: from [10.0.1.14] (c-73-109-7-225.hsd1.wa.comcast.net. [73.109.7.225]) by smtp.gmail.com with ESMTPSA id x4sm1242849pfm.19.2019.05.14.23.08.10 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 14 May 2019 23:08:11 -0700 (PDT) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 11.5 \(3445.9.1\)) From: Ivan Petkov In-Reply-To: <074E4899-C4FF-4A76-8E97-093378D2F8D5@gmail.com> Date: Tue, 14 May 2019 23:08:06 -0700 Content-Transfer-Encoding: quoted-printable Message-Id: References: <87ftpsnhal.fsf@gnu.org> <2C03880B-F90E-4949-9637-DC918B6D40A0@gmail.com> <074E4899-C4FF-4A76-8E97-093378D2F8D5@gmail.com> X-Mailer: Apple Mail (2.3445.9.1) X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Hi everyone, Chris and I had a very productive discussion around this patch series = this evening. We discussed an alternative approach to allowing the = cargo-build-system to capture all transitive Rust crate sources without changing the = established semantics around Guix inputs and native-inputs. The short summary is introducing crates as new arguments in the package definition. These arguments will be expanded to include the sources of = any transitive sources when lowered to a derivation, while preserving any other Guix inputs/native-inputs the package may wish to include. I'll be sending an updated patch series here once I get a chance to work = on this, and I=E2=80=99ll elaborate on the solution with more specifics = then! Thanks, --Ivan= From unknown Fri Jun 13 10:26:49 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#35318] [PATCH] Update cargo-build-system to expand package inputs Resent-From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Wed, 15 May 2019 12:45:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 35318 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Ivan Petkov Cc: Danny Milosavljevic , 35318@debbugs.gnu.org, Chris Marusich Received: via spool by 35318-submit@debbugs.gnu.org id=B35318.155792428029722 (code B ref 35318); Wed, 15 May 2019 12:45:02 +0000 Received: (at 35318) by debbugs.gnu.org; 15 May 2019 12:44:40 +0000 Received: from localhost ([127.0.0.1]:51443 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hQtGy-0007jK-4a for submit@debbugs.gnu.org; Wed, 15 May 2019 08:44:40 -0400 Received: from eggs.gnu.org ([209.51.188.92]:48958) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hQtGw-0007j8-J9 for 35318@debbugs.gnu.org; Wed, 15 May 2019 08:44:38 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:55679) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hQtGr-0008Qx-6I; Wed, 15 May 2019 08:44:33 -0400 Received: from [2a01:e0a:1d:7270:af76:b9b:ca24:c465] (port=42024 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1hQtGq-00029o-M6; Wed, 15 May 2019 08:44:32 -0400 From: Ludovic =?UTF-8?Q?Court=C3=A8s?= References: <87ftpsnhal.fsf@gnu.org> <2C03880B-F90E-4949-9637-DC918B6D40A0@gmail.com> <074E4899-C4FF-4A76-8E97-093378D2F8D5@gmail.com> X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: 26 =?UTF-8?Q?Flor=C3=A9al?= an 227 de la =?UTF-8?Q?R=C3=A9volution?= X-PGP-Key-ID: 0x090B11993D9AEBB5 X-PGP-Key: http://www.fdn.fr/~lcourtes/ludovic.asc X-PGP-Fingerprint: 3CE4 6455 8A84 FDC6 9DB4 0CFB 090B 1199 3D9A EBB5 X-OS: x86_64-pc-linux-gnu Date: Wed, 15 May 2019 14:44:29 +0200 In-Reply-To: (Ivan Petkov's message of "Tue, 14 May 2019 23:08:06 -0700") Message-ID: <87pnojvqdu.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Hello! Ivan Petkov skribis: > Chris and I had a very productive discussion around this patch series this > evening. We discussed an alternative approach to allowing the cargo-build= -system > to capture all transitive Rust crate sources without changing the establi= shed > semantics around Guix inputs and native-inputs. > > The short summary is introducing crates as new arguments in the package > definition. These arguments will be expanded to include the sources of any > transitive sources when lowered to a derivation, while preserving any > other Guix inputs/native-inputs the package may wish to include. > > I'll be sending an updated patch series here once I get a chance to work = on > this, and I=E2=80=99ll elaborate on the solution with more specifics then! OK, sounds good, thanks for the update! And sorry for not being more responsive. Ludo=E2=80=99. From unknown Fri Jun 13 10:26:49 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#35318] [PATCH] Update cargo-build-system to expand package inputs Resent-From: Ivan Petkov Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 20 May 2019 01:01:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 35318 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Ludovic =?UTF-8?Q?Court=C3=A8s?= Cc: Danny Milosavljevic , 35318@debbugs.gnu.org, Chris Marusich Received: via spool by 35318-submit@debbugs.gnu.org id=B35318.155831401317451 (code B ref 35318); Mon, 20 May 2019 01:01:01 +0000 Received: (at 35318) by debbugs.gnu.org; 20 May 2019 01:00:13 +0000 Received: from localhost ([127.0.0.1]:35790 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hSWey-0004XL-D1 for submit@debbugs.gnu.org; Sun, 19 May 2019 21:00:12 -0400 Received: from mail-pf1-f194.google.com ([209.85.210.194]:46003) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hSWev-0004WA-U1 for 35318@debbugs.gnu.org; Sun, 19 May 2019 21:00:10 -0400 Received: by mail-pf1-f194.google.com with SMTP id s11so6325573pfm.12 for <35318@debbugs.gnu.org>; Sun, 19 May 2019 18:00:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:subject:from:in-reply-to:date:cc:message-id:references :to; bh=hrWGieOrm+XP3Ikd9D/rk8ShFMqV3FQMy2EIKc5taBk=; b=FZCTgxVhiDkG2LMOLqgHvUnhXn9/DyGY07alCZ7qdFZawiRf8Zg/6T4wEu2He7OK5m xXixfOTIwJ81cSY8S24rDE+FOdo+6TKQL5NotTZO2DgtmoybOiuLj9Cq3ibJ/+uc1OlK qNeaG9kGg0LfIq9ZKcc+RfUC1Tje5wlWpPqhJkUOa000O4vIB1QXiq1QVevZtDhaZSAg kpz+Yu/leTk8LpA0dg3Qi1JWoUGl1J62zhIH0Jk02Do4uLnDPFIhKAJq33xKwRfB0Zbh CBssI2KYxIzGbRT1OczfWw6SL5kpU2u+p4eChgZOUXV3uKaLJnRWI6N/k4vybSzS6BrM kFKQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:subject:from:in-reply-to:date:cc :message-id:references:to; bh=hrWGieOrm+XP3Ikd9D/rk8ShFMqV3FQMy2EIKc5taBk=; b=aXOGwxvaa8TB8ROGpdT70+VSkFeHs0imtqUd1WQlqw4yDWxqnvwsan/WN600BklO+H YPY1iMKkEST0AFIiuxQypoqqlC4HFu5ogfi3iySipQXs14qP6VNLRy80AylVNE7X5oSI VMeKaZ5PWSq+1YViZ/XDnr9FY1K7yvfvy8MStGYTQxGuSM9jrhG+Bc6FhFX0mamt4vc6 OxYaI1Z5BjuBy0Ibfo/oz7EaTC998dc6M3/+jwu/y0JloJlDkYB3e84BGLnIqglS2k5+ 8yj4kdp1H28XrI4siMOt13O8GcrFKCLt9127o/TiPsZaGT0wPf1X6UsZiaDfId3u9uJV XmAw== X-Gm-Message-State: APjAAAWHXV8NZzdZuz//DCjd+4uyfFcMm9ckbZzJZEG+ZEyir+IyW3yt IBOqeHgFOJZzow3taFHXjsY= X-Google-Smtp-Source: APXvYqx2BgWE0dQH9VwL0+Ep/p0XgRw6MgdpWm1sSIC4WPD8cYIXinCT6OHhU8HkVjDt5sFx2z/pNw== X-Received: by 2002:a65:6255:: with SMTP id q21mr61350044pgv.211.1558314003962; Sun, 19 May 2019 18:00:03 -0700 (PDT) Received: from ?IPv6:2601:602:9a00:1784:dc44:c1ef:970b:c0aa? ([2601:602:9a00:1784:dc44:c1ef:970b:c0aa]) by smtp.gmail.com with ESMTPSA id u11sm17296510pfh.130.2019.05.19.18.00.02 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 19 May 2019 18:00:02 -0700 (PDT) Content-Type: multipart/mixed; boundary="Apple-Mail=_2DFDD9DC-E612-49E6-88BC-209092ADBD5A" Mime-Version: 1.0 (Mac OS X Mail 11.5 \(3445.9.1\)) From: Ivan Petkov In-Reply-To: <87pnojvqdu.fsf@gnu.org> Date: Sun, 19 May 2019 18:00:01 -0700 Message-Id: <6A0A0108-A722-4D73-85B7-E61AB8230026@gmail.com> References: <87ftpsnhal.fsf@gnu.org> <2C03880B-F90E-4949-9637-DC918B6D40A0@gmail.com> <074E4899-C4FF-4A76-8E97-093378D2F8D5@gmail.com> <87pnojvqdu.fsf@gnu.org> X-Mailer: Apple Mail (2.3445.9.1) X-Spam-Score: -0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) --Apple-Mail=_2DFDD9DC-E612-49E6-88BC-209092ADBD5A Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 Hi everyone! I=E2=80=99ve updated this patch series. The cargo-build-system will now = expect any crate dependencies to be listed as arguments. Specifically, regular = cargo dependencies should be specified via the #:cargo-deps parameter, and any = cargo dev-dependnecies should be specified via the #:cargo-dev-deps parameter. The cargo-build-system will traverse any inputs specified in those = parameters, and any inputs they may have in their #:cargo-deps parameter as well, extracting their package sources and adding them as native-inputs to the current bag being built. This avoids having to define new semantics for = package inputs/native-inputs for expanding all transitive sources. There are several implications of this decision: * Building a package definition does not require actually = building/checking any dependent crates. This can be a benefits: - For example, sometimes a crate may have an optional dependency on = some OS specific package which cannot be built or run on the current system. = This approach means that the build will not fail if cargo ends up internally = ignoring the dependency. - It avoids waiting for quadratic builds from source: cargo always = builds dependencies within the current workspace. This is largely due to Rust = not having a stable ABI and other resolutions that cargo applies. This = means that if we have a depencency chain of X -> Y -> Z and we build each = definition independently the following will happen: * Cargo will build and test crate Z * Cargo will build crate Z in Y's workspace, then build and test Y * Cargo will build crates Y and Z in X's workspace, then build and = test X * But there are also some downsides with this approach: - If a dependent crate is subtly broken on the system (i.e. it builds = but its tests fail) the consuming crates may build and test successfully but actually fail during normal usage (however, the CI will still build = all packages which will give visibility in case packages suddenly break). - Because crates aren't declared as regular inputs, other Guix = facilities such as tracking package graphs may not work by default (however, this = is something that can always be extended or reworked in the future). Please let me know if anything is unclear, I=E2=80=99m happy to = elaborate if needed! Thanks, =E2=80=94Ivan --Apple-Mail=_2DFDD9DC-E612-49E6-88BC-209092ADBD5A Content-Disposition: attachment; filename=0001-build-system-cargo-expand-transitive-crate-sources.patch Content-Type: application/octet-stream; x-unix-mode=0644; name="0001-build-system-cargo-expand-transitive-crate-sources.patch" Content-Transfer-Encoding: quoted-printable =46rom=205457f60036ce1354b4b89b9c3c423cca14e3a777=20Mon=20Sep=2017=20= 00:00:00=202001=0AFrom:=20Ivan=20Petkov=20=0A= Date:=20Tue,=2016=20Apr=202019=2003:37:44=20-0700=0ASubject:=20[PATCH=20= 1/8]=20build-system/cargo:=20expand=20transitive=20crate=20sources=0A=0A= *=20guix/build/cargo:=20(package-cargo-deps):=20Add=20it.=0A= (package-cargo-dev-deps):=20Add=20it.=0A(cargo-transitive-deps):=20Add=20= it.=0A(expand-crate-sources):=20Add=20it.=0A(lower):=20New=20cargo-deps=20= nd=20cargo-dev-deps=20keywords.=0AUse=20expand-crate-sources.=0A= (private-keywords):=20Add=20new=20keywords.=0A---=0A=20= guix/build-system/cargo.scm=20|=20115=20= +++++++++++++++++++++++++++++++++++-=0A=201=20file=20changed,=20114=20= insertions(+),=201=20deletion(-)=0A=0Adiff=20--git=20= a/guix/build-system/cargo.scm=20b/guix/build-system/cargo.scm=0Aindex=20= dc137421e9..c1bfd13b2f=20100644=0A---=20a/guix/build-system/cargo.scm=0A= +++=20b/guix/build-system/cargo.scm=0A@@=20-29,6=20+29,8=20@@=0A=20=20=20= #:use-module=20(guix=20build-system)=0A=20=20=20#:use-module=20(guix=20= build-system=20gnu)=0A=20=20=20#:use-module=20(ice-9=20match)=0A+=20=20= #:use-module=20(ice-9=20vlist)=0A+=20=20#:use-module=20(srfi=20srfi-1)=0A= =20=20=20#:use-module=20(srfi=20srfi-26)=0A=20=20=20#:export=20= (%cargo-build-system-modules=0A=20=20=20=20=20=20=20=20=20=20=20=20=20= %cargo-utils-modules=0A@@=20-121,15=20+123,125=20@@=20to=20NAME=20and=20= VERSION."=0A=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20#:outputs=20(cons=20"src"=20outputs)=0A= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20#:guile-for-build=20guile-for-build))=0A=20=0A= +(define=20(package-cargo-deps=20p)=0A+=20=20(apply=0A+=20=20=20=20= (lambda*=20(#:key=20(cargo-deps=20'())=20#:allow-other-keys)=0A+=20=20=20= =20=20=20cargo-deps)=0A+=20=20=20=20(package-arguments=20p)))=0A+=0A= +(define=20(package-cargo-dev-deps=20p)=0A+=20=20(apply=0A+=20=20=20=20= (lambda*=20(#:key=20(cargo-dev-deps=20'())=20#:allow-other-keys)=0A+=20=20= =20=20=20=20cargo-dev-deps)=0A+=20=20=20=20(package-arguments=20p)))=0A+=0A= +(define=20(crate-transitive-deps=20inputs)=0A+=20=20"Return=20the=20= closure=20of=20INPUTS=20when=20considering=20the=20'cargo-deps'=20and=0A= +'cargod-dev-deps'=20edges.=20=20Omit=20duplicate=20inputs,=20except=20= for=20those=0A+already=20present=20in=20INPUTS=20itself.=0A+=0A+This=20= is=20implemented=20as=20a=20breadth-first=20traversal=20such=20that=20= INPUTS=20is=0A+preserved,=20and=20only=20duplicate=20extracted=20inputs=20= are=20removed.=0A+=0A+Forked=20from=20((guix=20packages)=20= transitive-inputs)=20since=20this=20extraction=0A+uses=20slightly=20= different=20rules=20compared=20to=20the=20rest=20of=20Guix=20(i.e.=20we=0A= +do=20not=20extract=20the=20conventional=20inputs)."=0A+=20=20(define=20= (seen?=20seen=20item)=0A+=20=20=20=20;;=20FIXME:=20We're=20using=20= pointer=20identity=20here,=20which=20is=20extremely=20sensitive=0A+=20=20= =20=20;;=20to=20memoization=20in=20package-producing=20procedures;=20see=0A= +=20=20=20=20;;=20.=0A+=20=20=20=20= (vhash-assq=20item=20seen))=0A+=0A+=20=20(let=20loop=20((inputs=20=20=20=20= =20inputs)=0A+=20=20=20=20=20=20=20=20=20=20=20=20=20(result=20=20=20=20=20= '())=0A+=20=20=20=20=20=20=20=20=20=20=20=20=20(propagated=20'())=0A+=20=20= =20=20=20=20=20=20=20=20=20=20=20(first?=20=20=20=20=20#t)=0A+=20=20=20=20= =20=20=20=20=20=20=20=20=20(seen=20=20=20=20=20=20=20vlist-null))=0A+=20=20= =20=20(match=20inputs=0A+=20=20=20=20=20=20(()=0A+=20=20=20=20=20=20=20= (if=20(null?=20propagated)=0A+=20=20=20=20=20=20=20=20=20=20=20(reverse=20= result)=0A+=20=20=20=20=20=20=20=20=20=20=20(loop=20(reverse=20= (concatenate=20propagated))=20result=20'()=20#f=20seen)))=0A+=20=20=20=20= =20=20(((and=20input=20(label=20(?=20package?=20package)))=20rest=20...)=0A= +=20=20=20=20=20=20=20(if=20(and=20(not=20first?)=20(seen?=20seen=20= package))=0A+=20=20=20=20=20=20=20=20=20=20=20(loop=20rest=20result=20= propagated=20first?=20seen)=0A+=20=20=20=20=20=20=20=20=20=20=20(loop=20= rest=0A+=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20(cons=20input=20= result)=0A+=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20(cons=20= (package-cargo-deps=20package)=0A+=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20propagated)=0A+=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20first?=0A+=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20(vhash-consq=20package=20package=20seen))))=0A+=20=20=20=20=20=20= ((input=20rest=20...)=0A+=20=20=20=20=20=20=20(loop=20rest=20(cons=20= input=20result)=20propagated=20first?=20seen)))))=0A+=0A+(define=20= (expand-crate-sources=20cargo-deps=20cargo-dev-deps)=0A+=20=20"Extract=20= all=20transitive=20sources=20for=20CARGO-DEPS=20and=20CARGO-DEV-DEPS=20= along=20their=0A+'cargo-deps'=20edges.=0A+=0A+Cargo=20requires=20all=20= transitive=20crate=20dependencies'=20sources=20to=20be=20available=0A+in=20= its=20index,=20even=20if=20they=20are=20optional=20(this=20is=20so=20it=20= can=20generate=0A+deterministic=20Cargo.lock=20files=20regardless=20of=20= the=20target=20platform=20or=20enabled=0A+features).=20Thus=20we=20need=20= all=20transitive=20crate=20dependencies=20for=20any=20cargo=0A= +dev-dependencies,=20but=20this=20is=20only=20needed=20when=20= building/testing=20a=20crate=20directly=0A+(i.e.=20we=20will=20never=20= need=20transitive=20dev-dependencies=20for=20any=20dependency=20crates).=0A= +=0A+Another=20complication=20arises=20due=20potential=20dependency=20= cycles=20from=20Guix's=0A+perspective:=20Although=20cargo=20does=20not=20= permit=20cyclic=20dependencies=20between=20crates,=0A+however,=20it=20= permits=20cycles=20to=20occur=20via=20dev-dependencies.=20For=20example,=20= if=20crate=0A+X=20depends=20on=20crate=20Y,=20crate=20Y's=20tests=20= could=20pull=20in=20crate=20X=20to=20to=20verify=0A+everything=20builds=20= properly=20(this=20is=20a=20rare=20scenario,=20but=20it=20it=20happens=20= for=0A+example=20with=20the=20`proc-macro2`=20and=20`quote`=20crates).=20= This=20is=20allowed=20by=20cargo=0A+because=20tests=20are=20built=20as=20= a=20pseudo-crate=20which=20happens=20to=20depend=20on=20the=0A+X=20and=20= Y=20crates,=20forming=20an=20acyclic=20graph.=0A+=0A+We=20can=20side=20= step=20this=20problem=20by=20only=20considering=20regular=20cargo=20= dependencies=0A+since=20they=20are=20guaranteed=20to=20not=20have=20= cycles.=20We=20can=20further=20resolve=20any=0A+potential=20= dev-dependency=20cycles=20by=20extracting=20package=20sources=20(which=20= never=20have=0A+any=20dependencies=20and=20thus=20no=20cycles=20can=20= exist).=0A+=0A+There=20are=20several=20implications=20of=20this=20= decision:=0A+*=20Building=20a=20package=20definition=20does=20not=20= require=20actually=20building/checking=0A+any=20dependent=20crates.=20= This=20can=20be=20a=20benefits:=0A+=20-=20For=20example,=20sometimes=20a=20= crate=20may=20have=20an=20optional=20dependency=20on=20some=20OS=0A+=20= specific=20package=20which=20cannot=20be=20built=20or=20run=20on=20the=20= current=20system.=20This=0A+=20approach=20means=20that=20the=20build=20= will=20not=20fail=20if=20cargo=20ends=20up=20internally=20ignoring=0A+=20= the=20dependency.=0A+=20-=20It=20avoids=20waiting=20for=20quadratic=20= builds=20from=20source:=20cargo=20always=20builds=0A+=20dependencies=20= within=20the=20current=20workspace.=20This=20is=20largely=20due=20to=20= Rust=20not=0A+=20having=20a=20stable=20ABI=20and=20other=20resolutions=20= that=20cargo=20applies.=20This=20means=20that=0A+=20if=20we=20have=20a=20= depencency=20chain=20of=20X=20->=20Y=20->=20Z=20and=20we=20build=20each=20= definition=0A+=20independently=20the=20following=20will=20happen:=0A+=20=20= *=20Cargo=20will=20build=20and=20test=20crate=20Z=0A+=20=20*=20Cargo=20= will=20build=20crate=20Z=20in=20Y's=20workspace,=20then=20build=20and=20= test=20Y=0A+=20=20*=20Cargo=20will=20build=20crates=20Y=20and=20Z=20in=20= X's=20workspace,=20then=20build=20and=20test=20X=0A+*=20But=20there=20= are=20also=20some=20downsides=20with=20this=20approach:=0A+=20=20-=20If=20= a=20dependent=20crate=20is=20subtly=20broken=20on=20the=20system=20(i.e.=20= it=20builds=20but=20its=0A+=20=20tests=20fail)=20the=20consuming=20= crates=20may=20build=20and=20test=20successfully=20but=0A+=20=20actually=20= fail=20during=20normal=20usage=20(however,=20the=20CI=20will=20still=20= build=20all=0A+=20=20packages=20which=20will=20give=20visibility=20in=20= case=20packages=20suddenly=20break).=0A+=20=20-=20Because=20crates=20= aren't=20declared=20as=20regular=20inputs,=20other=20Guix=20facilities=0A= +=20=20such=20as=20tracking=20package=20graphs=20may=20not=20work=20by=20= default=20(however,=20this=20is=0A+=20=20something=20that=20can=20always=20= be=20extended=20or=20reworked=20in=20the=20future)."=0A+=20=20= (filter-map=0A+=20=20=20=20(match-lambda=0A+=20=20=20=20=20=20((label=20= (?=20package?=20p))=0A+=20=20=20=20=20=20=20(list=20label=20= (package-source=20p)))=0A+=20=20=20=20=20=20((label=20input)=0A+=20=20=20= =20=20=20=20(list=20label=20input)))=0A+=20=20=20=20= (crate-transitive-deps=20(append=20cargo-deps=20cargo-dev-deps))))=0A+=0A= =20(define*=20(lower=20name=0A=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20#:key=20source=20inputs=20native-inputs=20outputs=20system=20= target=0A=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20(rust=20= (default-rust))=0A+=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= (cargo-deps=20'())=0A+=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= (cargo-dev-deps=20'())=0A=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20#:allow-other-keys=0A=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= #:rest=20arguments)=0A=20=20=20"Return=20a=20bag=20for=20NAME."=0A=20=0A=20= =20=20(define=20private-keywords=0A-=20=20=20=20'(#:source=20#:target=20= #:rust=20#:inputs=20#:native-inputs=20#:outputs))=0A+=20=20=20=20= '(#:source=20#:target=20#:rust=20#:inputs=20#:native-inputs=20#:outputs=0A= +=20=20=20=20=20=20#:cargo-deps=20#:cargo-dev-deps))=0A=20=0A=20=20=20= (and=20(not=20target)=20;;=20TODO:=20support=20cross-compilation=0A=20=20= =20=20=20=20=20=20(bag=0A@@=20-145,6=20+257,7=20@@=20to=20NAME=20and=20= VERSION."=0A=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20,@(standard-packages)))=0A=20=20=20=20=20=20=20=20=20=20= (build-inputs=20`(("cargo"=20,rust=20"cargo")=0A=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20("rustc"=20,rust)=0A+=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= ,@(expand-crate-sources=20cargo-deps=20cargo-dev-deps)=0A=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= ,@native-inputs))=0A=20=20=20=20=20=20=20=20=20=20(outputs=20outputs)=0A=20= =20=20=20=20=20=20=20=20=20(build=20cargo-build)=0A--=20=0A2.21.0=0A=0A= --Apple-Mail=_2DFDD9DC-E612-49E6-88BC-209092ADBD5A Content-Disposition: attachment; filename=0002-build-system-cargo-use-sources-from-package-sources.patch Content-Type: application/octet-stream; x-unix-mode=0644; name="0002-build-system-cargo-use-sources-from-package-sources.patch" Content-Transfer-Encoding: quoted-printable =46rom=203aa329c44b7ebff26dd98276ab268ee120cf9bba=20Mon=20Sep=2017=20= 00:00:00=202001=0AFrom:=20Ivan=20Petkov=20=0A= Date:=20Thu,=2016=20May=202019=2023:02:12=20-0700=0ASubject:=20[PATCH=20= 2/8]=20build-system/cargo:=20use=20sources=20from=20package=20sources=0A=0A= *=20guix/build/cargo-build-system:=20(configure):=20Expand=20crate=20= tarballs=20in=0Avendor=20directory.=0A---=0A=20= guix/build/cargo-build-system.scm=20|=2019=20+++++++++++++------=0A=201=20= file=20changed,=2013=20insertions(+),=206=20deletions(-)=0A=0Adiff=20= --git=20a/guix/build/cargo-build-system.scm=20= b/guix/build/cargo-build-system.scm=0Aindex=209f44bd6ee9..44ad9744ce=20= 100644=0A---=20a/guix/build/cargo-build-system.scm=0A+++=20= b/guix/build/cargo-build-system.scm=0A@@=20-67,14=20+67,21=20@@=0A=20=20=20= (for-each=0A=20=20=20=20=20(match-lambda=0A=20=20=20=20=20=20=20((name=20= .=20path)=0A-=20=20=20=20=20=20=20(let*=20((rust-share=20(string-append=20= path=20"/share/rust-source"))=0A-=20=20=20=20=20=20=20=20=20=20=20=20=20=20= (basepath=20(basename=20path))=0A-=20=20=20=20=20=20=20=20=20=20=20=20=20= =20(link-dir=20(string-append=20vendor-dir=20"/"=20basepath)))=0A-=20=20=20= =20=20=20=20=20=20(and=20(file-exists?=20rust-share)=0A+=20=20=20=20=20=20= =20(let*=20((basepath=20(basename=20path))=0A+=20=20=20=20=20=20=20=20=20= =20=20=20=20=20(crate-dir=20(string-append=20vendor-dir=20"/"=20= basepath)))=0A+=20=20=20=20=20=20=20=20=20(and=20(string-suffix?=20= ".crate"=20path)=0A=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20;;=20= Gracefully=20handle=20duplicate=20inputs=0A-=20=20=20=20=20=20=20=20=20=20= =20=20=20=20(not=20(file-exists?=20link-dir))=0A-=20=20=20=20=20=20=20=20= =20=20=20=20=20=20(symlink=20rust-share=20link-dir)))))=0A+=20=20=20=20=20= =20=20=20=20=20=20=20=20=20(not=20(file-exists?=20crate-dir))=0A+=20=20=20= =20=20=20=20=20=20=20=20=20=20=20(mkdir-p=20crate-dir)=0A+=20=20=20=20=20= =20=20=20=20=20=20=20=20=20;;=20Cargo=20crates=20are=20simply=20gzipped=20= tarballs=20but=20with=20a=20.crate=0A+=20=20=20=20=20=20=20=20=20=20=20=20= =20=20;;=20extension.=20We=20expand=20the=20source=20to=20a=20directory=20= name=20we=20control=0A+=20=20=20=20=20=20=20=20=20=20=20=20=20=20;;=20so=20= that=20we=20can=20generate=20any=20cargo=20checksums.=0A+=20=20=20=20=20=20= =20=20=20=20=20=20=20=20;;=20The=20--strip-components=20argument=20is=20= needed=20to=20prevent=20creating=0A+=20=20=20=20=20=20=20=20=20=20=20=20=20= =20;;=20an=20extra=20directory=20within=20`crate-dir`.=0A+=20=20=20=20=20= =20=20=20=20=20=20=20=20=20(invoke=20"tar"=20"xvf"=20path=20"-C"=20= crate-dir=20"--strip-components"=20"1")=0A+=20=20=20=20=20=20=20=20=20=20= =20=20=20=20(generate-checksums=20crate-dir=20"/dev/null")))))=0A=20=20=20= =20=20inputs)=0A+=0A=20=20=20;;=20Configure=20cargo=20to=20actually=20= use=20this=20new=20directory.=0A=20=20=20(mkdir-p=20".cargo")=0A=20=20=20= (let=20((port=20(open-file=20".cargo/config"=20"w"=20#:encoding=20= "utf-8")))=0A--=20=0A2.21.0=0A=0A= --Apple-Mail=_2DFDD9DC-E612-49E6-88BC-209092ADBD5A Content-Disposition: attachment; filename=0003-build-system-cargo-don-t-copy-source-as-an-output.patch Content-Type: application/octet-stream; x-unix-mode=0644; name="0003-build-system-cargo-don-t-copy-source-as-an-output.patch" Content-Transfer-Encoding: quoted-printable =46rom=205615665eafdc3a543e0eb4ec1ed84f7c38475446=20Mon=20Sep=2017=20= 00:00:00=202001=0AFrom:=20Ivan=20Petkov=20=0A= Date:=20Thu,=2016=20May=202019=2023:05:50=20-0700=0ASubject:=20[PATCH=20= 3/8]=20build-system/cargo:=20don't=20copy=20source=20as=20an=20output=0A=0A= *=20guix/build-system/cargo:=20= (cargo-build)[build-expression->derivation]:=0ADon't=20add=20"src"=20= output.=0A*=20guix/build/cargo-build-system:=20(install-source):=20= Delete=20it.=0A(%standard-phases):=20Delete=20'install-source.=0A---=0A=20= guix/build-system/cargo.scm=20=20=20=20=20=20=20|=20=202=20+-=0A=20= guix/build/cargo-build-system.scm=20|=2021=20+--------------------=0A=20= 2=20files=20changed,=202=20insertions(+),=2021=20deletions(-)=0A=0Adiff=20= --git=20a/guix/build-system/cargo.scm=20b/guix/build-system/cargo.scm=0A= index=20c1bfd13b2f..fb24ea9892=20100644=0A---=20= a/guix/build-system/cargo.scm=0A+++=20b/guix/build-system/cargo.scm=0A@@=20= -120,7=20+120,7=20@@=20to=20NAME=20and=20VERSION."=0A=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20#:inputs=20inputs=0A=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20#:system=20system=0A=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20#:modules=20imported-modules=0A-=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= #:outputs=20(cons=20"src"=20outputs)=0A+=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20#:outputs=20= outputs=0A=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20#:guile-for-build=20= guile-for-build))=0A=20=0A=20(define=20(package-cargo-deps=20p)=0Adiff=20= --git=20a/guix/build/cargo-build-system.scm=20= b/guix/build/cargo-build-system.scm=0Aindex=2044ad9744ce..26d474c9b5=20= 100644=0A---=20a/guix/build/cargo-build-system.scm=0A+++=20= b/guix/build/cargo-build-system.scm=0A@@=20-79,7=20+79,7=20@@=0A=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20;;=20The=20--strip-components=20= argument=20is=20needed=20to=20prevent=20creating=0A=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20;;=20an=20extra=20directory=20within=20`crate-dir`.=0A= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20(invoke=20"tar"=20"xvf"=20= path=20"-C"=20crate-dir=20"--strip-components"=20"1")=0A-=20=20=20=20=20=20= =20=20=20=20=20=20=20=20(generate-checksums=20crate-dir=20= "/dev/null")))))=0A+=20=20=20=20=20=20=20=20=20=20=20=20=20=20= (generate-checksums=20crate-dir)))))=0A=20=20=20=20=20inputs)=0A=20=0A=20= =20=20;;=20Configure=20cargo=20to=20actually=20use=20this=20new=20= directory.=0A@@=20-124,24=20+124,6=20@@=20directory=20=3D=20'"=20port)=0A= =20(define=20(touch=20file-name)=0A=20=20=20(call-with-output-file=20= file-name=20(const=20#t)))=0A=20=0A-(define*=20(install-source=20#:key=20= inputs=20outputs=20#:allow-other-keys)=0A-=20=20"Install=20the=20source=20= for=20a=20given=20Cargo=20package."=0A-=20=20(let*=20((out=20(assoc-ref=20= outputs=20"out"))=0A-=20=20=20=20=20=20=20=20=20(src=20(assoc-ref=20= inputs=20"source"))=0A-=20=20=20=20=20=20=20=20=20(rsrc=20(string-append=20= (assoc-ref=20outputs=20"src")=0A-=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20"/share/rust-source")))=0A= -=20=20=20=20(mkdir-p=20rsrc)=0A-=20=20=20=20;;=20Rust=20doesn't=20have=20= a=20stable=20ABI=20yet.=20Because=20of=20this=0A-=20=20=20=20;;=20Cargo=20= doesn't=20have=20a=20search=20path=20for=20binaries=20yet.=0A-=20=20=20=20= ;;=20Until=20this=20changes=20we=20are=20working=20around=20this=20by=0A= -=20=20=20=20;;=20vendoring=20the=20crates'=20sources=20by=20symlinking=20= them=0A-=20=20=20=20;;=20to=20store=20paths.=0A-=20=20=20=20= (copy-recursively=20"."=20rsrc)=0A-=20=20=20=20(touch=20(string-append=20= rsrc=20"/.cargo-ok"))=0A-=20=20=20=20(generate-checksums=20rsrc)=0A-=20=20= =20=20(install-file=20"Cargo.toml"=20rsrc)=0A-=20=20=20=20#t))=0A-=0A=20= (define*=20(install=20#:key=20inputs=20outputs=20skip-build?=20= #:allow-other-keys)=0A=20=20=20"Install=20a=20given=20Cargo=20package."=0A= =20=20=20(let*=20((out=20(assoc-ref=20outputs=20"out")))=0A@@=20-163,7=20= +145,6=20@@=20directory=20=3D=20'"=20port)=0A=20(define=20= %standard-phases=0A=20=20=20(modify-phases=20gnu:%standard-phases=0A=20=20= =20=20=20(delete=20'bootstrap)=0A-=20=20=20=20(add-before=20'configure=20= 'install-source=20install-source)=0A=20=20=20=20=20(replace=20'configure=20= configure)=0A=20=20=20=20=20(replace=20'build=20build)=0A=20=20=20=20=20= (replace=20'check=20check)=0A--=20=0A2.21.0=0A=0A= --Apple-Mail=_2DFDD9DC-E612-49E6-88BC-209092ADBD5A Content-Disposition: attachment; filename=0004-doc-Update-cargo-build-system-parameter-docs.patch Content-Type: application/octet-stream; x-unix-mode=0644; name="0004-doc-Update-cargo-build-system-parameter-docs.patch" Content-Transfer-Encoding: quoted-printable =46rom=20e79254d9ca054dcc5c03d5e54a5206e0793ab3e7=20Mon=20Sep=2017=20= 00:00:00=202001=0AFrom:=20Ivan=20Petkov=20=0A= Date:=20Fri,=2017=20May=202019=2009:07:54=20-0700=0ASubject:=20[PATCH=20= 4/8]=20doc:=20Update=20cargo-build-system=20parameter=20docs=0A=0A*=20= doc/guix.texi:=20(Build=20Systems)[cargo-build-system]:=20Add=20= references=20to=0Athe=20#:rust,=20#:cargo-deps,=20and=20#:cargo-dev-deps=20= parameters.=0ARemove=20reference=20to=20installing=20crate=20sources.=0A= ---=0A=20doc/guix.texi=20|=2018=20++++++++++++++----=0A=201=20file=20= changed,=2014=20insertions(+),=204=20deletions(-)=0A=0Adiff=20--git=20= a/doc/guix.texi=20b/doc/guix.texi=0Aindex=20ae9ad0739e..8683a5f4ed=20= 100644=0A---=20a/doc/guix.texi=0A+++=20b/doc/guix.texi=0A@@=20-5780,10=20= +5780,20=20@@=20This=20variable=20is=20exported=20by=20@code{(guix=20= build-system=20cargo)}.=20=20It=0A=20supports=20builds=20of=20packages=20= using=20Cargo,=20the=20build=20tool=20of=20the=0A=20= @uref{https://www.rust-lang.org,=20Rust=20programming=20language}.=0A=20=0A= -In=20its=20@code{configure}=20phase,=20this=20build=20system=20replaces=20= dependencies=0A-specified=20in=20the=20@file{Cargo.toml}=20file=20with=20= inputs=20to=20the=20Guix=20package.=0A-The=20@code{install}=20phase=20= installs=20the=20binaries,=20and=20it=20also=20installs=20the=0A-source=20= code=20and=20@file{Cargo.toml}=20file.=0A+It=20adds=20@code{rustc}=20and=20= @code{cargo}=20to=20the=20set=20of=20inputs.=0A+A=20different=20Rust=20= package=20can=20be=20specified=20with=20the=20@code{#:rust}=20parameter.=0A= +=0A+Regular=20cargo=20dependencies=20should=20be=20added=20to=20the=20= package=20definition=20via=0A+the=20@code{#:cargo-deps}=20parameter=20as=20= a=20list=20of=20name=20and=20spec=20pairs,=20where=20the=0A+spec=20can=20= be=20a=20package=20or=20a=20source=20definition.=20Note=20that=20the=20= spec=20must=20evaluate=0A+to=20a=20path=20to=20a=20gzipped=20tarball=20= with=20the=20@code{.crate}=20extension,=20or=20it=20will=20be=0A= +ignored.=20Similarly,=20cargo=20dev-dependencies=20should=20be=20added=20= to=20the=20package=0A+definition=20via=20the=20@code{#:cargo-dev-deps}=20= parameter.=0A+=0A+In=20its=20@code{configure}=20phase,=20this=20build=20= system=20will=20make=20any=20source=20inputs=0A+specified=20in=20the=20= @code{#:cargo-deps}=20and=20@code{#:cargo-dev-deps}=20parameters=0A= +available=20to=20cargo.=20The=20@code{install}=20phase=20installs=20any=20= crate=20the=20binaries=0A+if=20they=20are=20defined=20by=20the=20crate.=0A= =20@end=20defvr=0A=20=0A=20@cindex=20Clojure=20(programming=20language)=0A= --=20=0A2.21.0=0A=0A= --Apple-Mail=_2DFDD9DC-E612-49E6-88BC-209092ADBD5A Content-Disposition: attachment; filename=0005-import-crate-import-sources-with-.crate-extension.patch Content-Type: application/octet-stream; x-unix-mode=0644; name="0005-import-crate-import-sources-with-.crate-extension.patch" Content-Transfer-Encoding: quoted-printable =46rom=20d802ae3164c6724fd831b847c468046bc32d332d=20Mon=20Sep=2017=20= 00:00:00=202001=0AFrom:=20Ivan=20Petkov=20=0A= Date:=20Fri,=2017=20May=202019=2000:25:06=20-0700=0ASubject:=20[PATCH=20= 5/8]=20import:=20crate:=20import=20sources=20with=20.crate=20extension=0A= =0A*=20guix/import/crate.scm:=20(make-crate-sexp)[file-name]:=20Use=20= .crate=20extension.=0A---=0A=20guix/import/crate.scm=20|=202=20+-=0A=201=20= file=20changed,=201=20insertion(+),=201=20deletion(-)=0A=0Adiff=20--git=20= a/guix/import/crate.scm=20b/guix/import/crate.scm=0Aindex=20= e0b400d054..24d3a7d961=20100644=0A---=20a/guix/import/crate.scm=0A+++=20= b/guix/import/crate.scm=0A@@=20-94,7=20+94,7=20@@=20VERSION,=20INPUTS,=20= NATIVE-INPUTS,=20HOME-PAGE,=20SYNOPSIS,=20DESCRIPTION,=20and=20LICENSE."=0A= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20(source=20= (origin=0A=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20(method=20url-fetch)=0A=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20(uri=20= (crate-uri=20,name=20version))=0A-=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20(file-name=20= (string-append=20name=20"-"=20version=20".tar.gz"))=0A+=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= (file-name=20(string-append=20name=20"-"=20version=20".crate"))=0A=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20(sha256=0A=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20(base32=0A=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= ,(bytevector->nix-base32-string=20(port-sha256=20port))))))=0A--=20=0A= 2.21.0=0A=0A= --Apple-Mail=_2DFDD9DC-E612-49E6-88BC-209092ADBD5A Content-Disposition: attachment; filename=0006-import-crate-define-dependencies-as-arguments.patch Content-Type: application/octet-stream; x-unix-mode=0644; name="0006-import-crate-define-dependencies-as-arguments.patch" Content-Transfer-Encoding: quoted-printable =46rom=20c81535f09c78c8008f285ab05b127a7e68b6f00b=20Mon=20Sep=2017=20= 00:00:00=202001=0AFrom:=20Ivan=20Petkov=20=0A= Date:=20Fri,=2017=20May=202019=2000:26:07=20-0700=0ASubject:=20[PATCH=20= 6/8]=20import:=20crate:=20define=20dependencies=20as=20arguments=0A=0A*=20= guix/import/crate.scm:=0A(crate-fetch)[input-crates]:=20Rename=20to=20= dev-crates.=0A[native-input-crates]:=20Rename=20to=20dev-dep-crates.=0A= [inputs]:=20Rename=20to=20cargo-deps.=0A[native-inputs]:=20Rename=20to=20= cargo-dev-deps.=0A(maybe-cargo-deps):=20Add=20it.=0A= (maybe-cargo-dev-deps):=20Add=20it.=0A(maybe-arguments):=20Add=20it.=0A= (make-crate-sexp):=20Use=20new=20procedures.=0A[inputs]:=20Rename=20to=20= cargo-deps.=0A[native-inputs]:=20Rename=20to=20cargo-dev-deps.=0A*=20= guix/import/utils.scm:=20(package-names->package-inputs):=20Make=20= public.=0AAdd=20doc=20string.=0A---=0A=20guix/import/crate.scm=20|=2043=20= ++++++++++++++++++++++++++++++++-----------=0A=20guix/import/utils.scm=20= |=20=204=20++++=0A=202=20files=20changed,=2036=20insertions(+),=2011=20= deletions(-)=0A=0Adiff=20--git=20a/guix/import/crate.scm=20= b/guix/import/crate.scm=0Aindex=2024d3a7d961..0ed683298b=20100644=0A---=20= a/guix/import/crate.scm=0A+++=20b/guix/import/crate.scm=0A@@=20-65,29=20= +65,50=20@@=0A=20=20=20=20=20=20=20=20=20=20=20=20=20=20(path=20= (string-append=20"/"=20version=20"/dependencies"))=0A=20=20=20=20=20=20=20= =20=20=20=20=20=20=20(deps-json=20(json-fetch-alist=20(string-append=20= crate-url=20name=20path)))=0A=20=20=20=20=20=20=20=20=20=20=20=20=20=20= (deps=20(assoc-ref=20deps-json=20"dependencies"))=0A-=20=20=20=20=20=20=20= =20=20=20=20=20=20(input-crates=20(filter=20(crate-kind-predicate=20= "normal")=20deps))=0A-=20=20=20=20=20=20=20=20=20=20=20=20=20= (native-input-crates=0A+=20=20=20=20=20=20=20=20=20=20=20=20=20= (dep-crates=20(filter=20(crate-kind-predicate=20"normal")=20deps))=0A+=20= =20=20=20=20=20=20=20=20=20=20=20=20(dev-dep-crates=0A=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20(filter=20(lambda=20(dep)=0A=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20(not=20= ((crate-kind-predicate=20"normal")=20dep)))=20deps))=0A-=20=20=20=20=20=20= =20=20=20=20=20=20=20(inputs=20(crates->inputs=20input-crates))=0A-=20=20= =20=20=20=20=20=20=20=20=20=20=20(native-inputs=20(crates->inputs=20= native-input-crates))=0A+=20=20=20=20=20=20=20=20=20=20=20=20=20= (cargo-deps=20(crates->inputs=20dep-crates))=0A+=20=20=20=20=20=20=20=20=20= =20=20=20=20(cargo-dev-deps=20(crates->inputs=20dev-dep-crates))=0A=20=20= =20=20=20=20=20=20=20=20=20=20=20=20(home-page=20(match=20homepage=0A=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= (()=20repository)=0A=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20(_=20homepage))))=0A=20=20=20=20=20(callback=20= #:name=20name=20#:version=20version=0A-=20=20=20=20=20=20=20=20=20=20=20=20= =20=20#:inputs=20inputs=20#:native-inputs=20native-inputs=0A+=20=20=20=20= =20=20=20=20=20=20=20=20=20=20#:cargo-deps=20cargo-deps=20= #:cargo-dev-deps=20cargo-dev-deps=0A=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20#:home-page=20home-page=20#:synopsis=20synopsis=0A=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20#:description=20description=20#:license=20= license)))=0A=20=0A-(define*=20(make-crate-sexp=20#:key=20name=20version=20= inputs=20native-inputs=0A+(define=20(maybe-cargo-deps=20package-names)=0A= +=20=20(match=20(package-names->package-inputs=20package-names)=0A+=20=20= =20=20(()=0A+=20=20=20=20=20'())=0A+=20=20=20=20((package-inputs=20...)=0A= +=20=20=20=20=20`((#:cargo-deps=20,package-inputs)))))=0A+=0A+(define=20= (maybe-cargo-dev-deps=20package-names)=0A+=20=20(match=20= (package-names->package-inputs=20package-names)=0A+=20=20=20=20(()=0A+=20= =20=20=20=20'())=0A+=20=20=20=20((package-inputs=20...)=0A+=20=20=20=20=20= `((#:cargo-dev-deps=20,package-inputs)))))=0A+=0A+(define=20= (maybe-arguments=20arguments)=0A+=20=20(match=20arguments=0A+=20=20=20=20= (()=0A+=20=20=20=20=20'())=0A+=20=20=20=20((args=20...)=0A+=20=20=20=20=20= `((arguments=20(,'quasiquote=20,args))))))=0A+=0A+(define*=20= (make-crate-sexp=20#:key=20name=20version=20cargo-deps=20cargo-dev-deps=0A= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20home-page=20synopsis=20description=20license=0A=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= #:allow-other-keys)=0A=20=20=20"Return=20the=20`package'=20s-expression=20= for=20a=20rust=20package=20with=20the=20given=20NAME,=0A-VERSION,=20= INPUTS,=20NATIVE-INPUTS,=20HOME-PAGE,=20SYNOPSIS,=20DESCRIPTION,=20and=20= LICENSE."=0A+VERSION,=20CARGO-DEPS,=20CARGO-DEV-DEPS,=20HOME-PAGE,=20= SYNOPSIS,=20DESCRIPTION,=20and=20LICENSE."=0A=20=20=20(let*=20((port=20= (http-fetch=20(crate-uri=20name=20version)))=0A=20=20=20=20=20=20=20=20=20= =20(guix-name=20(crate-name->package-name=20name))=0A-=20=20=20=20=20=20=20= =20=20(inputs=20(map=20crate-name->package-name=20inputs))=0A-=20=20=20=20= =20=20=20=20=20(native-inputs=20(map=20crate-name->package-name=20= native-inputs))=0A+=20=20=20=20=20=20=20=20=20(cargo-deps=20(map=20= crate-name->package-name=20cargo-deps))=0A+=20=20=20=20=20=20=20=20=20= (cargo-dev-deps=20(map=20crate-name->package-name=20cargo-dev-deps))=0A=20= =20=20=20=20=20=20=20=20=20(pkg=20`(package=0A=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20(name=20,guix-name)=0A=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20(version=20,version)=0A@@=20= -99,8=20+120,8=20@@=20VERSION,=20INPUTS,=20NATIVE-INPUTS,=20HOME-PAGE,=20= SYNOPSIS,=20DESCRIPTION,=20and=20LICENSE."=0A=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20(base32=0A= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20,(bytevector->nix-base32-string=20(port-sha256=20= port))))))=0A=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= (build-system=20cargo-build-system)=0A-=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20,@(maybe-native-inputs=20native-inputs=20"src")=0A-=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20,@(maybe-inputs=20= inputs=20"src")=0A+=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20,@(maybe-arguments=20(append=20(maybe-cargo-deps=20cargo-deps)=0A+=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= (maybe-cargo-dev-deps=20cargo-dev-deps)))=0A=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20(home-page=20,(match=20home-page=0A=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20(()=20"")=0A=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20(_=20= home-page)))=0Adiff=20--git=20a/guix/import/utils.scm=20= b/guix/import/utils.scm=0Aindex=20516c0cfaa2..33cb9bbc36=20100644=0A---=20= a/guix/import/utils.scm=0A+++=20b/guix/import/utils.scm=0A@@=20-51,6=20= +51,7=20@@=0A=20=20=20=20=20=20=20=20=20=20=20=20=20url-fetch=0A=20=20=20= =20=20=20=20=20=20=20=20=20=20guix-hash-url=0A=20=0A+=20=20=20=20=20=20=20= =20=20=20=20=20package-names->package-inputs=0A=20=20=20=20=20=20=20=20=20= =20=20=20=20maybe-inputs=0A=20=20=20=20=20=20=20=20=20=20=20=20=20= maybe-native-inputs=0A=20=20=20=20=20=20=20=20=20=20=20=20=20= package->definition=0A@@=20-235,6=20+236,9=20@@=20into=20a=20proper=20= sentence=20and=20by=20using=20two=20spaces=20between=20sentences."=0A=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20cleaned=20'pre=20".=20=20"=20'post)))=0A=20=0A=20(define*=20= (package-names->package-inputs=20names=20#:optional=20(output=20#f))=0A+=20= =20"Given=20a=20list=20of=20PACKAGE-NAMES,=20and=20an=20optional=20= OUTPUT,=20tries=20to=20generate=20a=0A+quoted=20list=20of=20inputs,=20as=20= suitable=20to=20use=20in=20an=20'inputs'=20field=20of=20a=20package=0A= +definition."=0A=20=20=20(map=20(lambda=20(input)=0A=20=20=20=20=20=20=20= =20=20=20(cons*=20input=20(list=20'unquote=20(string->symbol=20input))=0A= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20(or=20(and=20output=20(list=20output))=0A--=20=0A2.21.0=0A=0A= --Apple-Mail=_2DFDD9DC-E612-49E6-88BC-209092ADBD5A Content-Disposition: attachment; filename=0007-gnu-crate-add-unicode-xid.patch Content-Type: application/octet-stream; x-unix-mode=0644; name="0007-gnu-crate-add-unicode-xid.patch" Content-Transfer-Encoding: quoted-printable =46rom=20990ec0caa1d8f86750fc183e85e4b7bae9dc5106=20Mon=20Sep=2017=20= 00:00:00=202001=0AFrom:=20Ivan=20Petkov=20=0A= Date:=20Tue,=2016=20Apr=202019=2003:40:14=20-0700=0ASubject:=20[PATCH=20= 7/8]=20gnu:=20crate:=20add=20unicode-xid=0A=0Agnu/local.mk:=20= (GNU_SYSTEM_MODULES):=20Add=20new=20file.=0Agnu/packages/crates-io.scm:=20= (rust-unicode-xid):=20New=20variable.=0A---=0A=20gnu/local.mk=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20|=20=201=20+=0A=20= gnu/packages/crates-io.scm=20|=2045=20= ++++++++++++++++++++++++++++++++++++++=0A=202=20files=20changed,=2046=20= insertions(+)=0A=20create=20mode=20100644=20gnu/packages/crates-io.scm=0A= =0Adiff=20--git=20a/gnu/local.mk=20b/gnu/local.mk=0Aindex=20= 694bbfd367..bfa66e0840=20100644=0A---=20a/gnu/local.mk=0A+++=20= b/gnu/local.mk=0A@@=20-121,6=20+121,7=20@@=20GNU_SYSTEM_MODULES=20=3D=09=09= =09=09\=0A=20=20=20%D%/packages/cpp.scm=20=09=09=09=09\=0A=20=20=20= %D%/packages/cppi.scm=09=09=09=09\=0A=20=20=20%D%/packages/cran.scm=09=09= =09=09\=0A+=20=20%D%/packages/crates-io.scm=09=09=09\=0A=20=20=20= %D%/packages/cross-base.scm=09=09=09\=0A=20=20=20%D%/packages/crypto.scm=09= =09=09\=0A=20=20=20%D%/packages/cryptsetup.scm=09=09=09\=0Adiff=20--git=20= a/gnu/packages/crates-io.scm=20b/gnu/packages/crates-io.scm=0Anew=20file=20= mode=20100644=0Aindex=200000000000..1440edef9b=0A---=20/dev/null=0A+++=20= b/gnu/packages/crates-io.scm=0A@@=20-0,0=20+1,45=20@@=0A+;;;=20GNU=20= Guix=20---=20Functional=20package=20management=20for=20GNU=0A+;;;=20= Copyright=20=C2=A9=202019=20Ivan=20Petkov=20=0A= +;;;=0A+;;;=20This=20file=20is=20part=20of=20GNU=20Guix.=0A+;;;=0A+;;;=20= GNU=20Guix=20is=20free=20software;=20you=20can=20redistribute=20it=20= and/or=20modify=20it=0A+;;;=20under=20the=20terms=20of=20the=20GNU=20= General=20Public=20License=20as=20published=20by=0A+;;;=20the=20Free=20= Software=20Foundation;=20either=20version=203=20of=20the=20License,=20or=20= (at=0A+;;;=20your=20option)=20any=20later=20version.=0A+;;;=0A+;;;=20GNU=20= Guix=20is=20distributed=20in=20the=20hope=20that=20it=20will=20be=20= useful,=20but=0A+;;;=20WITHOUT=20ANY=20WARRANTY;=20without=20even=20the=20= implied=20warranty=20of=0A+;;;=20MERCHANTABILITY=20or=20FITNESS=20FOR=20= A=20PARTICULAR=20PURPOSE.=20=20See=20the=0A+;;;=20GNU=20General=20Public=20= License=20for=20more=20details.=0A+;;;=0A+;;;=20You=20should=20have=20= received=20a=20copy=20of=20the=20GNU=20General=20Public=20License=0A+;;;=20= along=20with=20GNU=20Guix.=20=20If=20not,=20see=20= .=0A+=0A+(define-module=20(gnu=20packages=20= crates-io)=0A+=20=20#:use-module=20(guix=20build-system=20cargo)=0A+=20=20= #:use-module=20(guix=20download)=0A+=20=20#:use-module=20((guix=20= licenses)=20#:prefix=20license:)=0A+=20=20#:use-module=20(guix=20= packages))=0A+=0A+(define-public=20rust-unicode-xid=0A+=20=20(package=0A= +=20=20=20=20(name=20"rust-unicode-xid")=0A+=20=20=20=20(version=20= "0.1.0")=0A+=20=20=20=20(source=0A+=20=20=20=20=20=20(origin=0A+=20=20=20= =20=20=20=20=20(method=20url-fetch)=0A+=20=20=20=20=20=20=20=20(uri=20= (crate-uri=20"unicode-xid"=20version))=0A+=20=20=20=20=20=20=20=20= (file-name=0A+=20=20=20=20=20=20=20=20=20=20(string-append=20name=20"-"=20= version=20".crate"))=0A+=20=20=20=20=20=20=20=20(sha256=0A+=20=20=20=20=20= =20=20=20=20=20(base32=0A+=20=20=20=20=20=20=20=20=20=20=20=20= "1z57lqh4s18rr4x0j4fw4fmp9hf9346h0kmdgqsqx0fhjr3k0wpw"))))=0A+=20=20=20=20= (build-system=20cargo-build-system)=0A+=20=20=20=20(home-page=0A+=20=20=20= =20=20=20"https://github.com/unicode-rs/unicode-xid")=0A+=20=20=20=20= (synopsis=20"Determine=20Unicode=20XID=20related=20properties")=0A+=20=20= =20=20(description=20"Determine=20whether=20characters=20have=20the=20= XID_Start=0A+or=20XID_Continue=20properties=20according=20to=20Unicode=20= Standard=20Annex=20#31.")=0A+=20=20=20=20;;=20Dual=20licensed.=0A+=20=20=20= =20(license=20(list=20license:asl2.0=20license:expat))))=0A--=20=0A= 2.21.0=0A=0A= --Apple-Mail=_2DFDD9DC-E612-49E6-88BC-209092ADBD5A Content-Disposition: attachment; filename=0008-gnu-crate-Add-proc-macro2-and-quote.patch Content-Type: application/octet-stream; x-unix-mode=0644; name="0008-gnu-crate-Add-proc-macro2-and-quote.patch" Content-Transfer-Encoding: quoted-printable =46rom=20cc4008769de81015749e2af46612540dca05cea7=20Mon=20Sep=2017=20= 00:00:00=202001=0AFrom:=20Ivan=20Petkov=20=0A= Date:=20Tue,=2016=20Apr=202019=2003:42:27=20-0700=0ASubject:=20[PATCH=20= 8/8]=20gnu:=20crate:=20Add=20proc-macro2=20and=20quote=0A=0A*=20= gnu/packages/crates-io.scm:=20(rust-proc-macro2):=20New=20variable.=0A= (rust-quote):=20New=20variable.=0A---=0A=20gnu/packages/crates-io.scm=20= |=2047=20++++++++++++++++++++++++++++++++++++++=0A=201=20file=20changed,=20= 47=20insertions(+)=0A=0Adiff=20--git=20a/gnu/packages/crates-io.scm=20= b/gnu/packages/crates-io.scm=0Aindex=201440edef9b..a10128413a=20100644=0A= ---=20a/gnu/packages/crates-io.scm=0A+++=20b/gnu/packages/crates-io.scm=0A= @@=20-43,3=20+43,50=20@@=0A=20or=20XID_Continue=20properties=20according=20= to=20Unicode=20Standard=20Annex=20#31.")=0A=20=20=20=20=20;;=20Dual=20= licensed.=0A=20=20=20=20=20(license=20(list=20license:asl2.0=20= license:expat))))=0A+=0A+(define-public=20rust-proc-macro2=0A+=20=20= (package=0A+=20=20=20=20(name=20"rust-proc-macro2")=0A+=20=20=20=20= (version=20"0.4.27")=0A+=20=20=20=20(source=0A+=20=20=20=20=20=20(origin=0A= +=20=20=20=20=20=20=20=20(method=20url-fetch)=0A+=20=20=20=20=20=20=20=20= (uri=20(crate-uri=20"proc-macro2"=20version))=0A+=20=20=20=20=20=20=20=20= (file-name=0A+=20=20=20=20=20=20=20=20=20=20(string-append=20name=20"-"=20= version=20".crate"))=0A+=20=20=20=20=20=20=20=20(sha256=0A+=20=20=20=20=20= =20=20=20=20=20(base32=0A+=20=20=20=20=20=20=20=20=20=20=20=20= "05c92v787snyaq4ss16vxc9mdv6zndfgsdq8k3hnnyffmsf7ycad"))))=0A+=20=20=20=20= (build-system=20cargo-build-system)=0A+=20=20=20=20(arguments=0A+=20=20=20= =20=20=20`(#:cargo-deps=20(("rust-unicode-xid"=20,rust-unicode-xid))=0A+=20= =20=20=20=20=20=20=20#:cargo-dev-deps=20(("rust-quote"=20,rust-quote))))=0A= +=20=20=20=20(home-page=20"https://github.com/alexcrichton/proc-macro2")=0A= +=20=20=20=20(synopsis=20"Stable=20implementation=20of=20the=20upcoming=20= new=20`proc_macro`=20API")=0A+=20=20=20=20(description=20"This=20package=20= provides=20a=20stable=20implementation=20of=20the=20upcoming=20new=0A= +`proc_macro`=20API.=20=20Comes=20with=20an=20option,=20off=20by=20= default,=20to=20also=20reimplement=20itself=0A+in=20terms=20of=20the=20= upstream=20unstable=20API.")=0A+=20=20=20=20;;=20Dual=20licensed.=0A+=20=20= =20=20(license=20(list=20license:asl2.0=20license:expat))))=0A+=0A= +(define-public=20rust-quote=0A+=20=20(package=0A+=20=20=20=20(name=20= "rust-quote")=0A+=20=20=20=20(version=20"0.6.12")=0A+=20=20=20=20(source=0A= +=20=20=20=20=20=20(origin=0A+=20=20=20=20=20=20=20=20(method=20= url-fetch)=0A+=20=20=20=20=20=20=20=20(uri=20(crate-uri=20"quote"=20= version))=0A+=20=20=20=20=20=20=20=20(file-name=0A+=20=20=20=20=20=20=20=20= =20=20(string-append=20name=20"-"=20version=20".crate"))=0A+=20=20=20=20=20= =20=20=20(sha256=0A+=20=20=20=20=20=20=20=20=20=20(base32=0A+=20=20=20=20= =20=20=20=20=20=20=20=20= "1nw0klza45hf127kfyrpxsxd5jw2l6h21qxalil3hkr7bnf7kx7s"))))=0A+=20=20=20=20= (build-system=20cargo-build-system)=0A+=20=20=20=20(arguments=0A+=20=20=20= =20=20=20`(#:cargo-deps=20(("rust-proc-macro2"=20,rust-proc-macro2))))=0A= +=20=20=20=20(home-page=20"https://github.com/dtolnay/quote")=0A+=20=20=20= =20(synopsis=20"Quasi-quoting=20macro=20quote!(...)")=0A+=20=20=20=20= (description=20"Quasi-quoting=20macro=20quote!(...)")=0A+=20=20=20=20;;=20= Dual=20licensed.=0A+=20=20=20=20(license=20(list=20license:asl2.0=20= license:expat))))=0A--=20=0A2.21.0=0A=0A= --Apple-Mail=_2DFDD9DC-E612-49E6-88BC-209092ADBD5A-- From unknown Fri Jun 13 10:26:49 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#35318] [PATCH] Update cargo-build-system to expand package inputs Resent-From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 20 May 2019 19:39:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 35318 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Ivan Petkov Cc: Danny Milosavljevic , 35318@debbugs.gnu.org, Chris Marusich Received: via spool by 35318-submit@debbugs.gnu.org id=B35318.155838113029761 (code B ref 35318); Mon, 20 May 2019 19:39:02 +0000 Received: (at 35318) by debbugs.gnu.org; 20 May 2019 19:38:50 +0000 Received: from localhost ([127.0.0.1]:37978 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hSo7U-0007jt-1r for submit@debbugs.gnu.org; Mon, 20 May 2019 15:38:50 -0400 Received: from eggs.gnu.org ([209.51.188.92]:49243) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hSo7R-0007je-EX for 35318@debbugs.gnu.org; Mon, 20 May 2019 15:38:45 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:59112) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hSo7M-0000On-0o; Mon, 20 May 2019 15:38:40 -0400 Received: from [2a01:e0a:1d:7270:af76:b9b:ca24:c465] (port=57232 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1hSo7L-0003wW-DE; Mon, 20 May 2019 15:38:39 -0400 From: Ludovic =?UTF-8?Q?Court=C3=A8s?= References: <87ftpsnhal.fsf@gnu.org> <2C03880B-F90E-4949-9637-DC918B6D40A0@gmail.com> <074E4899-C4FF-4A76-8E97-093378D2F8D5@gmail.com> <87pnojvqdu.fsf@gnu.org> <6A0A0108-A722-4D73-85B7-E61AB8230026@gmail.com> X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: 1 Prairial an 227 de la =?UTF-8?Q?R=C3=A9volution?= X-PGP-Key-ID: 0x090B11993D9AEBB5 X-PGP-Key: http://www.fdn.fr/~lcourtes/ludovic.asc X-PGP-Fingerprint: 3CE4 6455 8A84 FDC6 9DB4 0CFB 090B 1199 3D9A EBB5 X-OS: x86_64-pc-linux-gnu Date: Mon, 20 May 2019 21:38:36 +0200 In-Reply-To: <6A0A0108-A722-4D73-85B7-E61AB8230026@gmail.com> (Ivan Petkov's message of "Sun, 19 May 2019 18:00:01 -0700") Message-ID: <87pnocq5kz.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Hi Ivan! Ivan Petkov skribis: > Please let me know if anything is unclear, I=E2=80=99m happy to elaborate= if needed! I=E2=80=99ll only comment superficially because I haven=E2=80=99t followed = the rest of the discussion and I know too little about Rust; hopefully Danny and Chris can provide feedback. > From 5457f60036ce1354b4b89b9c3c423cca14e3a777 Mon Sep 17 00:00:00 2001 > From: Ivan Petkov > Date: Tue, 16 Apr 2019 03:37:44 -0700 > Subject: [PATCH 1/8] build-system/cargo: expand transitive crate sources > > * guix/build/cargo: (package-cargo-deps): Add it. > (package-cargo-dev-deps): Add it. > (cargo-transitive-deps): Add it. > (expand-crate-sources): Add it. > (lower): New cargo-deps nd cargo-dev-deps keywords. > Use expand-crate-sources. > (private-keywords): Add new keywords. [...] > +(define (package-cargo-deps p) > + (apply > + (lambda* (#:key (cargo-deps '()) #:allow-other-keys) > + cargo-deps) > + (package-arguments p))) It=E2=80=99s surprising style. It seems redundant with the =E2=80=98inputs= =E2=80=99 field, but IIUC, the main difference here is that you can simply name dependencies, even if there=E2=80=99s no Guix package for it, right? > +(define (package-cargo-dev-deps p) > + (apply > + (lambda* (#:key (cargo-dev-deps '()) #:allow-other-keys) > + cargo-dev-deps) > + (package-arguments p))) As a rule of thumb, please avoid abbreviations in identifiers (info "(guix) Coding Style"). So that would be =E2=80=98package-development-dependencies=E2=80=99 or something like that. > +(define (crate-transitive-deps inputs) > + "Return the closure of INPUTS when considering the 'cargo-deps' and > +'cargod-dev-deps' edges. Omit duplicate inputs, except for those > +already present in INPUTS itself. > + > +This is implemented as a breadth-first traversal such that INPUTS is > +preserved, and only duplicate extracted inputs are removed. > + > +Forked from ((guix packages) transitive-inputs) since this extraction > +uses slightly different rules compared to the rest of Guix (i.e. we > +do not extract the conventional inputs)." Perhaps call it =E2=80=98crate-closure=E2=80=99? > +(define (expand-crate-sources cargo-deps cargo-dev-deps) > + "Extract all transitive sources for CARGO-DEPS and CARGO-DEV-DEPS alon= g their > +'cargo-deps' edges. Maybe s/cargo-deps/inputs/ and s/cargo-dev-deps/development-inputs/? I=E2=80=99d prefer to stick to the same terminology as in the rest of the c= ode if we=E2=80=99re talking about the same sort of input lists. That=E2=80=99s it. :-) Thank you for improving Rust support! Ludo=E2=80=99. From unknown Fri Jun 13 10:26:49 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#35318] [PATCH] Update cargo-build-system to expand package inputs Resent-From: Ivan Petkov Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Wed, 22 May 2019 02:49:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 35318 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Ludovic =?UTF-8?Q?Court=C3=A8s?= Cc: Danny Milosavljevic , 35318@debbugs.gnu.org, Chris Marusich Received: via spool by 35318-submit@debbugs.gnu.org id=B35318.155849331827000 (code B ref 35318); Wed, 22 May 2019 02:49:03 +0000 Received: (at 35318) by debbugs.gnu.org; 22 May 2019 02:48:38 +0000 Received: from localhost ([127.0.0.1]:41314 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hTHIz-00071Q-PB for submit@debbugs.gnu.org; Tue, 21 May 2019 22:48:38 -0400 Received: from mail-pl1-f195.google.com ([209.85.214.195]:35720) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hTHIx-000718-Mu for 35318@debbugs.gnu.org; Tue, 21 May 2019 22:48:36 -0400 Received: by mail-pl1-f195.google.com with SMTP id p1so314253plo.2 for <35318@debbugs.gnu.org>; Tue, 21 May 2019 19:48:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=fP2xMAqwsXWt5nachsOYWFBgDhlVpCNZdmr57fbPC+Q=; b=qEApDA9XiTj8pLmglN/TlpBZrouVrBGfHhfLVYH0RQTA4ulwbalB4ZxAzktm1kgQbd t6zIH/apc2YMOawr6aAFosQrQRH3j+FciDJJLEbn/8Nt03zusyMYwAENfVBNod2GTnLw RZOBxDv7fGV+tUO8J9OK/AIYdmCBBaVvAGUeie5D/v+pRQuD6Xa2DKFk8Z4OM5Ip7An6 hCqsF+lK25qZYU3caLKIaQruIlJQM/JuG4L1i1Xfg0a5gC2d25RqUlwy9QikicQSjQMn YtBYgN4+9J9Rt3FA6uIKUKnwZsoz3S45892+BY4HR1rnXsAQNxXEezq4C6KuI2IqZ0Uv jWjQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=fP2xMAqwsXWt5nachsOYWFBgDhlVpCNZdmr57fbPC+Q=; b=LfN1DDfoWVp+oY67X7iGCYFLFr8iuRVk85Dbq7hFoUytKqXMbIRmv+fWWbe74WjkUc fkYm2cN9UxZBJ7ata8klgz8slUDShGXFrjF056s5UTl50c/6Hv0cDRs2siZluySbZ8ii MnN/J1SPtdKMt9Fxcs1s6Vv34p+qqQyMKeWVUQFO7nUeMjPCselkiod9uDkORsdwFUGi bcmKslKHm4mW9yquCRqOIGtOZDWbmc355uOJ8LmgAJuU+CLYAXI7GWDeqTaIS2m4y+Z8 QCPHGmRRsQGOivJ4/6t74h8/BAPMJ8dESOq8uaDCh/hgtWnGCR0DoGhcs7EjzAUaIAaM tn4A== X-Gm-Message-State: APjAAAX7b8zRxeY4nqoCSskzalYna0fKVesVJZ2RDe4qBBDgaNe0tpze rlAMILnJywvQ81E3igtB4oE= X-Google-Smtp-Source: APXvYqx0iTE75atC98a3uTezL3B4zu4BwugETwe8ind/9QbhDtW3M3NVfSG/JZWvgzkGGk7ON5R68A== X-Received: by 2002:a17:902:ab97:: with SMTP id f23mr33101992plr.237.1558493309582; Tue, 21 May 2019 19:48:29 -0700 (PDT) Received: from ?IPv6:2601:602:9a00:1784:653a:a4c:7b98:cd13? ([2601:602:9a00:1784:653a:a4c:7b98:cd13]) by smtp.gmail.com with ESMTPSA id f186sm32088663pfb.5.2019.05.21.19.48.28 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 21 May 2019 19:48:28 -0700 (PDT) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 11.5 \(3445.9.1\)) From: Ivan Petkov In-Reply-To: <87pnocq5kz.fsf@gnu.org> Date: Tue, 21 May 2019 19:48:24 -0700 Content-Transfer-Encoding: quoted-printable Message-Id: <43DF2996-1DEA-40CD-92FC-B27433F63AE7@gmail.com> References: <87ftpsnhal.fsf@gnu.org> <2C03880B-F90E-4949-9637-DC918B6D40A0@gmail.com> <074E4899-C4FF-4A76-8E97-093378D2F8D5@gmail.com> <87pnojvqdu.fsf@gnu.org> <6A0A0108-A722-4D73-85B7-E61AB8230026@gmail.com> <87pnocq5kz.fsf@gnu.org> X-Mailer: Apple Mail (2.3445.9.1) X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Hi Ludo! > On May 20, 2019, at 12:38 PM, Ludovic Court=C3=A8s = wrote: >=20 >> +(define (package-cargo-deps p) >> + (apply >> + (lambda* (#:key (cargo-deps '()) #:allow-other-keys) >> + cargo-deps) >> + (package-arguments p))) >=20 > It=E2=80=99s surprising style. It seems redundant with the = =E2=80=98inputs=E2=80=99 field, but > IIUC, the main difference here is that you can simply name = dependencies, > even if there=E2=80=99s no Guix package for it, right? That=E2=80=99s one benefit, the other is that we=E2=80=99re defining our = own new semantics on the cargo-specific inputs here to be treated like propagated-inputs, = but without actually making the store install them when a Rust binary is = substituted. >> +(define (package-cargo-dev-deps p) >> + (apply >> + (lambda* (#:key (cargo-dev-deps '()) #:allow-other-keys) >> + cargo-dev-deps) >> + (package-arguments p))) >=20 > As a rule of thumb, please avoid abbreviations in identifiers (info > "(guix) Coding Style"). So that would be > =E2=80=98package-development-dependencies=E2=80=99 or something like = that. Thanks for the tip, I=E2=80=99ll update these names.=20 Since the actual cargo documentation actually refers to = =E2=80=9Cdev-dependencies=E2=80=9D do you think it=E2=80=99s better to use =E2=80=9Ccargo-dev-dependencies=E2= =80=9D (for consistency that Rust programmers might be used to), or stick with = =E2=80=9Ccargo-development-dependencies=E2=80=9D (for Guix consistencies)? >> +(define (crate-transitive-deps inputs) >> + "Return the closure of INPUTS when considering the 'cargo-deps' = and >> +'cargod-dev-deps' edges. Omit duplicate inputs, except for those >> +already present in INPUTS itself. >> + >> +This is implemented as a breadth-first traversal such that INPUTS is >> +preserved, and only duplicate extracted inputs are removed. >> + >> +Forked from ((guix packages) transitive-inputs) since this = extraction >> +uses slightly different rules compared to the rest of Guix (i.e. we >> +do not extract the conventional inputs)." >=20 > Perhaps call it =E2=80=98crate-closure=E2=80=99? Sure that works, I=E2=80=99ll rename this! >> +(define (expand-crate-sources cargo-deps cargo-dev-deps) >> + "Extract all transitive sources for CARGO-DEPS and CARGO-DEV-DEPS = along their >> +'cargo-deps' edges. >=20 > Maybe s/cargo-deps/inputs/ and s/cargo-dev-deps/development-inputs/? >=20 > I=E2=80=99d prefer to stick to the same terminology as in the rest of = the code > if we=E2=80=99re talking about the same sort of input lists. I can rename this as well. >=20 > That=E2=80=99s it. :-) >=20 > Thank you for improving Rust support! Happy to help :) =E2=80=94Ivan= From unknown Fri Jun 13 10:26:49 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#35318] [PATCH] Update cargo-build-system to expand package inputs Resent-From: Chris Marusich Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sat, 08 Jun 2019 18:46:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 35318 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Ivan Petkov Cc: Danny Milosavljevic , Ludovic =?UTF-8?Q?Court=C3=A8s?= , 35318@debbugs.gnu.org Received: via spool by 35318-submit@debbugs.gnu.org id=B35318.156001951317462 (code B ref 35318); Sat, 08 Jun 2019 18:46:02 +0000 Received: (at 35318) by debbugs.gnu.org; 8 Jun 2019 18:45:13 +0000 Received: from localhost ([127.0.0.1]:53709 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hZgL3-0004XX-23 for submit@debbugs.gnu.org; Sat, 08 Jun 2019 14:45:13 -0400 Received: from mail-pl1-f171.google.com ([209.85.214.171]:39937) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hZgL1-0004XM-CX for 35318@debbugs.gnu.org; Sat, 08 Jun 2019 14:45:12 -0400 Received: by mail-pl1-f171.google.com with SMTP id a93so2058487pla.7 for <35318@debbugs.gnu.org>; Sat, 08 Jun 2019 11:45:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=DR7SGz9H8UonGqFSC3xq+JFdlu2vW08AYN6hIJdMXU8=; b=orxEAlWpzhBDtzkjf3mPH9nCdOUuL1HBm99Nv/rV9/eFRJxKMmiS9up8gX/sIJfMUr PVQ3E2v5sUkFBrGPstjyJBLwsEu6JNngaB2Tlf37my20XTmq5DBo2D911Gxy1b+qWHcL CpW0VqGWlVMk/VhPzUynJZprymqSYPZuE/Rr0xvdjbXtYIXAmITpClX17V+/o+dVFN0U U1ZKdFyGxhmQBTmCQYeVcc7NnjEuAhDWQJYj+EaMky5Yp6pSaO6O//a5PdZwsbrPXWIh kAXQKNp1B7zvNu2t5baRZHmbZgC1/1a6q7IBIgnJenW0kzvs8HCbRLhFdWwM3Ji0fBHH xIlA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version; bh=DR7SGz9H8UonGqFSC3xq+JFdlu2vW08AYN6hIJdMXU8=; b=RR8vtjaAv9HzPjjGS5jwqz75gH2PojWWHrIMyrwqXUKJy9CWajxkTepVmxm9u2tVuz BepU7Cae5SOl0XbHqSXq0RUNZpEdmnsHGkZKWRUiPuwDdGD0/maLEuPhxB2hNK3YI7lT T5VGS0uNYkluExaaCuTLJRTkGMzEptdx35lOHATrXfSVGnpddmfeQkitctRmuBOHD8IE v2ugeR1ydwyk0o9CxnlToMlqGsmSK7GPXRX+h1saW6niAr0QnlxpAQ+WMdjlMpofo2Fp uyr9HWjtRo3J2VgAQBuyzt2iWQgPGDpvIRtGt/mZnv9kuDXQJOTJd7GVM4BUi+L2q7s5 tu3w== X-Gm-Message-State: APjAAAU/e207OisrU41Cl/2Qm8O/9W7qcMJnUiR2pfY8s/fYRHYl4LLI +b54mLIb8CCIAdC+4NTS7Y532kfHjH0= X-Google-Smtp-Source: APXvYqy9bEUKtAs/oLRyOpn1Ea3wxusSxH2waEppFy3y3hHx2vQ3ht8zeK8ZwpfytkHBniq3fMkQ9g== X-Received: by 2002:a17:902:b94a:: with SMTP id h10mr62374459pls.265.1560019504765; Sat, 08 Jun 2019 11:45:04 -0700 (PDT) Received: from garuda.local ([2601:601:9d80:25b2::fa8]) by smtp.gmail.com with ESMTPSA id e22sm4240063pgb.9.2019.06.08.11.45.03 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sat, 08 Jun 2019 11:45:03 -0700 (PDT) From: Chris Marusich References: <87ftpsnhal.fsf@gnu.org> <2C03880B-F90E-4949-9637-DC918B6D40A0@gmail.com> <074E4899-C4FF-4A76-8E97-093378D2F8D5@gmail.com> <87pnojvqdu.fsf@gnu.org> <6A0A0108-A722-4D73-85B7-E61AB8230026@gmail.com> Date: Sat, 08 Jun 2019 11:44:55 -0700 In-Reply-To: <6A0A0108-A722-4D73-85B7-E61AB8230026@gmail.com> (Ivan Petkov's message of "Sun, 19 May 2019 18:00:01 -0700") Message-ID: <87ftoj9as8.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux) MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha256; protocol="application/pgp-signature" X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) --=-=-= Content-Type: text/plain Content-Transfer-Encoding: quoted-printable Hi Ivan, Sorry for taking so long to review this. In short, I think these changes are good, and if nobody has more feedback in the next few days, I will merge it and we can see how it works in practice! At a high level, I think these changes have the following pros and cons: Pros: - We can now build Rust crates. Fantastic! - The "dependencies" and "dev-dependencies" terminology is the same as Cargo uses, so it will be familiar to Rust programmers. - We avoid O(N^2) build time, where N is the number of dependencies. - We can use the importer to quickly import new crates and iterate. Cons: - Because the "dependencies" and "dev-dependencies" are specified as package arguments instead of any kind of "input", they won't show up in some of the graphs produced by "guix package". However, in theory "guix graph" could be taught to display nodes for crate "dependencies" and "dev-dependencies", too. =20=20=20=20=20=20 - Everyone who defines a Guix package for a crate must make sure the origin's file name ends in ".cargo", since the cargo-build-system now assumes that any input ending in ".cargo" is a crate that should be extracted into the build's crate-dir. This is a little brittle, and I wish we had a better way to check this, but I can't think of a better way at the moment. Since you've updated the importer to always add this, it probably won't be much of an issue in practice, since that's the default way new crates will be added to Guix. Going forward, maybe we can avoid this by just checking the inputs to see which ones are gzipped tarballs containing Cargo.toml files. Limitations imposed by Rust/Cargo itself: - I'm not a Rust or Cargo expert, but my current understanding is that it isn't feasible to save the artifacts produced when building a crate for re-use when building another crate. In the world of C, it is common to produce a library, and then link against that library when building other software later. In Guix, when building a C library, we install the built artifacts (e.g., .so files) into the output, so that those artifacts can be used as the input for another package's build. It seems that, by Cargo's design, it isn't currently feasible to do the same sort of thing with Cargo: that is, it isn't feasible to build artifacts, install them somewhere for later use, and then later re-use them in another Cargo build. I'd be glad to learn that I'm mistaken, but currently that is my understanding. - Related to this, I doubt that a Rust programmer will be able to invoke a command like "guix environment my-crate" (even if we teach it to understand crate "dependencies" and "dev-dependencies") to make all the dependencies required to build my-crate available. If a Rust programmer wants to hack on my-crate, they'll probably still just use "cargo" to do it without using Guix at all. Is there any way to avoid this and make it possible to get the dependencies used by Guix in the build, so that a Rust programmer can hack around using precisely those dependencies? If this were C or Python, you could do that using "guix environment," but I'm not sure how this could work with Rust crates. Thanks again for working on this! =2D-=20 Chris --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEy/WXVcvn5+/vGD+x3UCaFdgiRp0FAlz8AicACgkQ3UCaFdgi Rp0zWg/+Kp3+TU4z4vQUW6gczOYeguf2hNuDl1n6F77mhOg0SbjowkylP8gOldZo 9oBE2ErU7nYuZuWgeJSDI1ux/MLLpgOnz7nle4oE9lZNxJnrjhsoqOh+lXoFJ3b8 n9OEVaBt0RfTDoixo1oCByJSdharclt+PwReazvqQRByhW8F9S4Hz1tFCnpoq4O/ znkQ5wFNgYvMTOFvHG9OVKUhbXbZStO8ugHdUYw2Wo9BTEf5y3WFKx8yZSSLCQVs pUJlLt8hx+pYzgsrRF/KN8N3Ui+ZOwPcV5/nXYp083IJ47EA5iyal7P4WcPKDJtq wHQRpBkpIcLKM1L52dH8n/0fo3x+zbxLZJXwpvMwUhJrEgSACP7Mk03FZOMVt6Z9 dEBsqukK6DfAWLdxOEX99ahiM9tk17SMQ5TmaDdG/MUdq5bnXi7zka7TbaF9M86+ Ztj9RlzdpPJ4G5CnutHhOfAsO/EHqNtd1Jl8vTMzxYo8LgudGVbvMcPq0eiAMAY4 ye8gvnBTFNO+/LTkeXFdNXZYenbmiwFpPHlA0DmnCsS/Tizv51bDLdPfcodke0AV 4kiRqk8qbGhmCKb/XtMqulqhZ8b2GkAUt3UOPlAhuS/ClY9lywX1QNB/eCb2zMRI u3nCkL43STMRCJok/yocXrhLrzaEULZ4AW07F3sJ4vg0JG3PxTE= =xlDy -----END PGP SIGNATURE----- --=-=-=-- From unknown Fri Jun 13 10:26:49 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#35318] [PATCH] Update cargo-build-system to expand package inputs Resent-From: Ivan Petkov Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sat, 08 Jun 2019 23:35:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 35318 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Chris Marusich Cc: Danny Milosavljevic , Ludovic =?UTF-8?Q?Court=C3=A8s?= , 35318@debbugs.gnu.org Received: via spool by 35318-submit@debbugs.gnu.org id=B35318.156003684427594 (code B ref 35318); Sat, 08 Jun 2019 23:35:02 +0000 Received: (at 35318) by debbugs.gnu.org; 8 Jun 2019 23:34:04 +0000 Received: from localhost ([127.0.0.1]:53896 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hZkqY-0007Az-8X for submit@debbugs.gnu.org; Sat, 08 Jun 2019 19:34:02 -0400 Received: from mail-pl1-f173.google.com ([209.85.214.173]:46147) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hZkqU-0007AS-Vl for 35318@debbugs.gnu.org; Sat, 08 Jun 2019 19:34:01 -0400 Received: by mail-pl1-f173.google.com with SMTP id e5so2182295pls.13 for <35318@debbugs.gnu.org>; Sat, 08 Jun 2019 16:33:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:subject:from:in-reply-to:date:cc:message-id:references :to; bh=glml5aCHl+tBOetERF3Mh/sal8iFnyGaKIDcl9jjdgA=; b=Z1GuhF/TJPhfmmXlh+FHhrxBYKxW/BHLFEw5pEHW5bZjg6e1/OwhNk8rFGpUVsHGjR 4Psmua4ls4axl4HixNMXGgl3Ih3MspIPBdcedwPRYqWxyakIw8d13s0XrVPzKYCMC9yb HKptsv07LbcTXRS71lp1McBaITUguEKCwjhYYanBdFZIQ26lscC6OpsgGuMHjuZnWDr+ M5e+IhwGyv/JpY1A6MS0oDWX4byEvg/y65/rllXbh1xMQi/ss/Z8GOfCLy8PKyqKUqha KPFi/nuaplo2f/UUms8J1+begKNebLxRS1uSzuo8lare2OGem4SefLxce0TTaEOupgEj x1kg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:subject:from:in-reply-to:date:cc :message-id:references:to; bh=glml5aCHl+tBOetERF3Mh/sal8iFnyGaKIDcl9jjdgA=; b=fGNhc5MZJ4FaF8yrAZGXzpr6+fYFliWGy2YZ6pgeWhhePWm8MYaYVQtvsGYVECcexa l7FsmI1qmSed6HaG6uHTbU/vAbTJY9+BZ9zc+7RLLnKRrcLv4idCZuZB+BOuNg1lwA9m Mxz84O86oSoG2k/uKxNMP1kaAd5R6Sw87HudeCQHWkLcCsVfR5lRXqWho9W3epg9S+A5 W7tdKa7psdULoLRdynqdR+HRM93sTH4+EEQ6vmF5z6CqxpTv9bowMgAD1KueAGi29LTR Ev/TJk+lsHM7STzgyWDA795hhx1PhRLchZva1NRwc6dTP2qh6F0/iwhb4p+36eL3X2pv heMA== X-Gm-Message-State: APjAAAUseX3vfgeQGBI0/FaohU0qcPhVMUD5N1Exj84vdWHrHfRsToDb lKyChY6pYf2WQsISMnBTOFc= X-Google-Smtp-Source: APXvYqxiXQc8juCEhjRwsPU6YIIshsT/IuH2tI68bRVKyeg2NyNZ/qoVorncdH8eryxrPopoSXATKQ== X-Received: by 2002:a17:902:2f84:: with SMTP id t4mr19166596plb.57.1560036833056; Sat, 08 Jun 2019 16:33:53 -0700 (PDT) Received: from ?IPv6:2601:602:9a00:1784:e8de:af8e:a7d3:8d3b? ([2601:602:9a00:1784:e8de:af8e:a7d3:8d3b]) by smtp.gmail.com with ESMTPSA id u5sm3095643pgh.2.2019.06.08.16.33.51 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 08 Jun 2019 16:33:52 -0700 (PDT) Content-Type: multipart/alternative; boundary="Apple-Mail=_036D0402-C7D4-4314-AA67-5843146420CC" Mime-Version: 1.0 (Mac OS X Mail 11.5 \(3445.9.1\)) From: Ivan Petkov In-Reply-To: <87ftoj9as8.fsf@gmail.com> Date: Sat, 8 Jun 2019 16:33:50 -0700 Message-Id: References: <87ftpsnhal.fsf@gnu.org> <2C03880B-F90E-4949-9637-DC918B6D40A0@gmail.com> <074E4899-C4FF-4A76-8E97-093378D2F8D5@gmail.com> <87pnojvqdu.fsf@gnu.org> <6A0A0108-A722-4D73-85B7-E61AB8230026@gmail.com> <87ftoj9as8.fsf@gmail.com> X-Mailer: Apple Mail (2.3445.9.1) X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) --Apple-Mail=_036D0402-C7D4-4314-AA67-5843146420CC Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 Hi Chris, > On Jun 8, 2019, at 11:44 AM, Chris Marusich = wrote: >=20 > Sorry for taking so long to review this. In short, I think these > changes are good, and if nobody has more feedback in the next few = days, > I will merge it and we can see how it works in practice! Thanks for the feedback, and thanks for the wonderful pros and cons = summary! > Cons: >=20 > - Because the "dependencies" and "dev-dependencies" are specified = as > package arguments instead of any kind of "input", they won't show > up in some of the graphs produced by "guix package". However, in > theory "guix graph" could be taught to display nodes for crate > "dependencies" and "dev-dependencies", too. Totally correct, we can iterate on this in the future. > - Everyone who defines a Guix package for a crate must make sure = the > origin's file name ends in ".cargo", since the cargo-build-system > now assumes that any input ending in ".cargo" is a crate that > should be extracted into the build's crate-dir. This is a little > brittle, and I wish we had a better way to check this, but I = can't > think of a better way at the moment. Since you've updated the > importer to always add this, it probably won't be much of an = issue > in practice, since that's the default way new crates will be = added > to Guix. Going forward, maybe we can avoid this by just checking > the inputs to see which ones are gzipped tarballs containing > Cargo.toml files. We discussed an alternative solution to this offline, namely we can ask tar to check if a Cargo.toml file exists at the top level without fully = unpacking the archive. If it exists, we can assume the tarball is a crate source = and only then unpack it in the vendor directory. This will make things less brittle as the `.crate` convention won=E2=80=99= t be necessary (a potential downside would be that if there happens to be some = arbitrary input which happens to be a tarball which happens to have a Cargo.toml, it = will get included in the vendor directory without us knowing about it. I think = the chances of this happening in practice are virtually zero, so we can iterate on = this if it ever becomes a problem). I=E2=80=99m going to try to update the patch series to include this = change over the next few days (along with Ludo=E2=80=99s naming-related feedback). If I = don=E2=80=99t get a chance to finish this, we can always merge it in later! > Limitations imposed by Rust/Cargo itself: >=20 > - I'm not a Rust or Cargo expert, but my current understanding is > that it isn't feasible to save the artifacts produced when > building a crate for re-use when building another crate. In the > world of C, it is common to produce a library, and then link > against that library when building other software later. In = Guix, > when building a C library, we install the built artifacts (e.g., > .so files) into the output, so that those artifacts can be used = as > the input for another package's build. It seems that, by Cargo's > design, it isn't currently feasible to do the same sort of thing > with Cargo: that is, it isn't feasible to build artifacts, = install > them somewhere for later use, and then later re-use them in > another Cargo build. I'd be glad to learn that I'm mistaken, but > currently that is my understanding. Your understanding here is correct. > - Related to this, I doubt that a Rust programmer will be able to > invoke a command like "guix environment my-crate" (even if we > teach it to understand crate "dependencies" and > "dev-dependencies") to make all the dependencies required to = build > my-crate available. If a Rust programmer wants to hack on > my-crate, they'll probably still just use "cargo" to do it = without > using Guix at all. Is there any way to avoid this and make it > possible to get the dependencies used by Guix in the build, so > that a Rust programmer can hack around using precisely those > dependencies? If this were C or Python, you could do that using > "guix environment," but I'm not sure how this could work with = Rust > crates. Correct again, a programmer will not be able to run `guix environment = my-crate`, however, I don=E2=80=99t think anyone will do this in practice, since = you can=E2=80=99t =E2=80=9Cpoint=E2=80=9D cargo at that source closure/outputs anyway. For hacking on Rust crates, I=E2=80=99d imagine a Rust programmer would = simply stick with cargo and the crates.io ecosystem proper. I don=E2=80=99= t ever see guix as being a replacement for crates.io (it would be impossible to keep up = with the package changes, even if we automate things, crates aren=E2=80=99t guaranteed to even build, etc.). I=E2=80=99d imagine that crates should only be imported into guix if = they=E2=80=99re necessary for supporting an actual application or service written in Rust, but not used for = day-to-day development. =E2=80=94Ivan --Apple-Mail=_036D0402-C7D4-4314-AA67-5843146420CC Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=utf-8 Hi = Chris,

On Jun 8, 2019, at 11:44 AM, Chris Marusich = <cmmarusich@gmail.com> wrote:

Sorry for taking so long to review this. =  In short, I think these
changes are good, and if = nobody has more feedback in the next few days,
I will = merge it and we can see how it works in practice!

Thanks = for the feedback, and thanks for the wonderful pros and cons = summary!

Cons:

=    - Because the "dependencies" and "dev-dependencies" = are specified as
     package = arguments instead of any kind of "input", they won't show
=      up in some of the graphs produced by "guix = package".  However, in
=      theory "guix graph" could be taught to = display nodes for crate
=      "dependencies" and "dev-dependencies", = too.

Totally correct, we can iterate on this in the = future.

   - Everyone who defines a = Guix package for a crate must make sure the
=      origin's file name ends in ".cargo", since = the cargo-build-system
     now = assumes that any input ending in ".cargo" is a crate that
=      should be extracted into the build's = crate-dir.  This is a little
=      brittle, and I wish we had a better way to = check this, but I can't
=      think of a better way at the moment. =  Since you've updated the
=      importer to always add this, it probably = won't be much of an issue
=      in practice, since that's the default way = new crates will be added
     to = Guix.  Going forward, maybe we can avoid this by just checking
     the inputs to see which ones = are gzipped tarballs containing
=      Cargo.toml files.

We = discussed an alternative solution to this offline, namely we can = ask
tar to check if a Cargo.toml file exists at the top level = without fully unpacking
the archive. If it exists, we can = assume the tarball is a crate source and only
then unpack it = in the vendor directory.

This will = make things less brittle as the `.crate` convention won=E2=80=99t be = necessary
(a potential downside would be that if there happens = to be some arbitrary input
which happens to be a tarball which = happens to have a Cargo.toml, it will get
included in the = vendor directory without us knowing about it. I think the = chances
of this happening in practice are virtually zero, so = we can iterate on this if it ever
becomes a = problem).

I=E2=80=99m going to try = to update the patch series to include this change over the = next
few days (along with Ludo=E2=80=99s naming-related = feedback). If I don=E2=80=99t get a chance to
finish this, we = can always merge it in later!

Limitations = imposed by Rust/Cargo itself:

=    - I'm not a Rust or Cargo expert, but my current = understanding is
     that it = isn't feasible to save the artifacts produced when
=      building a crate for re-use when building = another crate.  In the
=      world of C, it is common to produce a = library, and then link
=      against that library when building other = software later.  In Guix,
=      when building a C library, we install the = built artifacts (e.g.,
     .so = files) into the output, so that those artifacts can be used as
     the input for another = package's build.  It seems that, by Cargo's
=      design, it isn't currently feasible to do = the same sort of thing
     with = Cargo: that is, it isn't feasible to build artifacts, install
     them somewhere for later use, = and then later re-use them in
=      another Cargo build.  I'd be glad to = learn that I'm mistaken, but
=      currently that is my understanding.

Your = understanding here is correct.

=    - Related to this, I doubt that a Rust programmer will = be able to
     invoke a command = like "guix environment my-crate" (even if we
=      teach it to understand crate = "dependencies" and
=      "dev-dependencies") to make all the = dependencies required to build
=      my-crate available.  If a Rust = programmer wants to hack on
=      my-crate, they'll probably still just use = "cargo" to do it without
=      using Guix at all.  Is there any way = to avoid this and make it
=      possible to get the dependencies used by = Guix in the build, so
     that = a Rust programmer can hack around using precisely those
=      dependencies?  If this were C or = Python, you could do that using
=      "guix environment," but I'm not sure how = this could work with Rust
=      crates.

Correct = again, a programmer will not be able to run `guix environment = my-crate`,
however, I don=E2=80=99t think anyone will do this = in practice, since you can=E2=80=99t =E2=80=9Cpoint=E2=80=9D = cargo
at that source closure/outputs anyway.

For hacking on Rust crates, I=E2=80=99d imagine a = Rust programmer would simply stick with
cargo and the crates.io ecosystem = proper. I don=E2=80=99t ever see guix as being a = replacement
for crates.io (it would be impossible to keep up with = the package changes, even if we
automate things, crates = aren=E2=80=99t guaranteed to even build, etc.).

I=E2=80=99d imagine that crates should only be = imported into guix if they=E2=80=99re necessary for = supporting
an actual application or service written in Rust, = but not used for day-to-day development.

=E2=80=94Ivan


= --Apple-Mail=_036D0402-C7D4-4314-AA67-5843146420CC-- From unknown Fri Jun 13 10:26:49 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#35318] [PATCH] Update cargo-build-system to expand package inputs Resent-From: Ivan Petkov Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sun, 09 Jun 2019 23:54:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 35318 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Chris Marusich Cc: Danny Milosavljevic , 35318@debbugs.gnu.org Received: via spool by 35318-submit@debbugs.gnu.org id=B35318.156012443929346 (code B ref 35318); Sun, 09 Jun 2019 23:54:02 +0000 Received: (at 35318) by debbugs.gnu.org; 9 Jun 2019 23:53:59 +0000 Received: from localhost ([127.0.0.1]:55608 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ha7dP-0007dG-78 for submit@debbugs.gnu.org; Sun, 09 Jun 2019 19:53:59 -0400 Received: from mail-pg1-f195.google.com ([209.85.215.195]:36873) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ha7dN-0007d3-76 for 35318@debbugs.gnu.org; Sun, 09 Jun 2019 19:53:57 -0400 Received: by mail-pg1-f195.google.com with SMTP id 20so4029624pgr.4 for <35318@debbugs.gnu.org>; Sun, 09 Jun 2019 16:53:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:subject:from:in-reply-to:date:cc:message-id:references :to; bh=i4FL8CH6TjEqwjpytaBVG1RtFVdbDIPTBL3dNqVKj34=; b=FC85KvOg2kE2KyZmHStfYkazlwRs/xZSQEWYsjF/wr5DyyDLvdBkG8cod7vY9fBg7t YO/dUposBRIcEt3c1iotVE3MHrh3jWHdP1QVnfFcJe6z48Kk7WENQZTzSvmUrLxU0nUq 0bD7RxvefvigR1RP+6WsOCk2vESBJem4kd5kWca1P04tuYYkZUt2Pf1Rws7v2vWosby7 d+w7h7SoAmy3co7z+LDNk6BgPgqYWpTqOG4MwFCxfVbZV8zhuMd2Bf0GSJTBFXOLvjRf V2Gx9guHUJLxqmG41sOsMM4/goD8zly0Q5/E+Hl8nzejmqyCn699adtwjL/VpieSJqUm 9KdA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:subject:from:in-reply-to:date:cc :message-id:references:to; bh=i4FL8CH6TjEqwjpytaBVG1RtFVdbDIPTBL3dNqVKj34=; b=UJQV5TPKof1jIP+NAVvaVeNjWG1q6vuC+iUwRLfjilbpMQExuj353+RtcGGDmTd4PQ HwkpJsz505+rbhPhq8aeVHCdhyCOUG2CJtR/axcoAdBG8kSYSOWOw6dQZmboTatFZL05 EwchD3a5Vf/z0ny1F2nKYHwupS9dBJmbTuL3jLG9rix70gNrIXdFo/gFwB6u0OYiHQk6 3AT1dEfVCm7Ew6VYF/Mp9JeAhmQU3kw8UDDMZYWbOvphZxH4dikIURasG662nJw93y1H EPKv2HYz17b7qd+IUyTQUiqZxntDJyL3G/O5rOhh/WnGFKcSInsjO8hvRwNuYb2HEMiR 4N3Q== X-Gm-Message-State: APjAAAXs+KLgPB8l/ZkC7P+enyQCsHx5Beaz6xvon3RmFkPI5CzL0+UR 6rmtpf8TxAG3+nsa80R7ios= X-Google-Smtp-Source: APXvYqxmwWOnF9oaasqEq19TigtgPxN/r0amyQGp3pxIl5ckXTZBX6LsPTTGxAGKX+uqtaD7HGdmeQ== X-Received: by 2002:a17:90a:bf84:: with SMTP id d4mr17999227pjs.124.1560124431209; Sun, 09 Jun 2019 16:53:51 -0700 (PDT) Received: from ?IPv6:2601:602:9a00:1784:9933:6628:42f:504f? ([2601:602:9a00:1784:9933:6628:42f:504f]) by smtp.gmail.com with ESMTPSA id f10sm8585698pfd.151.2019.06.09.16.53.49 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 09 Jun 2019 16:53:49 -0700 (PDT) Content-Type: multipart/mixed; boundary="Apple-Mail=_2C67887A-0A6D-4616-BC1E-C10D0957183E" Mime-Version: 1.0 (Mac OS X Mail 11.5 \(3445.9.1\)) From: Ivan Petkov In-Reply-To: Date: Sun, 9 Jun 2019 16:53:48 -0700 Message-Id: References: <87ftpsnhal.fsf@gnu.org> <2C03880B-F90E-4949-9637-DC918B6D40A0@gmail.com> <074E4899-C4FF-4A76-8E97-093378D2F8D5@gmail.com> <87pnojvqdu.fsf@gnu.org> <6A0A0108-A722-4D73-85B7-E61AB8230026@gmail.com> <87ftoj9as8.fsf@gmail.com> X-Mailer: Apple Mail (2.3445.9.1) X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) --Apple-Mail=_2C67887A-0A6D-4616-BC1E-C10D0957183E Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 I=E2=80=99ve updated the patch series with the following improvements: * I've applied any naming feedback which came from Ludo * I've changed the cargo-build-system to only unpack inputs into the = cargo vendor directory if the following applies: - The input is a path to a gzip tarball - The archive contains a file called Cargo.toml at its root - This means that we no longer require crate sources to include a ".crate" extension Whew, given that this has gotten pretty long, I'd be happy to land this = as it is for now (barring any blocking issues!), and iterating further going = forward! Thanks again to everyone for their feedback! =E2=80=94Ivan --Apple-Mail=_2C67887A-0A6D-4616-BC1E-C10D0957183E Content-Disposition: attachment; filename=0001-build-system-cargo-expand-transitive-crate-sources.patch Content-Type: application/octet-stream; x-unix-mode=0644; name="0001-build-system-cargo-expand-transitive-crate-sources.patch" Content-Transfer-Encoding: quoted-printable =46rom=20c063c354c02df84ae2a3aaad81175725622cc9d2=20Mon=20Sep=2017=20= 00:00:00=202001=0AFrom:=20Ivan=20Petkov=20=0A= Date:=20Tue,=2016=20Apr=202019=2003:37:44=20-0700=0ASubject:=20[PATCH=20= 1/7]=20build-system/cargo:=20expand=20transitive=20crate=20sources=0A=0A= *=20guix/build/cargo:=20(package-cargo-inputs):=20Add=20it.=0A= (package-cargo-development-inputs):=20Add=20it.=0A(crate-clsoure):=20Add=20= it.=0A(expand-crate-sources):=20Add=20it.=0A(lower):=20New=20= cargo-inputs=20and=20cargo-development-inputs=20keywords.=0AUse=20= expand-crate-sources.=0A(private-keywords):=20Add=20new=20keywords.=0A= ---=0A=20guix/build-system/cargo.scm=20|=20115=20= +++++++++++++++++++++++++++++++++++-=0A=201=20file=20changed,=20114=20= insertions(+),=201=20deletion(-)=0A=0Adiff=20--git=20= a/guix/build-system/cargo.scm=20b/guix/build-system/cargo.scm=0Aindex=20= dc137421e9..828382678d=20100644=0A---=20a/guix/build-system/cargo.scm=0A= +++=20b/guix/build-system/cargo.scm=0A@@=20-29,6=20+29,8=20@@=0A=20=20=20= #:use-module=20(guix=20build-system)=0A=20=20=20#:use-module=20(guix=20= build-system=20gnu)=0A=20=20=20#:use-module=20(ice-9=20match)=0A+=20=20= #:use-module=20(ice-9=20vlist)=0A+=20=20#:use-module=20(srfi=20srfi-1)=0A= =20=20=20#:use-module=20(srfi=20srfi-26)=0A=20=20=20#:export=20= (%cargo-build-system-modules=0A=20=20=20=20=20=20=20=20=20=20=20=20=20= %cargo-utils-modules=0A@@=20-121,15=20+123,125=20@@=20to=20NAME=20and=20= VERSION."=0A=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20#:outputs=20(cons=20"src"=20outputs)=0A= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20#:guile-for-build=20guile-for-build))=0A=20=0A= +(define=20(package-cargo-inputs=20p)=0A+=20=20(apply=0A+=20=20=20=20= (lambda*=20(#:key=20(cargo-inputs=20'())=20#:allow-other-keys)=0A+=20=20=20= =20=20=20cargo-inputs)=0A+=20=20=20=20(package-arguments=20p)))=0A+=0A= +(define=20(package-cargo-development-inputs=20p)=0A+=20=20(apply=0A+=20=20= =20=20(lambda*=20(#:key=20(cargo-development-inputs=20'())=20= #:allow-other-keys)=0A+=20=20=20=20=20=20cargo-development-inputs)=0A+=20= =20=20=20(package-arguments=20p)))=0A+=0A+(define=20(crate-closure=20= inputs)=0A+=20=20"Return=20the=20closure=20of=20INPUTS=20when=20= considering=20the=20'cargo-inputs'=20and=0A+'cargod-dev-deps'=20edges.=20= =20Omit=20duplicate=20inputs,=20except=20for=20those=0A+already=20= present=20in=20INPUTS=20itself.=0A+=0A+This=20is=20implemented=20as=20a=20= breadth-first=20traversal=20such=20that=20INPUTS=20is=0A+preserved,=20= and=20only=20duplicate=20extracted=20inputs=20are=20removed.=0A+=0A= +Forked=20from=20((guix=20packages)=20transitive-inputs)=20since=20this=20= extraction=0A+uses=20slightly=20different=20rules=20compared=20to=20the=20= rest=20of=20Guix=20(i.e.=20we=0A+do=20not=20extract=20the=20conventional=20= inputs)."=0A+=20=20(define=20(seen?=20seen=20item)=0A+=20=20=20=20;;=20= FIXME:=20We're=20using=20pointer=20identity=20here,=20which=20is=20= extremely=20sensitive=0A+=20=20=20=20;;=20to=20memoization=20in=20= package-producing=20procedures;=20see=0A+=20=20=20=20;;=20= .=0A+=20=20=20=20(vhash-assq=20item=20seen))=0A= +=0A+=20=20(let=20loop=20((inputs=20=20=20=20=20inputs)=0A+=20=20=20=20=20= =20=20=20=20=20=20=20=20(result=20=20=20=20=20'())=0A+=20=20=20=20=20=20=20= =20=20=20=20=20=20(propagated=20'())=0A+=20=20=20=20=20=20=20=20=20=20=20= =20=20(first?=20=20=20=20=20#t)=0A+=20=20=20=20=20=20=20=20=20=20=20=20=20= (seen=20=20=20=20=20=20=20vlist-null))=0A+=20=20=20=20(match=20inputs=0A= +=20=20=20=20=20=20(()=0A+=20=20=20=20=20=20=20(if=20(null?=20= propagated)=0A+=20=20=20=20=20=20=20=20=20=20=20(reverse=20result)=0A+=20= =20=20=20=20=20=20=20=20=20=20(loop=20(reverse=20(concatenate=20= propagated))=20result=20'()=20#f=20seen)))=0A+=20=20=20=20=20=20(((and=20= input=20(label=20(?=20package?=20package)))=20rest=20...)=0A+=20=20=20=20= =20=20=20(if=20(and=20(not=20first?)=20(seen?=20seen=20package))=0A+=20=20= =20=20=20=20=20=20=20=20=20(loop=20rest=20result=20propagated=20first?=20= seen)=0A+=20=20=20=20=20=20=20=20=20=20=20(loop=20rest=0A+=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20(cons=20input=20result)=0A+=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20(cons=20(package-cargo-inputs=20= package)=0A+=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20propagated)=0A+=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= first?=0A+=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= (vhash-consq=20package=20package=20seen))))=0A+=20=20=20=20=20=20((input=20= rest=20...)=0A+=20=20=20=20=20=20=20(loop=20rest=20(cons=20input=20= result)=20propagated=20first?=20seen)))))=0A+=0A+(define=20= (expand-crate-sources=20cargo-inputs=20cargo-development-inputs)=0A+=20=20= "Extract=20all=20transitive=20sources=20for=20CARGO-INPUTS=20and=20= CARGO-DEVELOPMENT-INPUTS=0A+along=20their=20'cargo-inputs'=20edges.=0A+=0A= +Cargo=20requires=20all=20transitive=20crate=20dependencies'=20sources=20= to=20be=20available=0A+in=20its=20index,=20even=20if=20they=20are=20= optional=20(this=20is=20so=20it=20can=20generate=0A+deterministic=20= Cargo.lock=20files=20regardless=20of=20the=20target=20platform=20or=20= enabled=0A+features).=20Thus=20we=20need=20all=20transitive=20crate=20= dependencies=20for=20any=20cargo=0A+dev-dependencies,=20but=20this=20is=20= only=20needed=20when=20building/testing=20a=20crate=20directly=0A+(i.e.=20= we=20will=20never=20need=20transitive=20dev-dependencies=20for=20any=20= dependency=20crates).=0A+=0A+Another=20complication=20arises=20due=20= potential=20dependency=20cycles=20from=20Guix's=0A+perspective:=20= Although=20cargo=20does=20not=20permit=20cyclic=20dependencies=20between=20= crates,=0A+however,=20it=20permits=20cycles=20to=20occur=20via=20= dev-dependencies.=20For=20example,=20if=20crate=0A+X=20depends=20on=20= crate=20Y,=20crate=20Y's=20tests=20could=20pull=20in=20crate=20X=20to=20= to=20verify=0A+everything=20builds=20properly=20(this=20is=20a=20rare=20= scenario,=20but=20it=20it=20happens=20for=0A+example=20with=20the=20= `proc-macro2`=20and=20`quote`=20crates).=20This=20is=20allowed=20by=20= cargo=0A+because=20tests=20are=20built=20as=20a=20pseudo-crate=20which=20= happens=20to=20depend=20on=20the=0A+X=20and=20Y=20crates,=20forming=20an=20= acyclic=20graph.=0A+=0A+We=20can=20side=20step=20this=20problem=20by=20= only=20considering=20regular=20cargo=20dependencies=0A+since=20they=20= are=20guaranteed=20to=20not=20have=20cycles.=20We=20can=20further=20= resolve=20any=0A+potential=20dev-dependency=20cycles=20by=20extracting=20= package=20sources=20(which=20never=20have=0A+any=20dependencies=20and=20= thus=20no=20cycles=20can=20exist).=0A+=0A+There=20are=20several=20= implications=20of=20this=20decision:=0A+*=20Building=20a=20package=20= definition=20does=20not=20require=20actually=20building/checking=0A+any=20= dependent=20crates.=20This=20can=20be=20a=20benefits:=0A+=20-=20For=20= example,=20sometimes=20a=20crate=20may=20have=20an=20optional=20= dependency=20on=20some=20OS=0A+=20specific=20package=20which=20cannot=20= be=20built=20or=20run=20on=20the=20current=20system.=20This=0A+=20= approach=20means=20that=20the=20build=20will=20not=20fail=20if=20cargo=20= ends=20up=20internally=20ignoring=0A+=20the=20dependency.=0A+=20-=20It=20= avoids=20waiting=20for=20quadratic=20builds=20from=20source:=20cargo=20= always=20builds=0A+=20dependencies=20within=20the=20current=20workspace.=20= This=20is=20largely=20due=20to=20Rust=20not=0A+=20having=20a=20stable=20= ABI=20and=20other=20resolutions=20that=20cargo=20applies.=20This=20means=20= that=0A+=20if=20we=20have=20a=20depencency=20chain=20of=20X=20->=20Y=20= ->=20Z=20and=20we=20build=20each=20definition=0A+=20independently=20the=20= following=20will=20happen:=0A+=20=20*=20Cargo=20will=20build=20and=20= test=20crate=20Z=0A+=20=20*=20Cargo=20will=20build=20crate=20Z=20in=20= Y's=20workspace,=20then=20build=20and=20test=20Y=0A+=20=20*=20Cargo=20= will=20build=20crates=20Y=20and=20Z=20in=20X's=20workspace,=20then=20= build=20and=20test=20X=0A+*=20But=20there=20are=20also=20some=20= downsides=20with=20this=20approach:=0A+=20=20-=20If=20a=20dependent=20= crate=20is=20subtly=20broken=20on=20the=20system=20(i.e.=20it=20builds=20= but=20its=0A+=20=20tests=20fail)=20the=20consuming=20crates=20may=20= build=20and=20test=20successfully=20but=0A+=20=20actually=20fail=20= during=20normal=20usage=20(however,=20the=20CI=20will=20still=20build=20= all=0A+=20=20packages=20which=20will=20give=20visibility=20in=20case=20= packages=20suddenly=20break).=0A+=20=20-=20Because=20crates=20aren't=20= declared=20as=20regular=20inputs,=20other=20Guix=20facilities=0A+=20=20= such=20as=20tracking=20package=20graphs=20may=20not=20work=20by=20= default=20(however,=20this=20is=0A+=20=20something=20that=20can=20always=20= be=20extended=20or=20reworked=20in=20the=20future)."=0A+=20=20= (filter-map=0A+=20=20=20=20(match-lambda=0A+=20=20=20=20=20=20((label=20= (?=20package?=20p))=0A+=20=20=20=20=20=20=20(list=20label=20= (package-source=20p)))=0A+=20=20=20=20=20=20((label=20input)=0A+=20=20=20= =20=20=20=20(list=20label=20input)))=0A+=20=20=20=20(crate-closure=20= (append=20cargo-inputs=20cargo-development-inputs))))=0A+=0A=20(define*=20= (lower=20name=0A=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20#:key=20= source=20inputs=20native-inputs=20outputs=20system=20target=0A=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20(rust=20(default-rust))=0A+=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20(cargo-inputs=20'())=0A+=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20(cargo-development-inputs=20'())=0A=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20#:allow-other-keys=0A=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20#:rest=20arguments)=0A=20=20= =20"Return=20a=20bag=20for=20NAME."=0A=20=0A=20=20=20(define=20= private-keywords=0A-=20=20=20=20'(#:source=20#:target=20#:rust=20= #:inputs=20#:native-inputs=20#:outputs))=0A+=20=20=20=20'(#:source=20= #:target=20#:rust=20#:inputs=20#:native-inputs=20#:outputs=0A+=20=20=20=20= =20=20#:cargo-inputs=20#:cargo-development-inputs))=0A=20=0A=20=20=20= (and=20(not=20target)=20;;=20TODO:=20support=20cross-compilation=0A=20=20= =20=20=20=20=20=20(bag=0A@@=20-145,6=20+257,7=20@@=20to=20NAME=20and=20= VERSION."=0A=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20,@(standard-packages)))=0A=20=20=20=20=20=20=20=20=20=20= (build-inputs=20`(("cargo"=20,rust=20"cargo")=0A=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20("rustc"=20,rust)=0A+=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= ,@(expand-crate-sources=20cargo-inputs=20cargo-development-inputs)=0A=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= ,@native-inputs))=0A=20=20=20=20=20=20=20=20=20=20(outputs=20outputs)=0A=20= =20=20=20=20=20=20=20=20=20(build=20cargo-build)=0A--=20=0A2.21.0=0A=0A= --Apple-Mail=_2C67887A-0A6D-4616-BC1E-C10D0957183E Content-Disposition: attachment; filename=0002-build-system-cargo-use-sources-from-package-sources.patch Content-Type: application/octet-stream; x-unix-mode=0644; name="0002-build-system-cargo-use-sources-from-package-sources.patch" Content-Transfer-Encoding: quoted-printable =46rom=2093d8e04dc6d863213ad240ab11147a140bd665a9=20Mon=20Sep=2017=20= 00:00:00=202001=0AFrom:=20Ivan=20Petkov=20=0A= Date:=20Thu,=2016=20May=202019=2023:02:12=20-0700=0ASubject:=20[PATCH=20= 2/7]=20build-system/cargo:=20use=20sources=20from=20package=20sources=0A=0A= *=20guix/build/cargo-build-system:=20(configure):=20Expand=20crate=20= tarballs=20in=0Avendor=20directory.=0A---=0A=20= guix/build/cargo-build-system.scm=20|=2035=20= +++++++++++++++++++++++++------=0A=201=20file=20changed,=2029=20= insertions(+),=206=20deletions(-)=0A=0Adiff=20--git=20= a/guix/build/cargo-build-system.scm=20= b/guix/build/cargo-build-system.scm=0Aindex=209f44bd6ee9..b368074e8a=20= 100644=0A---=20a/guix/build/cargo-build-system.scm=0A+++=20= b/guix/build/cargo-build-system.scm=0A@@=20-54,6=20+54,22=20@@=0A=20=20=20= =20=20=20=20=20=20=20(bin-dep?=20(lambda=20(dep)=20(find=20bin?=20= (get-kinds=20dep)))))=0A=20=20=20=20=20(find=20bin-dep?=20= (manifest-targets))))=0A=20=0A+(define=20(crate-src?=20path)=0A+=20=20= "Check=20if=20PATH=20refers=20to=20a=20crate=20source,=20namely=20a=20= gzipped=20tarball=20with=20a=0A+Cargo.toml=20file=20present=20at=20its=20= root."=0A+=20=20=20=20(and=20(gzip-file?=20path)=0A+=20=20=20=20=20=20=20= =20=20;;=20First=20we=20print=20out=20all=20file=20names=20within=20the=20= tarball=20to=20see=20if=20it=0A+=20=20=20=20=20=20=20=20=20;;=20looks=20= like=20the=20source=20of=20a=20crate.=20However,=20the=20tarball=20will=20= include=0A+=20=20=20=20=20=20=20=20=20;;=20an=20extra=20path=20component=20= which=20we=20would=20like=20to=20ignore=20(since=20we're=0A+=20=20=20=20=20= =20=20=20=20;;=20interested=20in=20checking=20if=20a=20Cargo.toml=20= exists=20at=20the=20root=20of=20the=0A+=20=20=20=20=20=20=20=20=20;;=20= archive,=20but=20not=20nested=20anywhere=20else).=20We=20do=20this=20by=20= cutting=20up=0A+=20=20=20=20=20=20=20=20=20;;=20each=20output=20line=20= and=20only=20looking=20at=20the=20second=20component.=20We=20then=0A+=20=20= =20=20=20=20=20=20=20;;=20check=20if=20it=20matches=20Cargo.toml=20= exactly=20and=20short=20circuit=20if=20it=20does.=0A+=20=20=20=20=20=20=20= =20=20(zero?=20(apply=20system*=20(list=20"sh"=20"-c"=0A+=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20(string-append=20"tar=20-tf=20"=20path=0A+=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20"=20|=20= cut=20-d/=20-f2"=0A+=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20"=20|=20grep=20-q=20'^Cargo.toml$'"))))))=0A+=0A= =20(define*=20(configure=20#:key=20inputs=0A=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20(vendor-dir=20"guix-vendor")=0A=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= #:allow-other-keys)=0A@@=20-67,14=20+83,21=20@@=0A=20=20=20(for-each=0A=20= =20=20=20=20(match-lambda=0A=20=20=20=20=20=20=20((name=20.=20path)=0A-=20= =20=20=20=20=20=20(let*=20((rust-share=20(string-append=20path=20= "/share/rust-source"))=0A-=20=20=20=20=20=20=20=20=20=20=20=20=20=20= (basepath=20(basename=20path))=0A-=20=20=20=20=20=20=20=20=20=20=20=20=20= =20(link-dir=20(string-append=20vendor-dir=20"/"=20basepath)))=0A-=20=20=20= =20=20=20=20=20=20(and=20(file-exists?=20rust-share)=0A+=20=20=20=20=20=20= =20(let*=20((basepath=20(basename=20path))=0A+=20=20=20=20=20=20=20=20=20= =20=20=20=20=20(crate-dir=20(string-append=20vendor-dir=20"/"=20= basepath)))=0A+=20=20=20=20=20=20=20=20=20(and=20(crate-src?=20path)=0A=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20;;=20Gracefully=20handle=20= duplicate=20inputs=0A-=20=20=20=20=20=20=20=20=20=20=20=20=20=20(not=20= (file-exists?=20link-dir))=0A-=20=20=20=20=20=20=20=20=20=20=20=20=20=20= (symlink=20rust-share=20link-dir)))))=0A+=20=20=20=20=20=20=20=20=20=20=20= =20=20=20(not=20(file-exists?=20crate-dir))=0A+=20=20=20=20=20=20=20=20=20= =20=20=20=20=20(mkdir-p=20crate-dir)=0A+=20=20=20=20=20=20=20=20=20=20=20= =20=20=20;;=20Cargo=20crates=20are=20simply=20gzipped=20tarballs=20but=20= with=20a=20.crate=0A+=20=20=20=20=20=20=20=20=20=20=20=20=20=20;;=20= extension.=20We=20expand=20the=20source=20to=20a=20directory=20name=20we=20= control=0A+=20=20=20=20=20=20=20=20=20=20=20=20=20=20;;=20so=20that=20we=20= can=20generate=20any=20cargo=20checksums.=0A+=20=20=20=20=20=20=20=20=20=20= =20=20=20=20;;=20The=20--strip-components=20argument=20is=20needed=20to=20= prevent=20creating=0A+=20=20=20=20=20=20=20=20=20=20=20=20=20=20;;=20an=20= extra=20directory=20within=20`crate-dir`.=0A+=20=20=20=20=20=20=20=20=20=20= =20=20=20=20(invoke=20"tar"=20"xvf"=20path=20"-C"=20crate-dir=20= "--strip-components"=20"1")=0A+=20=20=20=20=20=20=20=20=20=20=20=20=20=20= (generate-checksums=20crate-dir)))))=0A=20=20=20=20=20inputs)=0A+=0A=20=20= =20;;=20Configure=20cargo=20to=20actually=20use=20this=20new=20= directory.=0A=20=20=20(mkdir-p=20".cargo")=0A=20=20=20(let=20((port=20= (open-file=20".cargo/config"=20"w"=20#:encoding=20"utf-8")))=0A--=20=0A= 2.21.0=0A=0A= --Apple-Mail=_2C67887A-0A6D-4616-BC1E-C10D0957183E Content-Disposition: attachment; filename=0003-build-system-cargo-don-t-copy-source-as-an-output.patch Content-Type: application/octet-stream; x-unix-mode=0644; name="0003-build-system-cargo-don-t-copy-source-as-an-output.patch" Content-Transfer-Encoding: quoted-printable =46rom=20fec67a58e05588813bfc4808bd0792dd8f7564c6=20Mon=20Sep=2017=20= 00:00:00=202001=0AFrom:=20Ivan=20Petkov=20=0A= Date:=20Thu,=2016=20May=202019=2023:05:50=20-0700=0ASubject:=20[PATCH=20= 3/7]=20build-system/cargo:=20don't=20copy=20source=20as=20an=20output=0A=0A= *=20guix/build-system/cargo:=20= (cargo-build)[build-expression->derivation]:=0ADon't=20add=20"src"=20= output.=0A*=20guix/build/cargo-build-system:=20(install-source):=20= Delete=20it.=0A(%standard-phases):=20Delete=20'install-source.=0A---=0A=20= guix/build-system/cargo.scm=20=20=20=20=20=20=20|=20=202=20+-=0A=20= guix/build/cargo-build-system.scm=20|=2019=20-------------------=0A=202=20= files=20changed,=201=20insertion(+),=2020=20deletions(-)=0A=0Adiff=20= --git=20a/guix/build-system/cargo.scm=20b/guix/build-system/cargo.scm=0A= index=20828382678d..fa211d456d=20100644=0A---=20= a/guix/build-system/cargo.scm=0A+++=20b/guix/build-system/cargo.scm=0A@@=20= -120,7=20+120,7=20@@=20to=20NAME=20and=20VERSION."=0A=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20#:inputs=20inputs=0A=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20#:system=20system=0A=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20#:modules=20imported-modules=0A-=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= #:outputs=20(cons=20"src"=20outputs)=0A+=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20#:outputs=20= outputs=0A=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20#:guile-for-build=20= guile-for-build))=0A=20=0A=20(define=20(package-cargo-inputs=20p)=0Adiff=20= --git=20a/guix/build/cargo-build-system.scm=20= b/guix/build/cargo-build-system.scm=0Aindex=20b368074e8a..1f36304b15=20= 100644=0A---=20a/guix/build/cargo-build-system.scm=0A+++=20= b/guix/build/cargo-build-system.scm=0A@@=20-140,24=20+140,6=20@@=20= directory=20=3D=20'"=20port)=0A=20(define=20(touch=20file-name)=0A=20=20=20= (call-with-output-file=20file-name=20(const=20#t)))=0A=20=0A-(define*=20= (install-source=20#:key=20inputs=20outputs=20#:allow-other-keys)=0A-=20=20= "Install=20the=20source=20for=20a=20given=20Cargo=20package."=0A-=20=20= (let*=20((out=20(assoc-ref=20outputs=20"out"))=0A-=20=20=20=20=20=20=20=20= =20(src=20(assoc-ref=20inputs=20"source"))=0A-=20=20=20=20=20=20=20=20=20= (rsrc=20(string-append=20(assoc-ref=20outputs=20"src")=0A-=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= "/share/rust-source")))=0A-=20=20=20=20(mkdir-p=20rsrc)=0A-=20=20=20=20= ;;=20Rust=20doesn't=20have=20a=20stable=20ABI=20yet.=20Because=20of=20= this=0A-=20=20=20=20;;=20Cargo=20doesn't=20have=20a=20search=20path=20= for=20binaries=20yet.=0A-=20=20=20=20;;=20Until=20this=20changes=20we=20= are=20working=20around=20this=20by=0A-=20=20=20=20;;=20vendoring=20the=20= crates'=20sources=20by=20symlinking=20them=0A-=20=20=20=20;;=20to=20= store=20paths.=0A-=20=20=20=20(copy-recursively=20"."=20rsrc)=0A-=20=20=20= =20(touch=20(string-append=20rsrc=20"/.cargo-ok"))=0A-=20=20=20=20= (generate-checksums=20rsrc)=0A-=20=20=20=20(install-file=20"Cargo.toml"=20= rsrc)=0A-=20=20=20=20#t))=0A-=0A=20(define*=20(install=20#:key=20inputs=20= outputs=20skip-build?=20#:allow-other-keys)=0A=20=20=20"Install=20a=20= given=20Cargo=20package."=0A=20=20=20(let*=20((out=20(assoc-ref=20= outputs=20"out")))=0A@@=20-179,7=20+161,6=20@@=20directory=20=3D=20'"=20= port)=0A=20(define=20%standard-phases=0A=20=20=20(modify-phases=20= gnu:%standard-phases=0A=20=20=20=20=20(delete=20'bootstrap)=0A-=20=20=20=20= (add-before=20'configure=20'install-source=20install-source)=0A=20=20=20=20= =20(replace=20'configure=20configure)=0A=20=20=20=20=20(replace=20'build=20= build)=0A=20=20=20=20=20(replace=20'check=20check)=0A--=20=0A2.21.0=0A=0A= --Apple-Mail=_2C67887A-0A6D-4616-BC1E-C10D0957183E Content-Disposition: attachment; filename=0004-doc-Update-cargo-build-system-parameter-docs.patch Content-Type: application/octet-stream; x-unix-mode=0644; name="0004-doc-Update-cargo-build-system-parameter-docs.patch" Content-Transfer-Encoding: quoted-printable =46rom=207d75538f8e24bb0dcbdd252a19ec68dd42947831=20Mon=20Sep=2017=20= 00:00:00=202001=0AFrom:=20Ivan=20Petkov=20=0A= Date:=20Fri,=2017=20May=202019=2009:07:54=20-0700=0ASubject:=20[PATCH=20= 4/7]=20doc:=20Update=20cargo-build-system=20parameter=20docs=0A=0A*=20= doc/guix.texi:=20(Build=20Systems)[cargo-build-system]:=20Add=20= references=20to=0Athe=20#:rust,=20#:cargo-inputs,=20and=20= #:cargo-development-inputs=20parameters.=0ARemove=20reference=20to=20= installing=20crate=20sources.=0A---=0A=20doc/guix.texi=20|=2019=20= +++++++++++++++----=0A=201=20file=20changed,=2015=20insertions(+),=204=20= deletions(-)=0A=0Adiff=20--git=20a/doc/guix.texi=20b/doc/guix.texi=0A= index=20a9cd66ce87..61f5de9e5d=20100644=0A---=20a/doc/guix.texi=0A+++=20= b/doc/guix.texi=0A@@=20-64,6=20+64,7=20@@=20Copyright=20@copyright{}=20= 2018=20Laura=20Lazzati@*=0A=20Copyright=20@copyright{}=202018=20Alex=20= Vong@*=0A=20Copyright=20@copyright{}=202019=20Josh=20Holland@*=0A=20= Copyright=20@copyright{}=202019=20Diego=20Nicola=20Barbato@*=0A= +Copyright=20@copyright{}=202019=20Ivan=20Petkov@*=0A=20=0A=20Permission=20= is=20granted=20to=20copy,=20distribute=20and/or=20modify=20this=20= document=0A=20under=20the=20terms=20of=20the=20GNU=20Free=20= Documentation=20License,=20Version=201.3=20or=0A@@=20-5814,10=20+5815,20=20= @@=20This=20variable=20is=20exported=20by=20@code{(guix=20build-system=20= cargo)}.=20=20It=0A=20supports=20builds=20of=20packages=20using=20Cargo,=20= the=20build=20tool=20of=20the=0A=20@uref{https://www.rust-lang.org,=20= Rust=20programming=20language}.=0A=20=0A-In=20its=20@code{configure}=20= phase,=20this=20build=20system=20replaces=20dependencies=0A-specified=20= in=20the=20@file{Cargo.toml}=20file=20with=20inputs=20to=20the=20Guix=20= package.=0A-The=20@code{install}=20phase=20installs=20the=20binaries,=20= and=20it=20also=20installs=20the=0A-source=20code=20and=20= @file{Cargo.toml}=20file.=0A+It=20adds=20@code{rustc}=20and=20= @code{cargo}=20to=20the=20set=20of=20inputs.=0A+A=20different=20Rust=20= package=20can=20be=20specified=20with=20the=20@code{#:rust}=20parameter.=0A= +=0A+Regular=20cargo=20dependencies=20should=20be=20added=20to=20the=20= package=20definition=20via=0A+the=20@code{#:cargo-inputs}=20parameter=20= as=20a=20list=20of=20name=20and=20spec=20pairs,=20where=20the=0A+spec=20= can=20be=20a=20package=20or=20a=20source=20definition.=20Note=20that=20= the=20spec=20must=20evaluate=0A+to=20a=20path=20to=20a=20gzipped=20= tarball=20which=20includes=20a=20@code{Cargo.toml}=20file=20at=20its=0A= +root,=20or=20it=20will=20be=20ignored.=20Similarly,=20cargo=20= dev-dependencies=20should=20be=20added=0A+to=20the=20package=20= definition=20via=20the=20@code{#:cargo-development-inputs}=20parameter.=0A= +=0A+In=20its=20@code{configure}=20phase,=20this=20build=20system=20will=20= make=20any=20source=20inputs=0A+specified=20in=20the=20= @code{#:cargo-inputs}=20and=20@code{#:cargo-development-inputs}=0A= +parameters=20available=20to=20cargo.=20The=20@code{install}=20phase=20= installs=20any=20crate=20the=0A+binaries=20if=20they=20are=20defined=20= by=20the=20crate.=0A=20@end=20defvr=0A=20=0A=20@cindex=20Clojure=20= (programming=20language)=0A--=20=0A2.21.0=0A=0A= --Apple-Mail=_2C67887A-0A6D-4616-BC1E-C10D0957183E Content-Disposition: attachment; filename=0005-import-crate-define-dependencies-as-arguments.patch Content-Type: application/octet-stream; x-unix-mode=0644; name="0005-import-crate-define-dependencies-as-arguments.patch" Content-Transfer-Encoding: quoted-printable =46rom=20ee47fe46390f7996e77a8af7974899be68000dda=20Mon=20Sep=2017=20= 00:00:00=202001=0AFrom:=20Ivan=20Petkov=20=0A= Date:=20Fri,=2017=20May=202019=2000:26:07=20-0700=0ASubject:=20[PATCH=20= 5/7]=20import:=20crate:=20define=20dependencies=20as=20arguments=0A=0A*=20= guix/import/crate.scm:=0A(crate-fetch)[input-crates]:=20Rename=20to=20= dev-crates.=0A[native-input-crates]:=20Rename=20to=20dev-dep-crates.=0A= [inputs]:=20Rename=20to=20cargo-inputs.=0A[native-inputs]:=20Rename=20to=20= cargo-development-inputs.=0A(maybe-cargo-inputs):=20Add=20it.=0A= (maybe-cargo-development-inputs):=20Add=20it.=0A(maybe-arguments):=20Add=20= it.=0A(make-crate-sexp):=20Use=20new=20procedures.=0A[inputs]:=20Rename=20= to=20cargo-inputs.=0A[native-inputs]:=20Rename=20to=20= cargo-development-inputs.=0A*=20guix/import/utils.scm:=20= (package-names->package-inputs):=20Make=20public.=0AAdd=20doc=20string.=0A= ---=0A=20guix/import/crate.scm=20|=2047=20= +++++++++++++++++++++++++++++++++----------=0A=20guix/import/utils.scm=20= |=20=204=20++++=0A=202=20files=20changed,=2040=20insertions(+),=2011=20= deletions(-)=0A=0Adiff=20--git=20a/guix/import/crate.scm=20= b/guix/import/crate.scm=0Aindex=20e0b400d054..9a73d9fe16=20100644=0A---=20= a/guix/import/crate.scm=0A+++=20b/guix/import/crate.scm=0A@@=20-65,29=20= +65,53=20@@=0A=20=20=20=20=20=20=20=20=20=20=20=20=20=20(path=20= (string-append=20"/"=20version=20"/dependencies"))=0A=20=20=20=20=20=20=20= =20=20=20=20=20=20=20(deps-json=20(json-fetch-alist=20(string-append=20= crate-url=20name=20path)))=0A=20=20=20=20=20=20=20=20=20=20=20=20=20=20= (deps=20(assoc-ref=20deps-json=20"dependencies"))=0A-=20=20=20=20=20=20=20= =20=20=20=20=20=20(input-crates=20(filter=20(crate-kind-predicate=20= "normal")=20deps))=0A-=20=20=20=20=20=20=20=20=20=20=20=20=20= (native-input-crates=0A+=20=20=20=20=20=20=20=20=20=20=20=20=20= (dep-crates=20(filter=20(crate-kind-predicate=20"normal")=20deps))=0A+=20= =20=20=20=20=20=20=20=20=20=20=20=20(dev-dep-crates=0A=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20(filter=20(lambda=20(dep)=0A=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20(not=20= ((crate-kind-predicate=20"normal")=20dep)))=20deps))=0A-=20=20=20=20=20=20= =20=20=20=20=20=20=20(inputs=20(crates->inputs=20input-crates))=0A-=20=20= =20=20=20=20=20=20=20=20=20=20=20(native-inputs=20(crates->inputs=20= native-input-crates))=0A+=20=20=20=20=20=20=20=20=20=20=20=20=20= (cargo-inputs=20(crates->inputs=20dep-crates))=0A+=20=20=20=20=20=20=20=20= =20=20=20=20=20(cargo-development-inputs=20(crates->inputs=20= dev-dep-crates))=0A=20=20=20=20=20=20=20=20=20=20=20=20=20=20(home-page=20= (match=20homepage=0A=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20(()=20repository)=0A=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20(_=20homepage))))=0A= =20=20=20=20=20(callback=20#:name=20name=20#:version=20version=0A-=20=20=20= =20=20=20=20=20=20=20=20=20=20=20#:inputs=20inputs=20#:native-inputs=20= native-inputs=0A+=20=20=20=20=20=20=20=20=20=20=20=20=20=20= #:cargo-inputs=20cargo-inputs=0A+=20=20=20=20=20=20=20=20=20=20=20=20=20=20= #:cargo-development-inputs=20cargo-development-inputs=0A=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20#:home-page=20home-page=20#:synopsis=20= synopsis=0A=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20#:description=20= description=20#:license=20license)))=0A=20=0A-(define*=20= (make-crate-sexp=20#:key=20name=20version=20inputs=20native-inputs=0A= +(define=20(maybe-cargo-inputs=20package-names)=0A+=20=20(match=20= (package-names->package-inputs=20package-names)=0A+=20=20=20=20(()=0A+=20= =20=20=20=20'())=0A+=20=20=20=20((package-inputs=20...)=0A+=20=20=20=20=20= `((#:cargo-inputs=20,package-inputs)))))=0A+=0A+(define=20= (maybe-cargo-development-inputs=20package-names)=0A+=20=20(match=20= (package-names->package-inputs=20package-names)=0A+=20=20=20=20(()=0A+=20= =20=20=20=20'())=0A+=20=20=20=20((package-inputs=20...)=0A+=20=20=20=20=20= `((#:cargo-development-inputs=20,package-inputs)))))=0A+=0A+(define=20= (maybe-arguments=20arguments)=0A+=20=20(match=20arguments=0A+=20=20=20=20= (()=0A+=20=20=20=20=20'())=0A+=20=20=20=20((args=20...)=0A+=20=20=20=20=20= `((arguments=20(,'quasiquote=20,args))))))=0A+=0A+(define*=20= (make-crate-sexp=20#:key=20name=20version=20cargo-inputs=20= cargo-development-inputs=0A=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20home-page=20synopsis=20description=20= license=0A=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20#:allow-other-keys)=0A=20=20=20"Return=20the=20= `package'=20s-expression=20for=20a=20rust=20package=20with=20the=20given=20= NAME,=0A-VERSION,=20INPUTS,=20NATIVE-INPUTS,=20HOME-PAGE,=20SYNOPSIS,=20= DESCRIPTION,=20and=20LICENSE."=0A+VERSION,=20CARGO-INPUTS,=20= CARGO-DEVELOPMENT-INPUTS,=20HOME-PAGE,=20SYNOPSIS,=20DESCRIPTION,=0A+and=20= LICENSE."=0A=20=20=20(let*=20((port=20(http-fetch=20(crate-uri=20name=20= version)))=0A=20=20=20=20=20=20=20=20=20=20(guix-name=20= (crate-name->package-name=20name))=0A-=20=20=20=20=20=20=20=20=20(inputs=20= (map=20crate-name->package-name=20inputs))=0A-=20=20=20=20=20=20=20=20=20= (native-inputs=20(map=20crate-name->package-name=20native-inputs))=0A+=20= =20=20=20=20=20=20=20=20(cargo-inputs=20(map=20crate-name->package-name=20= cargo-inputs))=0A+=20=20=20=20=20=20=20=20=20(cargo-development-inputs=20= (map=20crate-name->package-name=0A+=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20cargo-development-inputs))=0A=20=20=20=20=20=20=20=20=20=20(pkg=20= `(package=0A=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= (name=20,guix-name)=0A=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20(version=20,version)=0A@@=20-99,8=20+123,9=20@@=20VERSION,=20= INPUTS,=20NATIVE-INPUTS,=20HOME-PAGE,=20SYNOPSIS,=20DESCRIPTION,=20and=20= LICENSE."=0A=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20(base32=0A=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= ,(bytevector->nix-base32-string=20(port-sha256=20port))))))=0A=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20(build-system=20= cargo-build-system)=0A-=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20,@(maybe-native-inputs=20native-inputs=20"src")=0A-=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20,@(maybe-inputs=20inputs=20"src")=0A= +=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= ,@(maybe-arguments=20(append=20(maybe-cargo-inputs=20cargo-inputs)=0A+=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= (maybe-cargo-development-inputs=0A+=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20cargo-development-inputs)))=0A=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20(home-page=20,(match=20= home-page=0A=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20(()=20"")=0A=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20(_=20home-page)))=0Adiff=20--git=20a/guix/import/utils.scm=20= b/guix/import/utils.scm=0Aindex=2063fc9bbb27..84503ab907=20100644=0A---=20= a/guix/import/utils.scm=0A+++=20b/guix/import/utils.scm=0A@@=20-52,6=20= +52,7=20@@=0A=20=20=20=20=20=20=20=20=20=20=20=20=20url-fetch=0A=20=20=20= =20=20=20=20=20=20=20=20=20=20guix-hash-url=0A=20=0A+=20=20=20=20=20=20=20= =20=20=20=20=20package-names->package-inputs=0A=20=20=20=20=20=20=20=20=20= =20=20=20=20maybe-inputs=0A=20=20=20=20=20=20=20=20=20=20=20=20=20= maybe-native-inputs=0A=20=20=20=20=20=20=20=20=20=20=20=20=20= package->definition=0A@@=20-236,6=20+237,9=20@@=20into=20a=20proper=20= sentence=20and=20by=20using=20two=20spaces=20between=20sentences."=0A=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20cleaned=20'pre=20".=20=20"=20'post)))=0A=20=0A=20(define*=20= (package-names->package-inputs=20names=20#:optional=20(output=20#f))=0A+=20= =20"Given=20a=20list=20of=20PACKAGE-NAMES,=20and=20an=20optional=20= OUTPUT,=20tries=20to=20generate=20a=0A+quoted=20list=20of=20inputs,=20as=20= suitable=20to=20use=20in=20an=20'inputs'=20field=20of=20a=20package=0A= +definition."=0A=20=20=20(map=20(lambda=20(input)=0A=20=20=20=20=20=20=20= =20=20=20(cons*=20input=20(list=20'unquote=20(string->symbol=20input))=0A= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20(or=20(and=20output=20(list=20output))=0A--=20=0A2.21.0=0A=0A= --Apple-Mail=_2C67887A-0A6D-4616-BC1E-C10D0957183E Content-Disposition: attachment; filename=0006-gnu-crate-add-unicode-xid.patch Content-Type: application/octet-stream; x-unix-mode=0644; name="0006-gnu-crate-add-unicode-xid.patch" Content-Transfer-Encoding: quoted-printable =46rom=20d6ee18d7df3af4b2a6ca445328c3c88cf145ffd5=20Mon=20Sep=2017=20= 00:00:00=202001=0AFrom:=20Ivan=20Petkov=20=0A= Date:=20Tue,=2016=20Apr=202019=2003:40:14=20-0700=0ASubject:=20[PATCH=20= 6/7]=20gnu:=20crate:=20add=20unicode-xid=0A=0Agnu/local.mk:=20= (GNU_SYSTEM_MODULES):=20Add=20new=20file.=0Agnu/packages/crates-io.scm:=20= (rust-unicode-xid):=20New=20variable.=0A---=0A=20gnu/local.mk=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20|=20=201=20+=0A=20= gnu/packages/crates-io.scm=20|=2045=20= ++++++++++++++++++++++++++++++++++++++=0A=202=20files=20changed,=2046=20= insertions(+)=0A=20create=20mode=20100644=20gnu/packages/crates-io.scm=0A= =0Adiff=20--git=20a/gnu/local.mk=20b/gnu/local.mk=0Aindex=20= 907641ff3e..048359ce4e=20100644=0A---=20a/gnu/local.mk=0A+++=20= b/gnu/local.mk=0A@@=20-121,6=20+121,7=20@@=20GNU_SYSTEM_MODULES=20=3D=09=09= =09=09\=0A=20=20=20%D%/packages/cpp.scm=20=09=09=09=09\=0A=20=20=20= %D%/packages/cppi.scm=09=09=09=09\=0A=20=20=20%D%/packages/cran.scm=09=09= =09=09\=0A+=20=20%D%/packages/crates-io.scm=09=09=09\=0A=20=20=20= %D%/packages/cross-base.scm=09=09=09\=0A=20=20=20%D%/packages/crypto.scm=09= =09=09\=0A=20=20=20%D%/packages/cryptsetup.scm=09=09=09\=0Adiff=20--git=20= a/gnu/packages/crates-io.scm=20b/gnu/packages/crates-io.scm=0Anew=20file=20= mode=20100644=0Aindex=200000000000..533fe0d21e=0A---=20/dev/null=0A+++=20= b/gnu/packages/crates-io.scm=0A@@=20-0,0=20+1,45=20@@=0A+;;;=20GNU=20= Guix=20---=20Functional=20package=20management=20for=20GNU=0A+;;;=20= Copyright=20=C2=A9=202019=20Ivan=20Petkov=20=0A= +;;;=0A+;;;=20This=20file=20is=20part=20of=20GNU=20Guix.=0A+;;;=0A+;;;=20= GNU=20Guix=20is=20free=20software;=20you=20can=20redistribute=20it=20= and/or=20modify=20it=0A+;;;=20under=20the=20terms=20of=20the=20GNU=20= General=20Public=20License=20as=20published=20by=0A+;;;=20the=20Free=20= Software=20Foundation;=20either=20version=203=20of=20the=20License,=20or=20= (at=0A+;;;=20your=20option)=20any=20later=20version.=0A+;;;=0A+;;;=20GNU=20= Guix=20is=20distributed=20in=20the=20hope=20that=20it=20will=20be=20= useful,=20but=0A+;;;=20WITHOUT=20ANY=20WARRANTY;=20without=20even=20the=20= implied=20warranty=20of=0A+;;;=20MERCHANTABILITY=20or=20FITNESS=20FOR=20= A=20PARTICULAR=20PURPOSE.=20=20See=20the=0A+;;;=20GNU=20General=20Public=20= License=20for=20more=20details.=0A+;;;=0A+;;;=20You=20should=20have=20= received=20a=20copy=20of=20the=20GNU=20General=20Public=20License=0A+;;;=20= along=20with=20GNU=20Guix.=20=20If=20not,=20see=20= .=0A+=0A+(define-module=20(gnu=20packages=20= crates-io)=0A+=20=20#:use-module=20(guix=20build-system=20cargo)=0A+=20=20= #:use-module=20(guix=20download)=0A+=20=20#:use-module=20((guix=20= licenses)=20#:prefix=20license:)=0A+=20=20#:use-module=20(guix=20= packages))=0A+=0A+(define-public=20rust-unicode-xid=0A+=20=20(package=0A= +=20=20=20=20(name=20"rust-unicode-xid")=0A+=20=20=20=20(version=20= "0.1.0")=0A+=20=20=20=20(source=0A+=20=20=20=20=20=20(origin=0A+=20=20=20= =20=20=20=20=20(method=20url-fetch)=0A+=20=20=20=20=20=20=20=20(uri=20= (crate-uri=20"unicode-xid"=20version))=0A+=20=20=20=20=20=20=20=20= (file-name=0A+=20=20=20=20=20=20=20=20=20=20(string-append=20name=20"-"=20= version=20".tar.gz"))=0A+=20=20=20=20=20=20=20=20(sha256=0A+=20=20=20=20=20= =20=20=20=20=20(base32=0A+=20=20=20=20=20=20=20=20=20=20=20=20= "1z57lqh4s18rr4x0j4fw4fmp9hf9346h0kmdgqsqx0fhjr3k0wpw"))))=0A+=20=20=20=20= (build-system=20cargo-build-system)=0A+=20=20=20=20(home-page=0A+=20=20=20= =20=20=20"https://github.com/unicode-rs/unicode-xid")=0A+=20=20=20=20= (synopsis=20"Determine=20Unicode=20XID=20related=20properties")=0A+=20=20= =20=20(description=20"Determine=20whether=20characters=20have=20the=20= XID_Start=0A+or=20XID_Continue=20properties=20according=20to=20Unicode=20= Standard=20Annex=20#31.")=0A+=20=20=20=20;;=20Dual=20licensed.=0A+=20=20=20= =20(license=20(list=20license:asl2.0=20license:expat))))=0A--=20=0A= 2.21.0=0A=0A= --Apple-Mail=_2C67887A-0A6D-4616-BC1E-C10D0957183E Content-Disposition: attachment; filename=0007-gnu-crate-Add-proc-macro2-and-quote.patch Content-Type: application/octet-stream; x-unix-mode=0644; name="0007-gnu-crate-Add-proc-macro2-and-quote.patch" Content-Transfer-Encoding: quoted-printable =46rom=204caa240fd6a245b89e640f6ef1fcaaf9a2b06c3e=20Mon=20Sep=2017=20= 00:00:00=202001=0AFrom:=20Ivan=20Petkov=20=0A= Date:=20Tue,=2016=20Apr=202019=2003:42:27=20-0700=0ASubject:=20[PATCH=20= 7/7]=20gnu:=20crate:=20Add=20proc-macro2=20and=20quote=0A=0A*=20= gnu/packages/crates-io.scm:=20(rust-proc-macro2):=20New=20variable.=0A= (rust-quote):=20New=20variable.=0A---=0A=20gnu/packages/crates-io.scm=20= |=2047=20++++++++++++++++++++++++++++++++++++++=0A=201=20file=20changed,=20= 47=20insertions(+)=0A=0Adiff=20--git=20a/gnu/packages/crates-io.scm=20= b/gnu/packages/crates-io.scm=0Aindex=20533fe0d21e..b480b6fe56=20100644=0A= ---=20a/gnu/packages/crates-io.scm=0A+++=20b/gnu/packages/crates-io.scm=0A= @@=20-43,3=20+43,50=20@@=0A=20or=20XID_Continue=20properties=20according=20= to=20Unicode=20Standard=20Annex=20#31.")=0A=20=20=20=20=20;;=20Dual=20= licensed.=0A=20=20=20=20=20(license=20(list=20license:asl2.0=20= license:expat))))=0A+=0A+(define-public=20rust-proc-macro2=0A+=20=20= (package=0A+=20=20=20=20(name=20"rust-proc-macro2")=0A+=20=20=20=20= (version=20"0.4.27")=0A+=20=20=20=20(source=0A+=20=20=20=20=20=20(origin=0A= +=20=20=20=20=20=20=20=20(method=20url-fetch)=0A+=20=20=20=20=20=20=20=20= (uri=20(crate-uri=20"proc-macro2"=20version))=0A+=20=20=20=20=20=20=20=20= (file-name=0A+=20=20=20=20=20=20=20=20=20=20(string-append=20name=20"-"=20= version=20".tar.gz"))=0A+=20=20=20=20=20=20=20=20(sha256=0A+=20=20=20=20=20= =20=20=20=20=20(base32=0A+=20=20=20=20=20=20=20=20=20=20=20=20= "05c92v787snyaq4ss16vxc9mdv6zndfgsdq8k3hnnyffmsf7ycad"))))=0A+=20=20=20=20= (build-system=20cargo-build-system)=0A+=20=20=20=20(arguments=0A+=20=20=20= =20=20=20`(#:cargo-inputs=20(("rust-unicode-xid"=20,rust-unicode-xid))=0A= +=20=20=20=20=20=20=20=20#:cargo-development-inputs=20(("rust-quote"=20= ,rust-quote))))=0A+=20=20=20=20(home-page=20= "https://github.com/alexcrichton/proc-macro2")=0A+=20=20=20=20(synopsis=20= "Stable=20implementation=20of=20the=20upcoming=20new=20`proc_macro`=20= API")=0A+=20=20=20=20(description=20"This=20package=20provides=20a=20= stable=20implementation=20of=20the=20upcoming=20new=0A+`proc_macro`=20= API.=20=20Comes=20with=20an=20option,=20off=20by=20default,=20to=20also=20= reimplement=20itself=0A+in=20terms=20of=20the=20upstream=20unstable=20= API.")=0A+=20=20=20=20;;=20Dual=20licensed.=0A+=20=20=20=20(license=20= (list=20license:asl2.0=20license:expat))))=0A+=0A+(define-public=20= rust-quote=0A+=20=20(package=0A+=20=20=20=20(name=20"rust-quote")=0A+=20=20= =20=20(version=20"0.6.12")=0A+=20=20=20=20(source=0A+=20=20=20=20=20=20= (origin=0A+=20=20=20=20=20=20=20=20(method=20url-fetch)=0A+=20=20=20=20=20= =20=20=20(uri=20(crate-uri=20"quote"=20version))=0A+=20=20=20=20=20=20=20= =20(file-name=0A+=20=20=20=20=20=20=20=20=20=20(string-append=20name=20= "-"=20version=20".tar.gz"))=0A+=20=20=20=20=20=20=20=20(sha256=0A+=20=20=20= =20=20=20=20=20=20=20(base32=0A+=20=20=20=20=20=20=20=20=20=20=20=20= "1nw0klza45hf127kfyrpxsxd5jw2l6h21qxalil3hkr7bnf7kx7s"))))=0A+=20=20=20=20= (build-system=20cargo-build-system)=0A+=20=20=20=20(arguments=0A+=20=20=20= =20=20=20`(#:cargo-inputs=20(("rust-proc-macro2"=20,rust-proc-macro2))))=0A= +=20=20=20=20(home-page=20"https://github.com/dtolnay/quote")=0A+=20=20=20= =20(synopsis=20"Quasi-quoting=20macro=20quote!(...)")=0A+=20=20=20=20= (description=20"Quasi-quoting=20macro=20quote!(...)")=0A+=20=20=20=20;;=20= Dual=20licensed.=0A+=20=20=20=20(license=20(list=20license:asl2.0=20= license:expat))))=0A--=20=0A2.21.0=0A=0A= --Apple-Mail=_2C67887A-0A6D-4616-BC1E-C10D0957183E-- From unknown Fri Jun 13 10:26:49 2025 MIME-Version: 1.0 X-Mailer: MIME-tools 5.505 (Entity 5.505) X-Loop: help-debbugs@gnu.org From: help-debbugs@gnu.org (GNU bug Tracking System) To: Ivan Petkov Subject: bug#35318: closed (Re: [bug#35318] [PATCH] Update cargo-build-system to expand package inputs) Message-ID: References: <87lfy7zjtw.fsf@garuda.local.i-did-not-set--mail-host-address--so-tickle-me> X-Gnu-PR-Message: they-closed 35318 X-Gnu-PR-Package: guix-patches X-Gnu-PR-Keywords: patch Reply-To: 35318@debbugs.gnu.org Date: Wed, 12 Jun 2019 01:15:02 +0000 Content-Type: multipart/mixed; boundary="----------=_1560302102-27036-1" This is a multi-part message in MIME format... ------------=_1560302102-27036-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Your bug report #35318: [PATCH] Update cargo-build-system to expand package inputs which was filed against the guix-patches package, has been closed. The explanation is attached below, along with your original report. If you require more details, please reply to 35318@debbugs.gnu.org. --=20 35318: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D35318 GNU Bug Tracking System Contact help-debbugs@gnu.org with problems ------------=_1560302102-27036-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at 35318-done) by debbugs.gnu.org; 12 Jun 2019 01:14:15 +0000 Received: from localhost ([127.0.0.1]:60401 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1harqB-00070o-Fd for submit@debbugs.gnu.org; Tue, 11 Jun 2019 21:14:15 -0400 Received: from mail-pl1-f176.google.com ([209.85.214.176]:42777) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1harq9-00070b-Hn for 35318-done@debbugs.gnu.org; Tue, 11 Jun 2019 21:14:14 -0400 Received: by mail-pl1-f176.google.com with SMTP id go2so5855283plb.9 for <35318-done@debbugs.gnu.org>; Tue, 11 Jun 2019 18:14:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=qa0D3Od0T+542D75K55ZCgBkecMBoiOjwpYleqfPQ2A=; b=WSmjcWy+jL8u88EA9tH2mjIzPOP45IKzw7yZ+CBJU7ZoSx3MOWCjoqnKrQGi4z6R4M CIYb8Mox7fuvrKWgMEeDTA3Kz0mkOCeEDxvj7d1P2snt9wj27ysjQuZGuIAcEGNxTKO0 8Fshkg7diN4GqZTr2bn9eFHpwBhTfHxumK1grYAa2+szANr20pKxedPXR/PRz/jW35Kn xmRjVCML4YLzzIZ32dAJIENUkHMa7dZ8SCWXH89rmj3RWm/gJnV78IYHcEMrwCOkbR7o fQ9wdNBAB6F8K8DG++BH+Z0542Mt2CqtEmJ4dWJ0o8P+SQL/8/anhNKE7YrSk3YogrlA 9IZg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version; bh=qa0D3Od0T+542D75K55ZCgBkecMBoiOjwpYleqfPQ2A=; b=X+G/HdlnLRtJGi3/5cJM4aHHYlTdXajSxd03a+xHN6czpY2V5rl7GChtEBHHELlQAj EB3CbC6hFLXl6pGfuIbbeV0jecwv124qO241yd2VzeYt8W3dO2CpL+8+cRGMwjvSfcoq TE9HwY+wgjIU9idzJQ2dF3XajcWotOeQtj1seJER9q0ji41chIpuYimhquRcXbmMTjfD ypXHxN5ZLsfUqELV1Rzigl+Zk8vWR+p1CCWfaRo9VTPgDYwsD7XZP768Trx/P1afusOi eRvmWCsikk0mu2pxhgV52LzzQeh5pnE5186Z5g3NvEmmNYXUWAazRVnZLAyGe/SAqxZN JDeQ== X-Gm-Message-State: APjAAAVFS9DQYsE9MtuwX4FQMWwWvGRMNzKymCdyj7njG23qIKvUJHnR 1KxkNkolmpsG6ioxbdOompLFUhS0o/o= X-Google-Smtp-Source: APXvYqxYSqgAO9yNh9bhd9P4e2FiH03WvWxE0WkW1qsDL6WQq/aFQpZyfGDRULTP0bTVLlotqpSZjg== X-Received: by 2002:a17:902:8b8b:: with SMTP id ay11mr78680970plb.63.1560302047058; Tue, 11 Jun 2019 18:14:07 -0700 (PDT) Received: from garuda.local ([2601:601:9d80:25b2::fa8]) by smtp.gmail.com with ESMTPSA id 188sm17119720pfg.11.2019.06.11.18.14.04 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 11 Jun 2019 18:14:05 -0700 (PDT) From: Chris Marusich X-Google-Original-From: Chris Marusich To: Ivan Petkov Subject: Re: [bug#35318] [PATCH] Update cargo-build-system to expand package inputs References: <87ftpsnhal.fsf@gnu.org> <2C03880B-F90E-4949-9637-DC918B6D40A0@gmail.com> <074E4899-C4FF-4A76-8E97-093378D2F8D5@gmail.com> <87pnojvqdu.fsf@gnu.org> <6A0A0108-A722-4D73-85B7-E61AB8230026@gmail.com> <87ftoj9as8.fsf@gmail.com> Date: Tue, 11 Jun 2019 18:14:03 -0700 In-Reply-To: (Ivan Petkov's message of "Sun, 9 Jun 2019 16:53:48 -0700") Message-ID: <87lfy7zjtw.fsf@garuda.local.i-did-not-set--mail-host-address--so-tickle-me> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux) MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha256; protocol="application/pgp-signature" X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 35318-done Cc: Danny Milosavljevic , Chris Marusich , 35318-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) --=-=-= Content-Type: text/plain Content-Transfer-Encoding: quoted-printable Hi Ivan, I've merged your changes as 2444abd9c124cc55f8f19a0462e06a2094f25a9d. Thank you for taking the time to write this patch series! Now let's start importing some crates! :-) Some minor feedback for next time (I've made these minor changes on your behalf already): =2D In the ChangeLog, we generally capitalize the heading and add a period. =2D In the manual, we put two spaces after periods, not one. =2D The tests/crate.scm began failing when you changed the importer logic; I have taken the liberty of fixing it. =2D When listing many parts that changed, you can write it like this, instead of listing it on 3 separate lines: (maybe-cargo-inputs, maybe-cargo-development-inputs) (maybe-arguments): Add them. That's all. Thanks again! I'm closing this now. =2D-=20 Chris --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEy/WXVcvn5+/vGD+x3UCaFdgiRp0FAl0AUdsACgkQ3UCaFdgi Rp0NRg/+JQcJWhJ52KOPVNksrQrzOutFo77x3NUAWPr5U5Tmf2QZw4PKreXS3OOB pk/G0jJm82LdycSzzPDAaTY5zhd7Oa2g3Mj+lJQjERxNd1YNl+52Gobs/4rddsrp HzLggtjMqpC5Szh3T6rzhnv5jz+Vpq38Sy/HLCYeFo9PSZY460z4MXXxCj9zNt07 4Qk4ULJNDgHyh/+8BYsObhND0/ROB9jJifjee8EGKuYn9xLGsF7Sk3uhyybEFdAX 7mh981bJKZ7JGU9kHoRuXVtlxpXmScBAdaoHlbXX6i07kWyLiQH4x3ZiBsDe2hl8 aw83gZYlgJX6oDxMIuzZr4NaYCP7uD/LpwRNT8jHjelkfvJnw7AaG7I6Ie7XI2DH GQsas018cwWOBzcNdtKdjnM2lWKJOwh3sz+0CzZR+R+XrVYP6kOK0/lMh38YBdD3 OKfnYGJqDpr54CmRJq5EiSI8+hiDGQgTj2vN6Gj7IYYho7vVd5E5Nte4uQ1yPTKA xjKMaSGYb1hXLyuYTqKpc4eqz2PpKJ/sV6jrb/PFV4rIT7LPkafyXySL7h8bepLZ r9eCfd7RA138K/9nilrDOiaTs5Kh230OjmctWnwCzFT9M+6ocVXf94+KPaC46D7l uTl8fhdj5Pg0BQs18Qmt3vNgJV2v+pWK+siEgLmkKVAwzgTTSg4= =PkkD -----END PGP SIGNATURE----- --=-=-=-- ------------=_1560302102-27036-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at submit) by debbugs.gnu.org; 19 Apr 2019 05:34:24 +0000 Received: from localhost ([127.0.0.1]:42903 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hHMAJ-0002Ok-SB for submit@debbugs.gnu.org; Fri, 19 Apr 2019 01:34:24 -0400 Received: from eggs.gnu.org ([209.51.188.92]:38741) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hHMAH-0002OY-Lz for submit@debbugs.gnu.org; Fri, 19 Apr 2019 01:34:22 -0400 Received: from lists.gnu.org ([209.51.188.17]:52996) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1hHMAC-0003Cn-Ft for submit@debbugs.gnu.org; Fri, 19 Apr 2019 01:34:16 -0400 Received: from eggs.gnu.org ([209.51.188.92]:53123) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hHMAB-0001Oc-8P for guix-patches@gnu.org; Fri, 19 Apr 2019 01:34:16 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50,FREEMAIL_FROM autolearn=disabled version=3.3.2 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hHMAA-0003CA-6Q for guix-patches@gnu.org; Fri, 19 Apr 2019 01:34:15 -0400 Received: from mail-pg1-x543.google.com ([2607:f8b0:4864:20::543]:41986) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hHMA9-0003BX-QW for guix-patches@gnu.org; Fri, 19 Apr 2019 01:34:14 -0400 Received: by mail-pg1-x543.google.com with SMTP id p6so2194922pgh.9 for ; Thu, 18 Apr 2019 22:34:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:mime-version:date:subject:cc:to:message-id; bh=7eD03KTjs23n1Bxq+YMPnHhIbfSn6VwcdlOKvFMPYxw=; b=JZgRZsju5zbl/0TMi3Dc2DighgUs3pku0FPQpEKAs6T7aJs7oolU3VPCP+hdbCanow L7kzwPDpmSo4cL4msbKCU8zxmC6t3/BP63jvdmULC8zi6FqvM+qhf2nClILi9WmYnalN nkXPfgdp+JLD14m+WZScR0nmXPVE0eRYME8hsdp1sSj+zxo80ox2c2i6nJQZACyUNMLv mrb8sPGdjKL0WexNxuL5UBRafTnwKPuw0BWKG5bybu/OiAiQQmvet+zhtzPsVi/28ebq lAkz5UqfJH0Gn3T0eYB1/2QhtVsa6w9f6QEIr17QqP3TwpgfpxTPEdAGPStORWeC3CRJ QSkw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:mime-version:date:subject:cc:to:message-id; bh=7eD03KTjs23n1Bxq+YMPnHhIbfSn6VwcdlOKvFMPYxw=; b=uRTwjGbYywdyv1D11qCFloSdWqrT0zyXsRQYe+mjUYOO58F1Hgy9zwgAACyYSr2u2m W1xCieQ0OZeHu64apL9SJhrFGqPKbvH9QGiZs9zZIDCDlzTPvQR9pn1EfiUtIAUUKOmu 26m48kL5J6T2ZO9fKZti+BQj7JgiRiGC7wRkyXG70MOU2blz/gny6IMgKI60NdP59Pdu SUrOqGUfXPkzivLz62PRBs5jjFdPTkKpghRTsEF2Dn+JYThQM6oDraH7QPS8OECwSfXy 58rDVAsx7E6as7LisDBUVmD/3/moYbzg7K6NIOYhYTmcqCCQRLlz3crc9Xpuhy7oA95j pcCg== X-Gm-Message-State: APjAAAUkK9C0mlMtNLyjX2oHTQlI3RCy2+26dbZA4/y5cAEeBeGu6tcX NlwN9jsx4J/YgrOziIqsFp825sbaiy57gA== X-Google-Smtp-Source: APXvYqwf7zNjLCNocDc0JRa/IRbiEzkKbtx/Q061QIQv7VvKYeTxJyDxO7k42LSX1yPxM3Jpx4LoIw== X-Received: by 2002:a62:b418:: with SMTP id h24mr1837256pfn.145.1555652051604; Thu, 18 Apr 2019 22:34:11 -0700 (PDT) Received: from ?IPv6:2601:602:9a00:1784:ad2d:2e19:4d0f:abb4? ([2601:602:9a00:1784:ad2d:2e19:4d0f:abb4]) by smtp.gmail.com with ESMTPSA id g4sm6904533pfc.75.2019.04.18.22.34.09 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 18 Apr 2019 22:34:10 -0700 (PDT) From: Ivan Petkov Content-Type: multipart/mixed; boundary="Apple-Mail=_DA76C889-91C6-47B0-A08C-2578701A12D6" Mime-Version: 1.0 (Mac OS X Mail 11.5 \(3445.9.1\)) Date: Thu, 18 Apr 2019 22:34:05 -0700 Subject: [PATCH] Update cargo-build-system to expand package inputs To: guix-patches@gnu.org Message-Id: X-Mailer: Apple Mail (2.3445.9.1) X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:4864:20::543 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Spam-Score: -1.3 (-) X-Debbugs-Envelope-To: submit Cc: Danny Milosavljevic , Chris Marusich X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.3 (--) --Apple-Mail=_DA76C889-91C6-47B0-A08C-2578701A12D6 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 When building, cargo requires the source of all transitive dependencies = to be present in its index. Rather than force package definitions to list out all transitive inputs, = the build system will automatically expand the inputs as necessary. Because it is possible for crates to have apparent cycles in their = native dependencies, the build system must take some measures to work around potential = cycles. This patch series takes an initial naive stab at resolving the problem, by never building = native-inputs. I plan on revisiting this sometime soon and making the system a bit more = intelligent (namely building native-inputs where possible and breaking any cycles). = But for now this should unblock working on package definitions. I=E2=80=99ve also included three rust crates as a proof of concept that = the system works and it handles potential native-input cycles. These crates do nothing on their own, but = they=E2=80=99re heavily depended upon by the rest of the crates ecosystem, so they will eventually be = useful to have in guix. =E2=80=94Ivan --Apple-Mail=_DA76C889-91C6-47B0-A08C-2578701A12D6 Content-Disposition: attachment; filename=0001-packages-allow-dynamic-input-closure-computation.patch Content-Type: application/octet-stream; x-unix-mode=0644; name="0001-packages-allow-dynamic-input-closure-computation.patch" Content-Transfer-Encoding: quoted-printable =46rom=20ca6dfd9451f22c4d6dc02aa7eceee0c35800dd57=20Mon=20Sep=2017=20= 00:00:00=202001=0AFrom:=20Ivan=20Petkov=20=0A= Date:=20Tue,=2016=20Apr=202019=2003:32:44=20-0700=0ASubject:=20[PATCH=20= 1/4]=20packages:=20allow=20dynamic=20input=20closure=20computation=0A=0A= *=20guix/packages:=20(transitive-inputs):=20Rename=20to=0A= package-transitive-dependencies.=0A(package-transitive-dependencies):=20= Add=20proc=20parameter=20and=20use=20it.=0A(transitive-inputs):=20Add=20= it.=0A---=0A=20guix/packages.scm=20|=2023=20+++++++++++++++++------=0A=20= 1=20file=20changed,=2017=20insertions(+),=206=20deletions(-)=0A=0Adiff=20= --git=20a/guix/packages.scm=20b/guix/packages.scm=0Aindex=20= c94a651f27..658b2427ca=20100644=0A---=20a/guix/packages.scm=0A+++=20= b/guix/packages.scm=0A@@=20-4,6=20+4,7=20@@=0A=20;;;=20Copyright=20=C2=A9=20= 2015=20Eric=20Bavier=20=0A=20;;;=20Copyright=20=C2=A9= =202016=20Alex=20Kost=20=0A=20;;;=20Copyright=20=C2=A9=20= 2017=20Efraim=20Flashner=20=0A+;;;=20Copyright=20= =C2=A9=202019=20Ivan=20Petkov=20=0A=20;;;=0A=20= ;;;=20This=20file=20is=20part=20of=20GNU=20Guix.=0A=20;;;=0A@@=20-95,6=20= +96,7=20@@=0A=20=20=20=20=20=20=20=20=20=20=20=20=20= package-direct-sources=0A=20=20=20=20=20=20=20=20=20=20=20=20=20= package-transitive-sources=0A=20=20=20=20=20=20=20=20=20=20=20=20=20= package-direct-inputs=0A+=20=20=20=20=20=20=20=20=20=20=20=20= package-transitive-dependencies=0A=20=20=20=20=20=20=20=20=20=20=20=20=20= package-transitive-inputs=0A=20=20=20=20=20=20=20=20=20=20=20=20=20= package-transitive-target-inputs=0A=20=20=20=20=20=20=20=20=20=20=20=20=20= package-transitive-native-inputs=0A@@=20-650,13=20+652,13=20@@=20= specifies=20modules=20in=20scope=20when=20evaluating=20SNIPPET."=0A=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= #:deprecation-warnings=20#t=20;to=20avoid=20a=20rebuild=0A=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= #:guile-for-build=20guile-for-build))))=0A=20=0A-(define=20= (transitive-inputs=20inputs)=0A-=20=20"Return=20the=20closure=20of=20= INPUTS=20when=20considering=20the=20'propagated-inputs'=0A-edges.=20=20= Omit=20duplicate=20inputs,=20except=20for=20those=20already=20present=20= in=20INPUTS=0A-itself.=0A+(define=20(package-transitive-dependencies=20= inputs=20proc)=0A+=20=20"Return=20the=20closure=20of=20INPUTS=20when=20= considering=20the=20edges=20extracted=0A+from=20each=20package=20via=20= PROC.=20=20Omit=20duplicate=20inputs,=20except=20for=20those=0A+already=20= present=20in=20INPUTS=20itself.=0A=20=0A=20This=20is=20implemented=20as=20= a=20breadth-first=20traversal=20such=20that=20INPUTS=20is=0A-preserved,=20= and=20only=20duplicate=20propagated=20inputs=20are=20removed."=0A= +preserved,=20and=20only=20duplicate=20extracted=20inputs=20are=20= removed."=0A=20=20=20(define=20(seen?=20seen=20item=20outputs)=0A=20=20=20= =20=20;;=20FIXME:=20We're=20using=20pointer=20identity=20here,=20which=20= is=20extremely=20sensitive=0A=20=20=20=20=20;;=20to=20memoization=20in=20= package-producing=20procedures;=20see=0A@@=20-680,7=20+682,7=20@@=20= preserved,=20and=20only=20duplicate=20propagated=20inputs=20are=20= removed."=0A=20=20=20=20=20=20=20=20=20=20=20=20(loop=20rest=20result=20= propagated=20first?=20seen)=0A=20=20=20=20=20=20=20=20=20=20=20=20(loop=20= rest=0A=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20(cons=20= input=20result)=0A-=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= (cons=20(package-propagated-inputs=20package)=20propagated)=0A+=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20(cons=20(proc=20package)=20= propagated)=0A=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= first?=0A=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= (vhash-consq=20package=20outputs=20seen))))=0A=20=20=20=20=20=20=20= ((input=20rest=20...)=0A@@=20-696,6=20+698,15=20@@=20PACKAGE's=20= inputs."=0A=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= (_=20#f))=0A=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= (package-direct-inputs=20package))))=0A=20=0A+(define=20= (transitive-inputs=20inputs)=0A+=20=20"Return=20the=20closure=20of=20= INPUTS=20when=20considering=20the=20'propagated-inputs'=0A+edges.=20=20= Omit=20duplicate=20inputs,=20except=20for=20those=20already=20present=20= in=20INPUTS=0A+itself.=0A+=0A+This=20is=20implemented=20as=20a=20= breadth-first=20traversal=20such=20that=20INPUTS=20is=0A+preserved,=20= and=20only=20duplicate=20propagated=20inputs=20are=20removed."=0A+=20=20= (package-transitive-dependencies=20inputs=20package-propagated-inputs))=0A= +=0A=20(define=20(package-transitive-sources=20package)=0A=20=20=20= "Return=20PACKAGE's=20direct=20sources,=20and=20their=20direct=20= sources,=20recursively."=0A=20=20=20(delete-duplicates=0A--=20=0A2.21.0=0A= =0A= --Apple-Mail=_DA76C889-91C6-47B0-A08C-2578701A12D6 Content-Disposition: attachment; filename=0002-build-system-cargo-expand-transitive-package-inputs.patch Content-Type: application/octet-stream; x-unix-mode=0644; name="0002-build-system-cargo-expand-transitive-package-inputs.patch" Content-Transfer-Encoding: quoted-printable =46rom=207b42290f238d5ab50d83232ec6d95db665a98302=20Mon=20Sep=2017=20= 00:00:00=202001=0AFrom:=20Ivan=20Petkov=20=0A= Date:=20Tue,=2016=20Apr=202019=2003:37:44=20-0700=0ASubject:=20[PATCH=20= 2/4]=20build-system/cargo:=20expand=20transitive=20package=20inputs=0A=0A= *=20guix/build/cargo:=20(package-target-inputs):=20Add=20it.=0A= (expand-inputs):=20Add=20it.=0A(expand-native-inputs):=20Add=20it.=0A= (lower):=20Use=20new=20variables.=0A---=0A=20guix/build-system/cargo.scm=20= |=2066=20+++++++++++++++++++++++++++++++++++--=0A=201=20file=20changed,=20= 64=20insertions(+),=202=20deletions(-)=0A=0Adiff=20--git=20= a/guix/build-system/cargo.scm=20b/guix/build-system/cargo.scm=0Aindex=20= dc137421e9..65dcd5d339=20100644=0A---=20a/guix/build-system/cargo.scm=0A= +++=20b/guix/build-system/cargo.scm=0A@@=20-121,6=20+121,68=20@@=20to=20= NAME=20and=20VERSION."=0A=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20#:outputs=20(cons=20= "src"=20outputs)=0A=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20#:guile-for-build=20= guile-for-build))=0A=20=0A+(define=20package-target-inputs=0A+=20=20= (lambda=20(pkg)=0A+=20=20=20=20(append=20(package-inputs=20pkg)=0A+=20=20= =20=20=20=20=20=20=20=20=20=20(package-propagated-inputs=20pkg))))=0A+=0A= +(define*=20(expand-inputs=20inputs)=0A+=20=20"Return=20the=20transitive=20= target=20inputs=20for=20each=20package=20in=20INPUTS.=0A+=0A+Cargo=20= requires=20all=20transitive=20crate=20dependencies=20to=20be=20available=20= in=20its=20index,=0A+even=20if=20they=20are=20optional=20(this=20is=20so=20= it=20can=20generate=20deterministic=0A+Cargo.lock=20files=20regardless=20= of=20the=20target=20platform=20or=20enabled=20features).=0A+=0A+Rather=20= than=20burden=20the=20package=20definition=20to=20expand=20these,=20= we'll=20automate=0A+that=20process=20in=20the=20build=20system."=0A+=20=20= (package-transitive-dependencies=20inputs=20package-target-inputs))=0A+=0A= +(define*=20(expand-native-inputs=20native-inputs)=0A+=20=20"Return=20= the=20transitive=20target=20inputs=20for=20each=20package=20in=20= NATIVE-INPUTS.=0A+=0A+We=20need=20all=20transitive=20crate=20= dependencies=20for=20any=20cargo=20dev-dependencies,=0A+but=20this=20is=20= only=20needed=20when=20building/testing=20a=20crate=20directly=0A+(i.e.=20= we=20will=20never=20need=20transitive=20dev-dependencies=20for=20any=20= dependency=0A+crates).=0A+=0A+In=20addition,=20we=20need=20to=20modify=20= any=20native-inputs=20to=20avoid=20any=20apparent=0A+cycles.=20Cargo=20= does=20not=20permit=20cyclic=20dependencies=20between=20crates,=20= however,=0A+it=20permits=20cycles=20to=20occur=20via=20dev-dependencies.=20= For=20example,=20if=20crate=20X=0A+depends=20on=20crate=20Y,=20crate=20= Y's=20tests=20could=20pull=20in=20crate=20X=20to=20to=20verify=0A= +everything=20builds=20properly=20(this=20is=20a=20rare=20scenario,=20= but=20it=20it=20happens=20for=0A+example=20with=20the=20`proc-macro2`=20= and=20`quote`=20crates).=20This=20is=20allowed=20by=20cargo=0A+because=20= tests=20are=20built=20as=20a=20pseudo-crate=20which=20happens=20to=20= depend=20on=20the=0A+X=20and=20Y=20crates,=20forming=20an=20acyclic=20= graph.=0A+=0A+Cargo=20ultimately=20needs=20only=20the=20crate=20sources=20= available=20when=20doing=20a=20build.=0A+Ultimately,=20if=20a=20cycle=20= is=20detected,=20we=20can=20break=20it=20by=20replacing=20the=20current=0A= +crate=20we're=20trying=20to=20build=20with=20a=20no-op=20build=20which=20= only=20packages=20the=20crate=0A+source;=20cargo=20will=20then=20find=20= the=20source=20available=20in=20its=20index=20and=20build=20things=0A= +properly."=0A+=20=20(map=0A+=20=20=20=20(lambda=20(dep)=0A+=20=20=20=20=20= =20(match=20dep=0A+=20=20=20=20=20=20=20((name=20input=20rest=20...)=0A+=20= =20=20=20=20=20=20=20;;=20TODO:=20Starting=20out=20real=20simple=20by=20= ensuring=20no=20native-inputs=20are=0A+=20=20=20=20=20=20=20=20;;=20= actually=20built=20so=20we=20don't=20accidentally=20hit=20a=20cycle.=20= We=20can=20revisit=0A+=20=20=20=20=20=20=20=20;;=20this=20later=20and=20= more=20intelligently=20replace=20any=20dependency=20on=20the=20cycle=0A+=20= =20=20=20=20=20=20=20;;=20root=20with=20a=20version=20of=20the=20root=20= with=20#:skip-build?=20enabled.=0A+=20=20=20=20=20=20=20=20;;=0A+=20=20=20= =20=20=20=20=20;;=20Right=20now=20this=20means=20that=20if=20a=20package=20= shows=20up=20in=20both=20input=0A+=20=20=20=20=20=20=20=20;;=20and=20= native-input=20closures,=20we'll=20try=20to=20build=20it's=20src=20= output=20twice.=0A+=20=20=20=20=20=20=20=20;;=0A+=20=20=20=20=20=20=20=20= ;;=20This=20also=20means=20that=20we're=20potentially=20setting=20the=20= #:skip-build?=0A+=20=20=20=20=20=20=20=20;;=20flag=20on=20non=20= cargo-build-system=20packages,=20but=20this=20should=20be=20okay=0A+=20=20= =20=20=20=20=20=20;;=20for=20now.=0A+=20=20=20=20=20=20=20=20(let*=20= ((translated-input=20(package=0A+=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20(inherit=20= input)=0A+=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20(inputs=20'())=0A+=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20(propagated-inputs=20'())=0A+=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= (native-inputs=20'())=0A+=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20(arguments=20= '(#:skip-build?=20#t)))))=0A+=20=20=20=20=20=20=20=20=20=20`(,name=20= ,translated-input=20,@rest)))))=0A+=20=20=20= (package-transitive-dependencies=20native-inputs=20= package-target-inputs)))=0A+=0A=20(define*=20(lower=20name=0A=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20#:key=20source=20inputs=20= native-inputs=20outputs=20system=20target=0A=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20(rust=20(default-rust))=0A@@=20-139,13=20+201,13=20= @@=20to=20NAME=20and=20VERSION."=0A=20=20=20=20=20=20=20=20=20=20= (host-inputs=20`(,@(if=20source=0A=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20`(("source"=20= ,source))=0A=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20'())=0A-=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20,@inputs=0A+=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20,@(expand-inputs=20inputs)=0A= =20=0A=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20;;=20Keep=20the=20standard=20inputs=20of=20'gnu-build-system'=0A=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= ,@(standard-packages)))=0A=20=20=20=20=20=20=20=20=20=20(build-inputs=20= `(("cargo"=20,rust=20"cargo")=0A=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20("rustc"=20,rust)=0A-=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= ,@native-inputs))=0A+=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20,@(expand-native-inputs=20native-inputs)))=0A=20=20=20= =20=20=20=20=20=20=20(outputs=20outputs)=0A=20=20=20=20=20=20=20=20=20=20= (build=20cargo-build)=0A=20=20=20=20=20=20=20=20=20=20(arguments=20= (strip-keyword-arguments=20private-keywords=20arguments)))))=0A--=20=0A= 2.21.0=0A=0A= --Apple-Mail=_DA76C889-91C6-47B0-A08C-2578701A12D6 Content-Disposition: attachment; filename=0003-gnu-crate-add-unicode-xid.patch Content-Type: application/octet-stream; x-unix-mode=0644; name="0003-gnu-crate-add-unicode-xid.patch" Content-Transfer-Encoding: quoted-printable =46rom=20922e985c684b4fcafe30f1c25d698396ffb58191=20Mon=20Sep=2017=20= 00:00:00=202001=0AFrom:=20Ivan=20Petkov=20=0A= Date:=20Tue,=2016=20Apr=202019=2003:40:14=20-0700=0ASubject:=20[PATCH=20= 3/4]=20gnu:=20crate:=20add=20unicode-xid=0A=0Agnu/local.mk:=20= (GNU_SYSTEM_MODULES):=20Add=20new=20file.=0Agnu/packages/crates-io.scm:=20= (rust-unicode-xid):=20New=20variable.=0A---=0A=20gnu/local.mk=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20|=20=201=20+=0A=20= gnu/packages/crates-io.scm=20|=2045=20= ++++++++++++++++++++++++++++++++++++++=0A=202=20files=20changed,=2046=20= insertions(+)=0A=20create=20mode=20100644=20gnu/packages/crates-io.scm=0A= =0Adiff=20--git=20a/gnu/local.mk=20b/gnu/local.mk=0Aindex=20= 41924a7de5..bf44af76b7=20100644=0A---=20a/gnu/local.mk=0A+++=20= b/gnu/local.mk=0A@@=20-121,6=20+121,7=20@@=20GNU_SYSTEM_MODULES=20=3D=09=09= =09=09\=0A=20=20=20%D%/packages/cpp.scm=20=09=09=09=09\=0A=20=20=20= %D%/packages/cppi.scm=09=09=09=09\=0A=20=20=20%D%/packages/cran.scm=09=09= =09=09\=0A+=20=20%D%/packages/crates-io.scm=09=09=09\=0A=20=20=20= %D%/packages/cross-base.scm=09=09=09\=0A=20=20=20%D%/packages/crypto.scm=09= =09=09\=0A=20=20=20%D%/packages/cryptsetup.scm=09=09=09\=0Adiff=20--git=20= a/gnu/packages/crates-io.scm=20b/gnu/packages/crates-io.scm=0Anew=20file=20= mode=20100644=0Aindex=200000000000..533fe0d21e=0A---=20/dev/null=0A+++=20= b/gnu/packages/crates-io.scm=0A@@=20-0,0=20+1,45=20@@=0A+;;;=20GNU=20= Guix=20---=20Functional=20package=20management=20for=20GNU=0A+;;;=20= Copyright=20=C2=A9=202019=20Ivan=20Petkov=20=0A= +;;;=0A+;;;=20This=20file=20is=20part=20of=20GNU=20Guix.=0A+;;;=0A+;;;=20= GNU=20Guix=20is=20free=20software;=20you=20can=20redistribute=20it=20= and/or=20modify=20it=0A+;;;=20under=20the=20terms=20of=20the=20GNU=20= General=20Public=20License=20as=20published=20by=0A+;;;=20the=20Free=20= Software=20Foundation;=20either=20version=203=20of=20the=20License,=20or=20= (at=0A+;;;=20your=20option)=20any=20later=20version.=0A+;;;=0A+;;;=20GNU=20= Guix=20is=20distributed=20in=20the=20hope=20that=20it=20will=20be=20= useful,=20but=0A+;;;=20WITHOUT=20ANY=20WARRANTY;=20without=20even=20the=20= implied=20warranty=20of=0A+;;;=20MERCHANTABILITY=20or=20FITNESS=20FOR=20= A=20PARTICULAR=20PURPOSE.=20=20See=20the=0A+;;;=20GNU=20General=20Public=20= License=20for=20more=20details.=0A+;;;=0A+;;;=20You=20should=20have=20= received=20a=20copy=20of=20the=20GNU=20General=20Public=20License=0A+;;;=20= along=20with=20GNU=20Guix.=20=20If=20not,=20see=20= .=0A+=0A+(define-module=20(gnu=20packages=20= crates-io)=0A+=20=20#:use-module=20(guix=20build-system=20cargo)=0A+=20=20= #:use-module=20(guix=20download)=0A+=20=20#:use-module=20((guix=20= licenses)=20#:prefix=20license:)=0A+=20=20#:use-module=20(guix=20= packages))=0A+=0A+(define-public=20rust-unicode-xid=0A+=20=20(package=0A= +=20=20=20=20(name=20"rust-unicode-xid")=0A+=20=20=20=20(version=20= "0.1.0")=0A+=20=20=20=20(source=0A+=20=20=20=20=20=20(origin=0A+=20=20=20= =20=20=20=20=20(method=20url-fetch)=0A+=20=20=20=20=20=20=20=20(uri=20= (crate-uri=20"unicode-xid"=20version))=0A+=20=20=20=20=20=20=20=20= (file-name=0A+=20=20=20=20=20=20=20=20=20=20(string-append=20name=20"-"=20= version=20".tar.gz"))=0A+=20=20=20=20=20=20=20=20(sha256=0A+=20=20=20=20=20= =20=20=20=20=20(base32=0A+=20=20=20=20=20=20=20=20=20=20=20=20= "1z57lqh4s18rr4x0j4fw4fmp9hf9346h0kmdgqsqx0fhjr3k0wpw"))))=0A+=20=20=20=20= (build-system=20cargo-build-system)=0A+=20=20=20=20(home-page=0A+=20=20=20= =20=20=20"https://github.com/unicode-rs/unicode-xid")=0A+=20=20=20=20= (synopsis=20"Determine=20Unicode=20XID=20related=20properties")=0A+=20=20= =20=20(description=20"Determine=20whether=20characters=20have=20the=20= XID_Start=0A+or=20XID_Continue=20properties=20according=20to=20Unicode=20= Standard=20Annex=20#31.")=0A+=20=20=20=20;;=20Dual=20licensed.=0A+=20=20=20= =20(license=20(list=20license:asl2.0=20license:expat))))=0A--=20=0A= 2.21.0=0A=0A= --Apple-Mail=_DA76C889-91C6-47B0-A08C-2578701A12D6 Content-Disposition: attachment; filename=0004-gnu-crate-Add-proc-macro2-and-quote.patch Content-Type: application/octet-stream; x-unix-mode=0644; name="0004-gnu-crate-Add-proc-macro2-and-quote.patch" Content-Transfer-Encoding: quoted-printable =46rom=2070f96162e55ac1d1116a5d94134d61aa769f8be7=20Mon=20Sep=2017=20= 00:00:00=202001=0AFrom:=20Ivan=20Petkov=20=0A= Date:=20Tue,=2016=20Apr=202019=2003:42:27=20-0700=0ASubject:=20[PATCH=20= 4/4]=20gnu:=20crate:=20Add=20proc-macro2=20and=20quote=0A=0A*=20= gnu/packages/crates-io.scm:=20(rust-proc-macro2):=20New=20variable.=0A= (rust-quote):=20New=20variable.=0A---=0A=20gnu/packages/crates-io.scm=20= |=2048=20++++++++++++++++++++++++++++++++++++++=0A=201=20file=20changed,=20= 48=20insertions(+)=0A=0Adiff=20--git=20a/gnu/packages/crates-io.scm=20= b/gnu/packages/crates-io.scm=0Aindex=20533fe0d21e..90e08731ea=20100644=0A= ---=20a/gnu/packages/crates-io.scm=0A+++=20b/gnu/packages/crates-io.scm=0A= @@=20-43,3=20+43,51=20@@=0A=20or=20XID_Continue=20properties=20according=20= to=20Unicode=20Standard=20Annex=20#31.")=0A=20=20=20=20=20;;=20Dual=20= licensed.=0A=20=20=20=20=20(license=20(list=20license:asl2.0=20= license:expat))))=0A+=0A+(define-public=20rust-proc-macro2=0A+=20=20= (package=0A+=20=20=20=20(name=20"rust-proc-macro2")=0A+=20=20=20=20= (version=20"0.4.27")=0A+=20=20=20=20(source=0A+=20=20=20=20=20=20(origin=0A= +=20=20=20=20=20=20=20=20(method=20url-fetch)=0A+=20=20=20=20=20=20=20=20= (uri=20(crate-uri=20"proc-macro2"=20version))=0A+=20=20=20=20=20=20=20=20= (file-name=0A+=20=20=20=20=20=20=20=20=20=20(string-append=20name=20"-"=20= version=20".tar.gz"))=0A+=20=20=20=20=20=20=20=20(sha256=0A+=20=20=20=20=20= =20=20=20=20=20(base32=0A+=20=20=20=20=20=20=20=20=20=20=20=20= "05c92v787snyaq4ss16vxc9mdv6zndfgsdq8k3hnnyffmsf7ycad"))))=0A+=20=20=20=20= (build-system=20cargo-build-system)=0A+=20=20=20=20(native-inputs=0A+=20=20= =20=20=20=20`(("rust-quote"=20,rust-quote=20"src")))=0A+=20=20=20=20= (inputs=0A+=20=20=20=20=20=20`(("rust-unicode-xid"=20,rust-unicode-xid=20= "src")))=0A+=20=20=20=20(home-page=20= "https://github.com/alexcrichton/proc-macro2")=0A+=20=20=20=20(synopsis=20= "Stable=20implementation=20of=20the=20upcoming=20new=20`proc_macro`=20= API")=0A+=20=20=20=20(description=20"This=20package=20provides=20a=20= stable=20implementation=20of=20the=20upcoming=20new=0A+`proc_macro`=20= API.=20=20Comes=20with=20an=20option,=20off=20by=20default,=20to=20also=20= reimplement=20itself=0A+in=20terms=20of=20the=20upstream=20unstable=20= API.")=0A+=20=20=20=20;;=20Dual=20licensed.=0A+=20=20=20=20(license=20= (list=20license:asl2.0=20license:expat))))=0A+=0A+(define-public=20= rust-quote=0A+=20=20(package=0A+=20=20=20=20(name=20"rust-quote")=0A+=20=20= =20=20(version=20"0.6.12")=0A+=20=20=20=20(source=0A+=20=20=20=20=20=20= (origin=0A+=20=20=20=20=20=20=20=20(method=20url-fetch)=0A+=20=20=20=20=20= =20=20=20(uri=20(crate-uri=20"quote"=20version))=0A+=20=20=20=20=20=20=20= =20(file-name=0A+=20=20=20=20=20=20=20=20=20=20(string-append=20name=20= "-"=20version=20".tar.gz"))=0A+=20=20=20=20=20=20=20=20(sha256=0A+=20=20=20= =20=20=20=20=20=20=20(base32=0A+=20=20=20=20=20=20=20=20=20=20=20=20= "1nw0klza45hf127kfyrpxsxd5jw2l6h21qxalil3hkr7bnf7kx7s"))))=0A+=20=20=20=20= (build-system=20cargo-build-system)=0A+=20=20=20=20(inputs=0A+=20=20=20=20= =20=20`(("rust-proc-macro2"=20,rust-proc-macro2=20"src")))=0A+=20=20=20=20= (home-page=20"https://github.com/dtolnay/quote")=0A+=20=20=20=20= (synopsis=20"Quasi-quoting=20macro=20quote!(...)")=0A+=20=20=20=20= (description=20"Quasi-quoting=20macro=20quote!(...)")=0A+=20=20=20=20;;=20= Dual=20licensed.=0A+=20=20=20=20(license=20(list=20license:asl2.0=20= license:expat))))=0A--=20=0A2.21.0=0A=0A= --Apple-Mail=_DA76C889-91C6-47B0-A08C-2578701A12D6 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=us-ascii --Apple-Mail=_DA76C889-91C6-47B0-A08C-2578701A12D6-- ------------=_1560302102-27036-1--