[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
07/07: gnu: ganeti: Adjust to GHC 8.10 / Stackage 18.10.
From: |
guix-commits |
Subject: |
07/07: gnu: ganeti: Adjust to GHC 8.10 / Stackage 18.10. |
Date: |
Mon, 11 Oct 2021 15:54:23 -0400 (EDT) |
mbakke pushed a commit to branch master
in repository guix.
commit 0105f33a4ddd7d3ef3d66bd16e16595dd500d404
Author: Marius Bakke <marius@gnu.org>
AuthorDate: Mon Oct 11 21:23:53 2021 +0200
gnu: ganeti: Adjust to GHC 8.10 / Stackage 18.10.
* gnu/packages/patches/ganeti-haskell-compat.patch: New file.
* gnu/local.mk (dist_patch_DATA): Adjust accordingly.
* gnu/packages/virtualization.scm (ganeti)[source](patches): Add it.
[arguments]: Add phase patch-version-constraints.
---
gnu/local.mk | 1 +
gnu/packages/patches/ganeti-haskell-compat.patch | 18 ++++++++++++++++++
gnu/packages/virtualization.scm | 9 +++++++++
3 files changed, 28 insertions(+)
diff --git a/gnu/local.mk b/gnu/local.mk
index 068cdb6..34218ec 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -1064,6 +1064,7 @@ dist_patch_DATA =
\
%D%/packages/patches/fxdiv-system-libraries.patch \
%D%/packages/patches/gajim-honour-GAJIM_PLUGIN_PATH.patch \
%D%/packages/patches/ganeti-disable-version-symlinks.patch \
+ %D%/packages/patches/ganeti-haskell-compat.patch \
%D%/packages/patches/ganeti-haskell-pythondir.patch \
%D%/packages/patches/ganeti-preserve-PYTHONPATH.patch \
%D%/packages/patches/ganeti-shepherd-master-failover.patch \
diff --git a/gnu/packages/patches/ganeti-haskell-compat.patch
b/gnu/packages/patches/ganeti-haskell-compat.patch
new file mode 100644
index 0000000..931c50e1
--- /dev/null
+++ b/gnu/packages/patches/ganeti-haskell-compat.patch
@@ -0,0 +1,18 @@
+Adjust to type change of TupE in Template Haskell 2.16.
+
+diff --git a/src/Ganeti/THH/Types.hs b/src/Ganeti/THH/Types.hs
+--- a/src/Ganeti/THH/Types.hs
++++ b/src/Ganeti/THH/Types.hs
+@@ -123,4 +123,11 @@ curryN n = do
+ f <- newName "f"
+ ps <- replicateM n (newName "x")
+ return $ LamE (VarP f : map VarP ps)
+- (AppE (VarE f) (TupE $ map VarE ps))
++ (AppE (VarE f) (nonUnaryTupE $ map VarE ps))
++ where
++ nonUnaryTupE :: [Exp] -> Exp
++ nonUnaryTupE es = TupE $
++#if MIN_VERSION_template_haskell(2,16,0)
++ map Just
++#endif
++ es
diff --git a/gnu/packages/virtualization.scm b/gnu/packages/virtualization.scm
index 65f6117..e5da1b5 100644
--- a/gnu/packages/virtualization.scm
+++ b/gnu/packages/virtualization.scm
@@ -524,6 +524,7 @@ firmware blobs. You can
(file-name (git-file-name name version))
(patches (search-patches "ganeti-shepherd-support.patch"
"ganeti-shepherd-master-failover.patch"
+ "ganeti-haskell-compat.patch"
"ganeti-haskell-pythondir.patch"
"ganeti-disable-version-symlinks.patch"
"ganeti-preserve-PYTHONPATH.patch"))))
@@ -573,6 +574,14 @@ firmware blobs. You can
,(system->qemu-target (%current-system))))
#:phases
(modify-phases %standard-phases
+ (add-after 'unpack 'patch-version-constraints
+ (lambda _
+ ;; Loosen version constraints for compatibility with Stackage
18.10.
+ (substitute* "cabal/ganeti.template.cabal"
+ (("(.*base64-bytestring.*) < 1\\.1" _ match)
+ (string-append match " < 1.2"))
+ (("(.*QuickCheck.*) < 2\\.14" _ match)
+ (string-append match " < 2.15")))))
(add-after 'unpack 'create-vcs-version
(lambda _
;; If we are building from a git checkout, we need to create a
- branch master updated (601d997 -> 0105f33), guix-commits, 2021/10/11
- 01/07: gnu: drbd-utils: Update to 9.19.0., guix-commits, 2021/10/11
- 02/07: services: ganeti: Don't start the metadata daemon automatically., guix-commits, 2021/10/11
- 04/07: doc: Fix typo., guix-commits, 2021/10/11
- 06/07: gnu: uBlock Origin: Update to 1.38.4., guix-commits, 2021/10/11
- 03/07: gnu: ganeti: Update to 3.0.1., guix-commits, 2021/10/11
- 07/07: gnu: ganeti: Adjust to GHC 8.10 / Stackage 18.10.,
guix-commits <=
- 05/07: gnu: ungoogled-chromium: Update to 94.0.4606.81-1., guix-commits, 2021/10/11