From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([209.51.188.92]:52549) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hTXbl-0002KE-V4 for guix-patches@gnu.org; Wed, 22 May 2019 16:13:06 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hTXbk-0002bV-DI for guix-patches@gnu.org; Wed, 22 May 2019 16:13:05 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:57715) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hTXbi-0002aS-P8 for guix-patches@gnu.org; Wed, 22 May 2019 16:13:04 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1hTXbi-0005qf-FW for guix-patches@gnu.org; Wed, 22 May 2019 16:13:02 -0400 Subject: [bug#35859] [PATCH] hackage import: Setup.hs generation and revision support Resent-Message-ID: Received: from eggs.gnu.org ([209.51.188.92]:52400) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hTXb6-0002J1-96 for guix-patches@gnu.org; Wed, 22 May 2019 16:12:25 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hTXb5-0002Ck-AM for guix-patches@gnu.org; Wed, 22 May 2019 16:12:24 -0400 Received: from mx2a.mailbox.org ([2001:67c:2050:104:0:2:25:2]:62768 helo=mx2.mailbox.org) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1hTXb3-00023X-3j for guix-patches@gnu.org; Wed, 22 May 2019 16:12:23 -0400 Received: from smtp2.mailbox.org (smtp2.mailbox.org [80.241.60.241]) (using TLSv1.2 with cipher ECDHE-RSA-CHACHA20-POLY1305 (256/256 bits)) (No client certificate requested) by mx2.mailbox.org (Postfix) with ESMTPS id 81FDEA29ED for ; Wed, 22 May 2019 22:12:10 +0200 (CEST) Received: from smtp2.mailbox.org ([80.241.60.241]) by gerste.heinlein-support.de (gerste.heinlein-support.de [91.198.250.173]) (amavisd-new, port 10030) with ESMTP id OAIBlOY8MfWu for ; Wed, 22 May 2019 22:11:50 +0200 (CEST) From: Robert Vollmert Content-Type: multipart/mixed; boundary="Apple-Mail=_BDC1C73C-B364-49AE-93AE-4AA935BAE22B" Mime-Version: 1.0 (Mac OS X Mail 12.4 \(3445.104.11\)) Message-Id: <72F268CC-5FB7-421C-B6F7-B47EAAB823C1@vllmrt.net> Date: Wed, 22 May 2019 22:11:50 +0200 List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+kyle=kyleam.com@gnu.org Sender: "Guix-patches" To: 35859@debbugs.gnu.org --Apple-Mail=_BDC1C73C-B364-49AE-93AE-4AA935BAE22B Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=us-ascii These patches are on top of https://debbugs.gnu.org/cgi/bugreport.cgi?bug=35812 (fix cabal tests) https://debbugs.gnu.org/cgi/bugreport.cgi?bug=35846 (braced properties) - substitute missing Setup.hs and remove manual per-package workarounds - handle hackage metadata revisions I believe the code works, but some may not be the most idiomatic scheme code. Particularly around building the quoted argument list and returning a pair of cabal data and hash. --Apple-Mail=_BDC1C73C-B364-49AE-93AE-4AA935BAE22B Content-Disposition: attachment; filename=0001-gnu-ghc-easy-plot-remove-superfluous-Setup.hs-rename.patch Content-Type: application/octet-stream; x-unix-mode=0644; name="0001-gnu-ghc-easy-plot-remove-superfluous-Setup.hs-rename.patch" Content-Transfer-Encoding: quoted-printable =46rom=2044c8df36d718940bcb1081e17dad17e2df42dd78=20Mon=20Sep=2017=20= 00:00:00=202001=0AFrom:=20Robert=20Vollmert=20=0ADate:=20= Fri,=2017=20May=202019=2016:28:44=20+0200=0ASubject:=20[PATCH=201/5]=20= gnu:=20ghc-easy-plot:=20remove=20superfluous=20Setup.hs=20rename=0A=20= step=0A=0Ahaskell-build-system=20already=20uses=20whichever=20of=20= Setup.hs=20and=0ASetup.lhs=20exists.=0A=0A*=20gnu/packages/haskell.scm=20= (ghc-easy-plot):=20don't=20rename=0ASetup.lhs=20to=20Setup.hs=0A---=0A=20= gnu/packages/haskell.scm=20|=204=20----=0A=201=20file=20changed,=204=20= deletions(-)=0A=0Adiff=20--git=20a/gnu/packages/haskell.scm=20= b/gnu/packages/haskell.scm=0Aindex=2061c6119322..c40581a8cd=20100644=0A= ---=20a/gnu/packages/haskell.scm=0A+++=20b/gnu/packages/haskell.scm=0A@@=20= -8063,10=20+8063,6=20@@=20interface=20for=20statistics=20based=20on=20= hmatrix=20and=20GSL.")=0A=20=20=20=20=20=20=20=20=20(base32=20= "18kndgvdj2apjpfga6fp7m16y1gx8zrwp3c5vfj03sx4v6jvciqk"))))=0A=20=20=20=20= =20(build-system=20haskell-build-system)=0A=20=20=20=20=20= (propagated-inputs=20`(("gnuplot"=20,gnuplot)))=0A-=20=20=20=20= (arguments=0A-=20=20=20=20=20`(#:phases=20(modify-phases=20= %standard-phases=0A-=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= (add-after=20'unpack=20'fix-setup-suffix=0A-=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20(lambda=20_=20(rename-file=20"Setup.lhs"=20= "Setup.hs")=20#t)))))=0A=20=20=20=20=20(home-page=20= "https://hub.darcs.net/scravy/easyplot")=0A=20=20=20=20=20(synopsis=20= "Haskell=20plotting=20library=20based=20on=20gnuplot")=0A=20=20=20=20=20= (description=20"This=20package=20provides=20a=20plotting=20library=20for=0A= --=20=0A2.21.0=0A=0A= --Apple-Mail=_BDC1C73C-B364-49AE-93AE-4AA935BAE22B Content-Disposition: attachment; filename=0002-guix-haskell-build-system-correct-haddock-phase-docu.patch Content-Type: application/octet-stream; x-unix-mode=0644; name="0002-guix-haskell-build-system-correct-haddock-phase-docu.patch" Content-Transfer-Encoding: quoted-printable =46rom=2059fa86edcda6769bd5d9fb90342302a26e231e65=20Mon=20Sep=2017=20= 00:00:00=202001=0AFrom:=20Robert=20Vollmert=20=0ADate:=20= Fri,=2017=20May=202019=2018:58:55=20+0200=0ASubject:=20[PATCH=202/5]=20= guix:=20haskell-build-system:=20correct=20haddock=20phase=0A=20= documentation=0A=0A*=20guix/build/haskell-build-system.scm=20(haddock):=20= Correct=20docstring=0A---=0A=20guix/build/haskell-build-system.scm=20|=20= 2=20+-=0A=201=20file=20changed,=201=20insertion(+),=201=20deletion(-)=0A=0A= diff=20--git=20a/guix/build/haskell-build-system.scm=20= b/guix/build/haskell-build-system.scm=0Aindex=2023d97e6602..5c5b32322b=20= 100644=0A---=20a/guix/build/haskell-build-system.scm=0A+++=20= b/guix/build/haskell-build-system.scm=0A@@=20-260,7=20+260,7=20@@=20= given=20Haskell=20package."=0A=20=20=20#t)=0A=20=0A=20(define*=20= (haddock=20#:key=20outputs=20haddock?=20haddock-flags=20= #:allow-other-keys)=0A-=20=20"Run=20the=20test=20suite=20of=20a=20given=20= Haskell=20package."=0A+=20=20"Generate=20haddock=20documentation=20of=20= a=20given=20Haskell=20package."=0A=20=20=20(when=20haddock?=0A=20=20=20=20= =20(run-setuphs=20"haddock"=20haddock-flags))=0A=20=20=20#t)=0A--=20=0A= 2.21.0=0A=0A= --Apple-Mail=_BDC1C73C-B364-49AE-93AE-4AA935BAE22B Content-Disposition: attachment; filename=0003-guix-haskell-build-system-generate-Setup.hs-if-not-e.patch Content-Type: application/octet-stream; x-unix-mode=0644; name="0003-guix-haskell-build-system-generate-Setup.hs-if-not-e.patch" Content-Transfer-Encoding: quoted-printable =46rom=209c2c8202f490a20340e2db5522a5813f0dd7183f=20Mon=20Sep=2017=20= 00:00:00=202001=0AFrom:=20Robert=20Vollmert=20=0ADate:=20= Fri,=2017=20May=202019=2016:26:31=20+0200=0ASubject:=20[PATCH=203/5]=20= guix:=20haskell-build-system:=20generate=20Setup.hs=20if=20not=0A=20= exists=0A=0AThe=20default=20Setup.hs=20is=20boilerplate=20that=20is=20= frequently=20left=20out=20of=0Asource=20packages,=20causing=20build=20= failure=20for=20package=20definitions=20as=0Agenerated=20by=20`guix=20= import=20hackage`.=20Compare=0A= =0A=0A*=20= guix/build/haskell-build-system.scm:=20Generate=20Setup.hs=20if=20= missing,=0Aafter=20unpack=20phase.=0A---=0A=20= guix/build/haskell-build-system.scm=20|=2012=20++++++++++++=0A=201=20= file=20changed,=2012=20insertions(+)=0A=0Adiff=20--git=20= a/guix/build/haskell-build-system.scm=20= b/guix/build/haskell-build-system.scm=0Aindex=205c5b32322b..0c648e510f=20= 100644=0A---=20a/guix/build/haskell-build-system.scm=0A+++=20= b/guix/build/haskell-build-system.scm=0A@@=20-275,9=20+275,21=20@@=20= given=20Haskell=20package."=0A=20=20=20=20=20=20=20(_=20(error=20"Could=20= not=20find=20a=20Cabal=20file=20to=20patch."))))=0A=20=20=20#t)=0A=20=0A= +(define*=20(generate-setup=20#:rest=20empty)=0A+=20=20"Generate=20= boilerplate=20Setup.hs=20if=20missing."=0A+=20=20(when=20(not=20(or=20= (file-exists?=20"Setup.hs")=0A+=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20(file-exists?=20"Setup.lhs")))=0A+=20=20=20=20(format=20#t=20= "generating=20missing=20Setup.hs~%")=0A+=20=20=20=20(with-output-to-file=20= "Setup.hs"=0A+=20=20=20=20=20=20(lambda=20()=0A+=20=20=20=20=20=20=20=20= (format=20#t=20"import=20Distribution.Simple~%")=0A+=20=20=20=20=20=20=20= =20(format=20#t=20"main=20=3D=20defaultMain~%"))))=0A+=20=20#t)=0A+=0A=20= (define=20%standard-phases=0A=20=20=20(modify-phases=20= gnu:%standard-phases=0A=20=20=20=20=20(add-after=20'unpack=20= 'patch-cabal-file=20patch-cabal-file)=0A+=20=20=20=20(add-after=20= 'unpack=20'generate-setup=20generate-setup)=0A=20=20=20=20=20(delete=20= 'bootstrap)=0A=20=20=20=20=20(add-before=20'configure=20'setup-compiler=20= setup-compiler)=0A=20=20=20=20=20(add-before=20'install=20'haddock=20= haddock)=0A--=20=0A2.21.0=0A=0A= --Apple-Mail=_BDC1C73C-B364-49AE-93AE-4AA935BAE22B Content-Disposition: attachment; filename=0004-gnu-haskell-leave-Setup.hs-generation-to-build-syste.patch Content-Type: application/octet-stream; x-unix-mode=0644; name="0004-gnu-haskell-leave-Setup.hs-generation-to-build-syste.patch" Content-Transfer-Encoding: quoted-printable =46rom=2077952a3fe2fdbe027552149eef9d676b828b9e92=20Mon=20Sep=2017=20= 00:00:00=202001=0AFrom:=20Robert=20Vollmert=20=0ADate:=20= Fri,=2017=20May=202019=2016:29:08=20+0200=0ASubject:=20[PATCH=204/5]=20= gnu:=20haskell:=20leave=20Setup.hs=20generation=20to=20build=20system=0A=0A= Remove=20explicit=20Setup.hs=20generation=20from=20the=20configure=20= step=0Anow=20that=20haskell-build-system=20does=20it.=0A=0A*=20= gnu/packages/haskell.scm=20(ghc-foundation,=20ghc-inline-c,=0A= ghc-inline-c-cpp,=20ghc-rio):=20Don't=20generate=20Setup.hs=0A---=0A=20= gnu/packages/haskell.scm=20|=2042=20= ----------------------------------------=0A=201=20file=20changed,=2042=20= deletions(-)=0A=0Adiff=20--git=20a/gnu/packages/haskell.scm=20= b/gnu/packages/haskell.scm=0Aindex=20c40581a8cd..f12371f3ce=20100644=0A= ---=20a/gnu/packages/haskell.scm=0A+++=20b/gnu/packages/haskell.scm=0A@@=20= -9688,16=20+9688,6=20@@=20packages.")=0A=20=20=20=20=20=20=20=20=20= (base32=0A=20=20=20=20=20=20=20=20=20=20= "1q43y8wfj0wf9gdq2kzphwjwq6m5pvryy1lqgk954aq5z3ks1lsf"))))=0A=20=20=20=20= =20(build-system=20haskell-build-system)=0A-=20=20=20=20(arguments=0A-=20= =20=20=20=20`(#:phases=0A-=20=20=20=20=20=20=20(modify-phases=20= %standard-phases=0A-=20=20=20=20=20=20=20=20=20(add-after=20'unpack=20= 'add-setup-script=0A-=20=20=20=20=20=20=20=20=20=20=20(lambda=20_=0A-=20=20= =20=20=20=20=20=20=20=20=20=20=20;;=20The=20usual=20"Setup.hs"=20script=20= is=20missing=20from=20the=20source.=0A-=20=20=20=20=20=20=20=20=20=20=20=20= =20(with-output-to-file=20"Setup.hs"=0A-=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20(lambda=20()=0A-=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20(format=20#t=20"import=20Distribution.Simple~%")=0A-=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20(format=20#t=20"main=20=3D=20= defaultMain~%"))))))))=0A=20=20=20=20=20(inputs=20`(("ghc-basement"=20= ,ghc-basement)))=0A=20=20=20=20=20(home-page=20= "https://github.com/haskell-foundation/foundation")=0A=20=20=20=20=20= (synopsis=20"Alternative=20prelude=20with=20batteries=20and=20no=20= dependencies")=0A@@=20-10575,16=20+10565,6=20@@=20widths=20to=20the=20= Char=20type.")=0A=20=20=20=20=20=20=20=20=20(base32=0A=20=20=20=20=20=20=20= =20=20=20"064h8a4hp53a479d3ak0vmqbx8hi0cpg7zn4wp23rjy26dka8p7g"))))=0A=20= =20=20=20=20(build-system=20haskell-build-system)=0A-=20=20=20=20= (arguments=0A-=20=20=20=20=20`(#:phases=0A-=20=20=20=20=20=20=20= (modify-phases=20%standard-phases=0A-=20=20=20=20=20=20=20=20=20= (add-after=20'unpack=20'add-setup-script=0A-=20=20=20=20=20=20=20=20=20=20= =20(lambda=20_=0A-=20=20=20=20=20=20=20=20=20=20=20=20=20;;=20The=20= usual=20"Setup.hs"=20script=20is=20missing=20from=20the=20source.=0A-=20=20= =20=20=20=20=20=20=20=20=20=20=20(with-output-to-file=20"Setup.hs"=0A-=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20(lambda=20()=0A-=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20(format=20#t=20"import=20= Distribution.Simple~%")=0A-=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20(format=20#t=20"main=20=3D=20defaultMain~%"))))))))=0A=20=20=20=20=20= (inputs=0A=20=20=20=20=20=20`(("ghc-exceptions"=20,ghc-exceptions)=0A=20=20= =20=20=20=20=20=20("ghc-hashable"=20,ghc-hashable)=0A@@=20-11107,17=20= +11087,6=20@@=20DOS/Windows=20paths=20and=20markup=20languages=20(such=20= as=20XML).")=0A=20=20=20=20=20=20=20=20=20(base32=0A=20=20=20=20=20=20=20= =20=20=20"0vbfrsqsi7mdziqsnj68bsqlwbqxxhvrmy9rv6w8z18d1m8w3n6h"))))=0A=20= =20=20=20=20(build-system=20haskell-build-system)=0A-=20=20=20=20= (arguments=0A-=20=20=20=20=20`(#:phases=0A-=20=20=20=20=20=20=20= (modify-phases=20%standard-phases=0A-=20=20=20=20=20=20=20=20=20= (add-after=20'unpack=20'create-Setup.hs=0A-=20=20=20=20=20=20=20=20=20=20= =20(lambda=20_=0A-=20=20=20=20=20=20=20=20=20=20=20=20=20= (with-output-to-file=20"Setup.hs"=0A-=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20(lambda=20_=0A-=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= (display=20"\=0A-import=20Distribution.Simple=0A-main=20=3D=20= defaultMain")))=0A-=20=20=20=20=20=20=20=20=20=20=20=20=20#t)))))=0A=20=20= =20=20=20(inputs=0A=20=20=20=20=20=20`(("ghc-ansi-wl-pprint"=20= ,ghc-ansi-wl-pprint)=0A=20=20=20=20=20=20=20=20("ghc-cryptohash"=20= ,ghc-cryptohash)=0A@@=20-11251,17=20+11220,6=20@@=20handling=20wrong.")=0A= =20=20=20=20=20=20=20=20=20(base32=0A=20=20=20=20=20=20=20=20=20=20= "1rk7fmpkmxw9hhwr8df29kadnf0ybnwj64ggdbnsdrpfyhnkisci"))))=0A=20=20=20=20= =20(build-system=20haskell-build-system)=0A-=20=20=20=20(arguments=0A-=20= =20=20=20=20`(#:phases=0A-=20=20=20=20=20=20=20(modify-phases=20= %standard-phases=0A-=20=20=20=20=20=20=20=20=20(add-after=20'unpack=20= 'create-Setup.hs=0A-=20=20=20=20=20=20=20=20=20=20=20(lambda=20_=0A-=20=20= =20=20=20=20=20=20=20=20=20=20=20(with-output-to-file=20"Setup.hs"=0A-=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20(lambda=20_=0A-=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20(display=20"\=0A-import=20= Distribution.Simple=0A-main=20=3D=20defaultMain")))=0A-=20=20=20=20=20=20= =20=20=20=20=20=20=20#t)))))=0A=20=20=20=20=20(inputs=0A=20=20=20=20=20=20= `(("ghc-inline-c"=20,ghc-inline-c)=0A=20=20=20=20=20=20=20=20= ("ghc-safe-exceptions"=20,ghc-safe-exceptions)))=0A--=20=0A2.21.0=0A=0A= --Apple-Mail=_BDC1C73C-B364-49AE-93AE-4AA935BAE22B Content-Disposition: attachment; filename=0005-guix-import-hackage-handle-hackage-revisions.patch Content-Type: application/octet-stream; x-unix-mode=0644; name="0005-guix-import-hackage-handle-hackage-revisions.patch" Content-Transfer-Encoding: quoted-printable =46rom=203b899cfd69dbc19fa542a0a790bee124868058ca=20Mon=20Sep=2017=20= 00:00:00=202001=0AFrom:=20Robert=20Vollmert=20=0ADate:=20= Fri,=2017=20May=202019=2022:52:24=20+0200=0ASubject:=20[PATCH=205/5]=20= guix:=20import:=20hackage:=20handle=20hackage=20revisions=0A=0AHackage=20= packages=20can=20have=20metadata=20revision=20(cabal-file=20only)=0Athat=20= aren't=20reflected=20in=20the=20source=20archive.=20haskell-build-system=0A= has=20support=20for=20this,=20but=20previously=20`guix=20import=20= hackage`=20would=0Acreate=20a=20definition=20based=20on=20the=20new=20= cabal=20file=20but=20building=20using=0Athe=20old=20cabal=20file.=0A=0A= Compare=20https://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D35750.=0A=0A*=20= guix/import/cabal.scm:=20Parse=20`x-revision:`=20property.=0A*=20= guix/import/hackage.scm:=20Compute=20hash=20of=20cabal=20file,=20and=20= write=0Acabal-revision=20build=20system=20arguments.=0A---=0A=20= guix/import/cabal.scm=20=20=20|=20=207=20+++--=0A=20= guix/import/hackage.scm=20|=2061=20= ++++++++++++++++++++++++++++++-----------=0A=202=20files=20changed,=2050=20= insertions(+),=2018=20deletions(-)=0A=0Adiff=20--git=20= a/guix/import/cabal.scm=20b/guix/import/cabal.scm=0Aindex=20= 383702f2be..97105eb154=20100644=0A---=20a/guix/import/cabal.scm=0A+++=20= b/guix/import/cabal.scm=0A@@=20-40,6=20+40,7=20@@=0A=20=20=20=20=20=20=20= =20=20=20=20=20=20cabal-package?=0A=20=20=20=20=20=20=20=20=20=20=20=20=20= cabal-package-name=0A=20=20=20=20=20=20=20=20=20=20=20=20=20= cabal-package-version=0A+=20=20=20=20=20=20=20=20=20=20=20=20= cabal-package-revision=0A=20=20=20=20=20=20=20=20=20=20=20=20=20= cabal-package-license=0A=20=20=20=20=20=20=20=20=20=20=20=20=20= cabal-package-home-page=0A=20=20=20=20=20=20=20=20=20=20=20=20=20= cabal-package-source-repository=0A@@=20-640,13=20+641,14=20@@=20If=20#f=20= use=20the=20function=20'port-filename'=20to=20obtain=20it."=0A=20;;=20= information=20of=20the=20Cabal=20file,=20but=20only=20the=20ones=20we=20= currently=20are=0A=20;;=20interested=20in.=0A=20(define-record-type=20= =0A-=20=20(make-cabal-package=20name=20version=20license=20= home-page=20source-repository=0A+=20=20(make-cabal-package=20name=20= version=20revision=20license=20home-page=20source-repository=0A=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20synopsis=20= description=0A=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20executables=20lib=20test-suites=0A=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20flags=20eval-environment=20= custom-setup)=0A=20=20=20cabal-package?=0A=20=20=20(name=20=20=20= cabal-package-name)=0A=20=20=20(version=20cabal-package-version)=0A+=20=20= (revision=20cabal-package-revision)=0A=20=20=20(license=20= cabal-package-license)=0A=20=20=20(home-page=20cabal-package-home-page)=0A= =20=20=20(source-repository=20cabal-package-source-repository)=0A@@=20= -840,6=20+842,7=20@@=20See=20the=20manual=20for=20limitations.")))))))=0A= =20=20=20(define=20(cabal-evaluated-sexp->package=20evaluated-sexp)=0A=20= =20=20=20=20(let*=20((name=20(lookup-join=20evaluated-sexp=20"name"))=0A=20= =20=20=20=20=20=20=20=20=20=20=20(version=20(lookup-join=20= evaluated-sexp=20"version"))=0A+=20=20=20=20=20=20=20=20=20=20=20= (revision=20(lookup-join=20evaluated-sexp=20"x-revision"))=0A=20=20=20=20= =20=20=20=20=20=20=20=20(license=20(lookup-join=20evaluated-sexp=20= "license"))=0A=20=20=20=20=20=20=20=20=20=20=20=20(home-page=20= (lookup-join=20evaluated-sexp=20"homepage"))=0A=20=20=20=20=20=20=20=20=20= =20=20=20(home-page-or-hackage=0A@@=20-858,7=20+861,7=20@@=20See=20the=20= manual=20for=20limitations.")))))))=0A=20=20=20=20=20=20=20=20=20=20=20=20= (custom-setup=20(match=20(make-cabal-section=20evaluated-sexp=20= 'custom-setup)=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((x)=20x)=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#f))))=0A-=20=20=20=20= =20=20(make-cabal-package=20name=20version=20license=20= home-page-or-hackage=0A+=20=20=20=20=20=20(make-cabal-package=20name=20= version=20revision=20license=20home-page-or-hackage=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= source-repository=20synopsis=20description=20executables=20lib=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= test-suites=20flags=20eval-environment=20custom-setup)))=0A=20=0Adiff=20= --git=20a/guix/import/hackage.scm=20b/guix/import/hackage.scm=0Aindex=20= 5b80a7ea1d..fe0c6d13e4=20100644=0A---=20a/guix/import/hackage.scm=0A+++=20= b/guix/import/hackage.scm=0A@@=20-117,9=20+117,15=20@@=20version=20is=20= returned."=0A=20=20=20=20=20=20=20=20=20=20=20(#f=20name)=0A=20=20=20=20=20= =20=20=20=20=20=20(m=20(match:substring=20m=201)))))))=0A=20=0A-(define=20= (hackage-fetch=20name-version)=0A-=20=20"Return=20the=20Cabal=20file=20= for=20the=20package=20NAME-VERSION,=20or=20#f=20on=20failure.=20=20If=0A= -the=20version=20part=20is=20omitted=20from=20the=20package=20name,=20= then=20return=20the=20latest=0A+(define=20(read-cabal-and-hash=20port)=0A= +=20=20(let-values=20(((port=20get-hash)=20(open-sha256-input-port=20= port)))=0A+=20=20=20=20(cons=0A+=20=20=20=20=20=20(read-cabal=20port)=0A= +=20=20=20=20=20=20(bytevector->nix-base32-string=20(get-hash)))))=0A+=0A= +(define=20(hackage-fetch-and-hash=20name-version)=0A+=20=20"Return=20= the=20Cabal=20file=20and=20hash=20for=20the=20package=20NAME-VERSION,=20= or=20#f=20on=20failure.=0A+If=20the=20version=20part=20is=20omitted=20= from=20the=20package=20name,=20then=20return=20the=20latest=0A=20= version."=0A=20=20=20(guard=20(c=20((and=20(http-get-error?=20c)=0A=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20(=3D=20404=20= (http-get-error-code=20c)))=0A@@=20-127,10=20+133,18=20@@=20version."=0A=20= =20=20=20=20(let-values=20(((name=20version)=20= (package-name->name+version=20name-version)))=0A=20=20=20=20=20=20=20= (let*=20((url=20(hackage-cabal-url=20name=20version))=0A=20=20=20=20=20=20= =20=20=20=20=20=20=20=20(port=20(http-fetch=20url))=0A-=20=20=20=20=20=20= =20=20=20=20=20=20=20(result=20(read-cabal=20(canonical-newline-port=20= port))))=0A+=20=20=20=20=20=20=20=20=20=20=20=20=20(result=20= (read-cabal-and-hash=20(canonical-newline-port=20port))))=0A=20=20=20=20=20= =20=20=20=20(close-port=20port)=0A=20=20=20=20=20=20=20=20=20result))))=0A= =20=0A+(define=20(hackage-fetch=20name-version)=0A+=20=20"Return=20the=20= Cabal=20file=20for=20the=20package=20NAME-VERSION,=20or=20#f=20on=20= failure.=20=20If=0A+the=20version=20part=20is=20omitted=20from=20the=20= package=20name,=20then=20return=20the=20latest=0A+version."=0A+=20=20= (match=20(hackage-fetch-and-hash=20name-version)=0A+=20=20=20=20=20=20=20= =20=20((cabal=20.=20hash)=20cabal)=0A+=20=20=20=20=20=20=20=20=20(_=20=20= =20=20=20=20=20=20=20=20=20=20=20=20#f)))=0A+=0A=20(define=20= string->license=0A=20=20=20;;=20List=20of=20valid=20values=20from=0A=20=20= =20;;=20https://www.haskell.org=0A@@=20-196,15=20+210,19=20@@=20package=20= being=20processed=20and=20is=20used=20to=20filter=20references=20to=20= itself."=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(cons=20own-name=20= ghc-standard-libraries))))=0A=20=20=20=20=20=20=20=20=20=20=20= dependencies))=0A=20=0A-(define*=20(hackage-module->sexp=20cabal=20#:key=20= (include-test-dependencies?=20#t))=0A+(define*=20(hackage-module->sexp=20= cabal=20cabal-hash=20#:key=20(include-test-dependencies?=20#t))=0A=20=20=20= "Return=20the=20`package'=20S-expression=20for=20a=20Cabal=20package.=20=20= CABAL=20is=20the=0A-representation=20of=20a=20Cabal=20file=20as=20= produced=20by=20'read-cabal'."=0A+representation=20of=20a=20Cabal=20file=20= as=20produced=20by=20'read-cabal'.=20CABAL-HASH=20is=0A+the=20hash=20of=20= the=20Cabal=20file."=0A=20=0A=20=20=20(define=20name=0A=20=20=20=20=20= (cabal-package-name=20cabal))=0A=20=0A=20=20=20(define=20version=0A=20=20= =20=20=20(cabal-package-version=20cabal))=0A+=0A+=20=20(define=20= revision=0A+=20=20=20=20(cabal-package-revision=20cabal))=0A=20=20=20=0A=20= =20=20(define=20source-url=0A=20=20=20=20=20(hackage-source-url=20name=20= version))=0A@@=20-250,9=20+268,17=20@@=20representation=20of=20a=20Cabal=20= file=20as=20produced=20by=20'read-cabal'."=0A=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20(list=20'quasiquote=20inputs))))))=0A=20=20= =20=0A=20=20=20(define=20(maybe-arguments)=0A-=20=20=20=20(if=20(not=20= include-test-dependencies?)=0A-=20=20=20=20=20=20=20=20'((arguments=20= `(#:tests?=20#f)))=0A-=20=20=20=20=20=20=20=20'()))=0A+=20=20=20=20= (define=20testargs=20(if=20(not=20include-test-dependencies?)=0A+=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20'(#:tests?=20= #f)=0A+=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(define=20revargs=20=20(if=20(not=20= (string-null?=20revision))=0A+=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20`(#:cabal-revision=20(,revision=20,cabal-hash))=0A= +=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(define=20args=20(append=20testargs=20revargs))=0A+=20= =20=20=20(if=20(not=20(nil?=20args))=0A+=20=20=20=20=20=20(let=20((qargs=20= `(,'quasiquote=20,args)))=0A+=20=20=20=20=20=20=20=20`((arguments=20= ,qargs)))=0A+=20=20=20=20=20=20'()))=0A=20=0A=20=20=20(let=20((tarball=20= (with-store=20store=0A=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20(download-to-store=20store=20source-url))))=0A@@=20-293,13=20= +319,16=20@@=20symbol=20'true'=20or=20'false'.=20=20The=20value=20= associated=20with=20other=20keys=20has=20to=20conform=0A=20to=20the=20= Cabal=20file=20format=20definition.=20=20The=20default=20value=20= associated=20with=20the=0A=20keys=20\"os\",=20\"arch\"=20and=20\"impl\"=20= is=20\"linux\",=20\"x86_64\"=20and=20\"ghc\"=0A=20respectively."=0A-=20=20= =20(let=20((cabal-meta=20(if=20port=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(read-cabal=20= (canonical-newline-port=20port))=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(hackage-fetch=20package-name))))=0A= -=20=20=20=20=20(and=3D>=20cabal-meta=20(compose=20(cut=20= hackage-module->sexp=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=20=20= #:include-test-dependencies?=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= include-test-dependencies?)=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(cut=20eval-cabal=20= <>=20cabal-environment))))))=0A+=20=20=20(match=0A+=20=20=20=20=20(if=20= port=20(read-cabal-and-hash=20(canonical-newline-port=20port))=0A+=20=20=20= =20=20=20=20=20=20=20=20=20=20=20(hackage-fetch-and-hash=20= package-name))=0A+=20=20=20=20=20((cabal-meta=20.=20cabal-hash)=0A+=20=20= =20=20=20=20(and=3D>=20cabal-meta=20(compose=20(cut=20= hackage-module->sexp=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=20=20=20= cabal-hash=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= #:include-test-dependencies?=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= include-test-dependencies?)=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(cut=20= eval-cabal=20<>=20cabal-environment))))=0A+=20=20=20=20=20(_=20#f))))=0A=20= =0A=20(define=20hackage->guix-package=0A=20=20=20(memoize=20= hackage->guix-package-impl))=0A--=20=0A2.21.0=0A=0A= --Apple-Mail=_BDC1C73C-B364-49AE-93AE-4AA935BAE22B--