




















The current ghc is 9.0.1 and this builds with 8.10.5 just fine, as long as the trick used by @lsf on cardano-node is applied also here:
diff --git a/PKGBUILD b/PKGBUILD
index 685af94..0232e8a 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,28 +1,43 @@
# Maintainer: Michał Sałaban <michal@salaban.info>
pkgname=cardano-wallet
-_version=2021-03-04
-pkgver=20210304
+_version=2021-06-11
+pkgver=20210611
pkgrel=1
pkgdesc='HTTP server & command-line for managing UTxOs and HD wallets in Cardano.'
license=('Apache')
arch=('any')
url='https://github.com/input-output-hk/cardano-wallet'
-makedepends=('cabal-install-bin' 'ghc-8.6=8.6.5')
+_ghc_version="8.10.5"
+makedepends=('cabal-install-bin')
source=("https://github.com/input-output-hk/${pkgname}/archive/v${_version}.zip"
"arch-ghc.patch")
-sha256sums=("84fcf0aee57d575c35a29b12d084019df5e0e7bee968d4db92ebdb2fa32c933a"
- "4212a64f158529417cb06eaeaffb893fa41457fbe5edd310242f9aec54f2e2ff")
+sha256sums=('9b72329915bc342d442e1d0cee7225ca7b0cb702068082801ac2b7f2c0ec9918'
+ 'c5c55e3ff75efe867943bad207a22c3ebc2afe74ac1e4ab2d311ed307f3cb1aa')
pkgver() {
echo ${_version} | sed s/-//g
}
-build() {
+prepare() {
cd "${srcdir}/${pkgname}-${_version}"
+ patch -p1 < ../arch-ghc.patch
+ # NOTE: this is used to avoid running out of space when
+ # /tmp is not large enough
+ mkdir -p ${srcdir}/ghcup_tmp
+ TMPDIR=${srcdir}/ghcup_tmp ghcup install ghc ${_ghc_version}
+ ghcup set ghc ${_ghc_version}
+ ghcup install cabal
+ export PATH="$HOME/.cabal/bin:$HOME/.ghcup/bin:$PATH"
cabal update
+ cabal configure
+ echo "package cardano-crypto-praos" >> ${srcdir}/${pkgname}-${_version}/cabal.project.local
+ echo " flags: -external-libsodium-vrf" >> ${srcdir}/${pkgname}-${_version}/cabal.project.local
+}
+
+build() {
+ cd "${srcdir}/${pkgname}-${_version}"
rm -rf ./arch-build
mkdir ./arch-build
- patch -p1 < ../arch-ghc.patch
cabal install cardano-wallet --install-method=copy --installdir=./arch-build
}
diff --git a/arch-ghc.patch b/arch-ghc.patch
index 5117739..f06f886 100644
--- a/arch-ghc.patch
+++ b/arch-ghc.patch
@@ -1,11 +1,10 @@
diff -Nurwa a/cabal.project b/cabal.project
--- a/cabal.project
+++ b/cabal.project
-@@ -1,7 +1,7 @@
- -- Generated by stackage-to-hackage
-
--with-compiler: ghc-8.6.5
-+with-compiler: /opt/ghc-8.6/bin/ghc
-
+@@ -2,7 +2,7 @@
+
+-with-compiler: ghc-8.10.4
++with-compiler: ghc-8.10.5
+
packages:
lib/core/
Without the hacks it will fail at link time due to some missing libsodium stuff or even earlier than that due to missing Haskell dependencies.
In an effort to deduplicate the ghc-8.6 and ghc8.6-bin packages, would you mind switching to depend on ghc8.6-bin? Something like this should work:
PKGBUILD:
-makedepends=(… 'ghc-8.6=8.6.5')
+makedepends=(… 'ghc8.6')
arch-ghc.patch (run updpkgsums as needed):
-with-compiler: ghc-8.6.5
+with-compiler: ghc-8.6
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。
The build (and probably also the default Haskell ecosystem in Arch) is still just broken: