Package Details: cardano-wallet 20220118-1

Git Clone URL: https://aur.archlinux.org/cardano-wallet.git (read-only, click to copy)
Package Base: cardano-wallet
Description: HTTP server & command-line for managing UTxOs and HD wallets in Cardano.
Upstream URL: https://github.com/input-output-hk/cardano-wallet
Licenses: Apache
Submitter: emes
Maintainer: emes
Last Packager: emes
Votes: 1
Popularity: 0.000000
First Submitted: 2021-01-21 21:27 (UTC)
Last Updated: 2022-01-23 18:59 (UTC)

Latest Comments

Rufflewind commented on 2021-09-13 03:16 (UTC)

Please see https://wiki.archlinux.org/title/haskell#Configuration and also https://wiki.archlinux.org/title/haskell#Static_linking.

andrej commented on 2021-09-12 18:37 (UTC)

The build (and probably also the default Haskell ecosystem in Arch) is still just broken:

[1 of 2] Compiling Data.Digest.Adler32 ( dist/build/Data/Digest/Adler32.hs, dist/build/Data/Digest/Adler32.o, dist/build/Data/Digest/Adler32.dyn_o )

Data/Digest/Adler32.hsc:15:8: error:
    Could not find module ‘Prelude’
    There are files missing in the ‘base-4.14.2.0’ package,
    try running 'ghc-pkg check'.
    Use -v (or `:set -v` in ghci) to see a list of the files searched for.
   |
15 | module Data.Digest.Adler32 (
   |        ^^^^^^^^^^^^^^^^^^^

Data/Digest/Adler32.hsc:19:1: error:
    Could not find module ‘Data.ByteString.Unsafe’
    There are files missing in the ‘bytestring-0.10.12.0’ package,
    try running 'ghc-pkg check'.
    Use -v (or `:set -v` in ghci) to see a list of the files searched for.
   |
19 | import Data.ByteString.Unsafe (unsafeUseAsCStringLen)
   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Data/Digest/Adler32.hsc:20:1: error:
    Could not find module ‘Foreign’
    There are files missing in the ‘base-4.14.2.0’ package,
    try running 'ghc-pkg check'.
    Use -v (or `:set -v` in ghci) to see a list of the files searched for.
   |
20 | import Foreign
   | ^^^^^^^^^^^^^^

Data/Digest/Adler32.hsc:22:1: error:
    Could not find module ‘Data.ByteString’
    There are files missing in the ‘bytestring-0.10.12.0’ package,
    try running 'ghc-pkg check'.
    Use -v (or `:set -v` in ghci) to see a list of the files searched for.
   |
22 | import qualified Data.ByteString as S
   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Data/Digest/Adler32.hsc:23:1: error:
    Could not find module ‘Data.ByteString.Lazy’
    There are files missing in the ‘bytestring-0.10.12.0’ package,
    try running 'ghc-pkg check'.
    Use -v (or `:set -v` in ghci) to see a list of the files searched for.
   |
23 | import qualified Data.ByteString.Lazy as L
   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Data/Digest/Adler32.hsc:24:1: error:
    Could not find module ‘Data.ByteString.Lazy.Internal’
    There are files missing in the ‘bytestring-0.10.12.0’ package,
    try running 'ghc-pkg check'.
    Use -v (or `:set -v` in ghci) to see a list of the files searched for.
   |
24 | import qualified Data.ByteString.Lazy.Internal as LI
   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Data/Digest/Adler32.hsc:25:1: error:
    Could not find module ‘System.IO.Unsafe’
    There are files missing in the ‘base-4.14.2.0’ package,
    try running 'ghc-pkg check'.
    Use -v (or `:set -v` in ghci) to see a list of the files searched for.
   |
25 | import qualified System.IO.Unsafe as U
   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

andrej commented on 2021-07-12 03:01 (UTC)

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.

Rufflewind commented on 2021-05-31 20:38 (UTC)

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