diff mbox series

bug#74086: [PATCH] guix: import: hackage: Support updating to a specific version.

Message ID 87ed3doojd.fsf@gnu.org
State New
Headers show
Series bug#74086: [PATCH] guix: import: hackage: Support updating to a specific version. | expand

Commit Message

Ludovic Courtès Nov. 14, 2024, 2:52 p.m. UTC
Hi,

Nicolas Graves <ngraves@ngraves.fr> skribis:

> * gnu/import/hackage.scm
> (hackage-fetch-and-hash, hackage-fetch): Support name and version
> argument.
> (import-release): New variable, formerly known as latest-release.
> Support updating to a specific version.

Nice.  Applied with the fix below (spotted a compiler warning).

Thanks,
Ludo’.

Comments

Nicolas Graves Nov. 14, 2024, 5:07 p.m. UTC | #1
On 2024-11-14 15:52, Ludovic Courtès wrote:

> Hi,
>
> Nicolas Graves <ngraves@ngraves.fr> skribis:
>
>> * gnu/import/hackage.scm
>> (hackage-fetch-and-hash, hackage-fetch): Support name and version
>> argument.
>> (import-release): New variable, formerly known as latest-release.
>> Support updating to a specific version.
>
> Nice.  Applied with the fix below (spotted a compiler warning).

Oh there's also one call in stackage.scm that would require a trailing
#f too.

I've got a couple more patches on hackage/stackage updates, but I'll
first wait on the import/composer and cve/cpe-vendor discussions ;)
diff mbox series

Patch

diff --git a/guix/import/hackage.scm b/guix/import/hackage.scm
index e3ed98c089..422887d435 100644
--- a/guix/import/hackage.scm
+++ b/guix/import/hackage.scm
@@ -357,7 +357,7 @@  (define* (hackage->guix-package package-name #:key
   (let ((cabal-meta cabal-hash
                     (if port
                         (read-cabal-and-hash port)
-                        (hackage-fetch-and-hash package-name))))
+                        (hackage-fetch-and-hash package-name #f))))
     (if cabal-meta
         (hackage-module->sexp (eval-cabal cabal-meta cabal-environment)
                               cabal-hash