aboutsummaryrefslogtreecommitdiff
path: root/gnu/packages/patches/ganeti-lens-compat.patch
diff options
context:
space:
mode:
authorLiliana Marie Prikler <liliana.prikler@gmail.com>2023-09-09 12:22:14 +0200
committerLiliana Marie Prikler <liliana.prikler@gmail.com>2023-09-09 12:22:14 +0200
commit94ca5b4357af8f8921f0cb0873a7cf316f13aa69 (patch)
tree6ef30120737f26f298f7f17d86597b0b729517e0 /gnu/packages/patches/ganeti-lens-compat.patch
parent6750c114e3e988249f4069d0180316c6d0192350 (diff)
parentdb61bdd7f52270a35bd0a3a88650d98276dab20b (diff)
downloadguix-94ca5b4357af8f8921f0cb0873a7cf316f13aa69.tar.gz
guix-94ca5b4357af8f8921f0cb0873a7cf316f13aa69.zip
Merge branch 'master' into emacs-team
Diffstat (limited to 'gnu/packages/patches/ganeti-lens-compat.patch')
-rw-r--r--gnu/packages/patches/ganeti-lens-compat.patch40
1 files changed, 40 insertions, 0 deletions
diff --git a/gnu/packages/patches/ganeti-lens-compat.patch b/gnu/packages/patches/ganeti-lens-compat.patch
new file mode 100644
index 0000000000..1b9108d78f
--- /dev/null
+++ b/gnu/packages/patches/ganeti-lens-compat.patch
@@ -0,0 +1,40 @@
+Fix building against Lens 5 by commenting out type signatures(!).
+
+Taken from upstream:
+
+ https://github.com/ganeti/ganeti/commit/5e30bad1bba63c9f6c782003ef2560f107a0ba24
+
+diff --git a/src/Ganeti/Network.hs b/src/Ganeti/Network.hs
+index 1cb6aa1ec..696c1cd1b 100644
+--- a/src/Ganeti/Network.hs
++++ b/src/Ganeti/Network.hs
+@@ -87,11 +87,11 @@ data PoolPart = PoolInstances | PoolExt
+ addressPoolIso :: Iso' AddressPool BA.BitArray
+ addressPoolIso = iso apReservations AddressPool
+
+-poolLens :: PoolPart -> Lens' Network (Maybe AddressPool)
++--poolLens :: PoolPart -> Lens' Network (Maybe AddressPool)
+ poolLens PoolInstances = networkReservationsL
+ poolLens PoolExt = networkExtReservationsL
+
+-poolArrayLens :: PoolPart -> Lens' Network (Maybe BA.BitArray)
++--poolArrayLens :: PoolPart -> Lens' Network (Maybe BA.BitArray)
+ poolArrayLens part = poolLens part . mapping addressPoolIso
+
+ netIpv4NumHosts :: Network -> Integer
+diff --git a/src/Ganeti/Utils/MultiMap.hs b/src/Ganeti/Utils/MultiMap.hs
+index d54da3ab0..279e9335a 100644
+--- a/src/Ganeti/Utils/MultiMap.hs
++++ b/src/Ganeti/Utils/MultiMap.hs
+@@ -91,7 +91,7 @@ multiMap :: (Ord k, Ord v) => M.Map k (S.Set v) -> MultiMap k v
+ multiMap = MultiMap . M.filter (not . S.null)
+
+ -- | A 'Lens' that allows to access a set under a given key in a multi-map.
+-multiMapL :: (Ord k, Ord v) => k -> Lens' (MultiMap k v) (S.Set v)
++--multiMapL :: (Ord k, Ord v) => k -> Lens' (MultiMap k v) (S.Set v)
+ multiMapL k f = fmap MultiMap
+ . at k (fmap (mfilter (not . S.null) . Just)
+ . f . fromMaybe S.empty)
+--
+2.41.0
+