[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug#61420] [PATCH 01/31] import: hackage: Allow version at the beginnin
From: |
Lars-Dominik Braun |
Subject: |
[bug#61420] [PATCH 01/31] import: hackage: Allow version at the beginning of cabal file. |
Date: |
Sat, 11 Feb 2023 11:07:58 +0100 |
Fix a corner case, uncovered by the hedgehog package, which has the
version field at the beginning of its cabal file. This causes a pattern
match failure.
* guix/import/hackage.scm (latest-release): Match version at beginning
of expression too.
---
guix/import/hackage.scm | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/guix/import/hackage.scm b/guix/import/hackage.scm
index 7bc2908405..e915aac58d 100644
--- a/guix/import/hackage.scm
+++ b/guix/import/hackage.scm
@@ -378,7 +378,10 @@ (define* (latest-release package #:key (version #f))
"warning: failed to parse ~a~%"
(hackage-cabal-url hackage-name))
#f)
- ((_ *** ("version" (version)))
+ ;; Cabal files have no particular order and while usually the version
+ ;; as somewhere in the middle it can also be at the beginning,
+ ;; requiring two pattern.
+ ((or (_ *** ("version" (version))) (("version" (version)) _ ...))
(let ((url (hackage-uri hackage-name version)))
(upstream-source
(package (package-name package))
--
2.38.2
- [bug#61420] [PATCH 00/31] Haskell upgrade to Stackage 20.5, Lars-Dominik Braun, 2023/02/11
- [bug#61420] [PATCH 01/31] import: hackage: Allow version at the beginning of cabal file.,
Lars-Dominik Braun <=
- [bug#61420] [PATCH 03/31] build: haskell-build-system: Support multiple libraries., Lars-Dominik Braun, 2023/02/11
- [bug#61420] [PATCH 05/31] import: stackage: Update to release 20.5., Lars-Dominik Braun, 2023/02/11
- [bug#61420] [PATCH 04/31] gnu: Switch default to GHC 9.2., Lars-Dominik Braun, 2023/02/11
- [bug#61420] [PATCH 10/31] import: haskell: Add new internal library for GHC 9.2., Lars-Dominik Braun, 2023/02/11
- [bug#61420] [PATCH 15/31] gnu: Remove unused Haskell packages., Lars-Dominik Braun, 2023/02/11
- [bug#61420] [PATCH 22/31] build: haskell-build-system: Build static executables by default., Lars-Dominik Braun, 2023/02/11
- [bug#61420] [PATCH 08/31] import: hackage: Use upstream-name property., Lars-Dominik Braun, 2023/02/11
- [bug#61420] [PATCH 02/31] build: haskell-build-system: Remove trailing #t., Lars-Dominik Braun, 2023/02/11
- [bug#61420] [PATCH 12/31] build: haskell-build-system: Remove unused linker flags., Lars-Dominik Braun, 2023/02/11