[arch-commits] Commit in stack/repos (4 files)

Felix Yan felixonmars at archlinux.org
Sun Mar 8 14:36:27 UTC 2020


    Date: Sunday, March 8, 2020 @ 14:36:27
  Author: felixonmars
Revision: 592041

archrelease: copy trunk to community-staging-x86_64

Added:
  stack/repos/community-staging-x86_64/
  stack/repos/community-staging-x86_64/PKGBUILD
    (from rev 592040, stack/trunk/PKGBUILD)
  stack/repos/community-staging-x86_64/persistent-template-2.8.patch
    (from rev 592040, stack/trunk/persistent-template-2.8.patch)
  stack/repos/community-staging-x86_64/stack.install
    (from rev 592040, stack/trunk/stack.install)

-------------------------------+
 PKGBUILD                      |   87 ++++++++++++++++++++++++++++++++++++++++
 persistent-template-2.8.patch |   42 +++++++++++++++++++
 stack.install                 |    4 +
 3 files changed, 133 insertions(+)

Copied: stack/repos/community-staging-x86_64/PKGBUILD (from rev 592040, stack/trunk/PKGBUILD)
===================================================================
--- community-staging-x86_64/PKGBUILD	                        (rev 0)
+++ community-staging-x86_64/PKGBUILD	2020-03-08 14:36:27 UTC (rev 592041)
@@ -0,0 +1,87 @@
+# Maintainer: Felix Yan <felixonmars at archlinux.org>
+# Contributor: Arch Haskell Team <arch-haskell at haskell.org>
+
+pkgname=stack
+pkgver=2.1.3.20200209
+_commit=35f5d869558c4ac8c50e33c4930b0b72cb173b8b
+pkgrel=65
+pkgdesc="The Haskell Tool Stack"
+url="https://github.com/commercialhaskell/stack"
+license=("BSD")
+arch=('x86_64')
+depends=('ghc-libs' 'haskell-aeson' 'haskell-annotated-wl-pprint' 'haskell-ansi-terminal'
+         'haskell-async' 'haskell-attoparsec' 'haskell-base64-bytestring' 'haskell-casa-client'
+         'haskell-casa-types' 'haskell-colour' 'haskell-conduit' 'haskell-conduit-extra'
+         'haskell-cryptonite' 'haskell-cryptonite-conduit' 'haskell-echo' 'haskell-exceptions'
+         'haskell-extra' 'haskell-file-embed' 'haskell-filelock' 'haskell-fsnotify'
+         'haskell-generic-deriving' 'haskell-githash' 'haskell-hackage-security' 'haskell-hashable'
+         'haskell-hi-file-parser' 'haskell-hpack' 'haskell-http-client' 'haskell-http-client-tls'
+         'haskell-http-conduit' 'haskell-http-download' 'haskell-http-types' 'haskell-memory'
+         'haskell-microlens' 'haskell-mintty' 'haskell-mono-traversable' 'haskell-mustache'
+         'haskell-neat-interpolation' 'haskell-network-uri' 'haskell-open-browser'
+         'haskell-optparse-applicative' 'haskell-optparse-generic' 'haskell-optparse-simple'
+         'haskell-pantry' 'haskell-path' 'haskell-path-io' 'haskell-persistent'
+         'haskell-persistent-sqlite' 'haskell-persistent-template' 'haskell-primitive'
+         'haskell-project-template' 'haskell-regex-applicative-text' 'haskell-retry' 'haskell-rio'
+         'haskell-rio-prettyprint' 'haskell-split' 'haskell-streaming-commons' 'haskell-tar'
+         'haskell-temporary' 'haskell-terminal-size' 'haskell-text-metrics' 'haskell-th-reify-many'
+         'haskell-tls' 'haskell-typed-process' 'haskell-unicode-transforms' 'haskell-unix-compat'
+         'haskell-unliftio' 'haskell-unordered-containers' 'haskell-vector' 'haskell-yaml'
+         'haskell-zip-archive' 'haskell-zlib')
+makedepends=('ghc' 'git' 'haskell-quickcheck' 'haskell-hspec' 'haskell-raw-strings-qq'
+             'haskell-smallcheck')
+checkdepends=('cabal-install')
+conflicts=('haskell-stack')
+replaces=('haskell-stack')
+install="stack.install"
+source=("git+https://github.com/commercialhaskell/stack.git#commit=$_commit"
+        persistent-template-2.8.patch)
+sha512sums=('SKIP'
+            '7d5c95dea6b5f1ff830230856bf829b1372228b1fb116da4e186539206089557df65fea9094a89182a3b67ed46c137b0faaf9070ef22b5a2e5ca56380f68fd21')
+
+prepare() {
+  cd $pkgname
+  patch -p1 -i ../persistent-template-2.8.patch
+  hpack
+  sed -i -e '/semigroups/d' $pkgname.cabal
+
+  sed -i -e 's/fail $ "Invalid package name:/error $ "Invalid package name:/' \
+         -e 's/fail $ "Invalid CabalConfigKey/error $ "Invalid CabalConfigKey/' \
+            src/Stack/Types/Config.hs
+  sed -i -e 's/fail \$$/error $/' src/Stack/Coverage.hs
+}
+
+build() {
+  cd $pkgname
+
+  runhaskell Setup configure -O --enable-shared --enable-executable-dynamic --disable-library-vanilla \
+    --prefix=/usr --docdir="/usr/share/doc/${pkgname}" --enable-tests \
+    --dynlibdir=/usr/lib --libsubdir=\$compiler/site-local/\$pkgid \
+      -f-disable-git-info -f-integration-tests -f-static -f-hide-dependency-versions -f-supported-build \
+      --ghc-option='-pie'
+  runhaskell Setup build
+  runhaskell Setup register --gen-script
+  runhaskell Setup unregister --gen-script
+  sed -i -r -e "s|ghc-pkg.*update[^ ]* |&'--force' |" register.sh
+  sed -i -r -e "s|ghc-pkg.*unregister[^ ]* |&'--force' |" unregister.sh
+}
+
+check() {
+  cd $pkgname
+  # cabal update
+  LD_LIBRARY_PATH="$PWD"/dist/build PATH="$PWD"/dist/build/stack:"$PATH" runhaskell Setup test
+  # Integration tests will result in 4 failures on Arch currently
+}
+
+package() {
+  cd $pkgname
+
+  install -D -m744 register.sh   "${pkgdir}/usr/share/haskell/register/${pkgname}.sh"
+  install -D -m744 unregister.sh "${pkgdir}/usr/share/haskell/unregister/${pkgname}.sh"
+  runhaskell Setup copy --destdir="${pkgdir}"
+  install -D -m644 LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
+  rm -f "$pkgdir"/usr/share/doc/$pkgname/LICENSE
+
+  LD_PRELOAD=$(ls "$pkgdir"/usr/lib/libHSstack-*-ghc*.so) "${pkgdir}"/usr/bin/stack --bash-completion-script /usr/bin/stack > stack_completion_script
+  install -Dm644 stack_completion_script "${pkgdir}/usr/share/bash-completion/completions/stack"
+}

Copied: stack/repos/community-staging-x86_64/persistent-template-2.8.patch (from rev 592040, stack/trunk/persistent-template-2.8.patch)
===================================================================
--- community-staging-x86_64/persistent-template-2.8.patch	                        (rev 0)
+++ community-staging-x86_64/persistent-template-2.8.patch	2020-03-08 14:36:27 UTC (rev 592041)
@@ -0,0 +1,42 @@
+commit 6fdcc1828221caa77af700b0cca955c805ac7011
+Author: Felix Yan <felixonmars at archlinux.org>
+Date:   Thu Feb 27 04:24:17 2020 +0800
+
+    Enable StandaloneDeriving and DerivingStrategies
+    
+    This fixes compatibility with persistent-template >= 2.8.0
+
+diff --git a/src/Stack/Storage/Project.hs b/src/Stack/Storage/Project.hs
+index dc5318d8..1dd635c1 100644
+--- a/src/Stack/Storage/Project.hs
++++ b/src/Stack/Storage/Project.hs
+@@ -1,3 +1,4 @@
++{-# LANGUAGE DerivingStrategies #-}
+ {-# LANGUAGE FlexibleInstances #-}
+ {-# LANGUAGE GADTs #-}
+ {-# LANGUAGE GeneralizedNewtypeDeriving #-}
+@@ -6,6 +7,7 @@
+ {-# LANGUAGE OverloadedStrings #-}
+ {-# LANGUAGE QuasiQuotes #-}
+ {-# LANGUAGE RecordWildCards #-}
++{-# LANGUAGE StandaloneDeriving #-}
+ {-# LANGUAGE TemplateHaskell #-}
+ {-# LANGUAGE TupleSections #-}
+ {-# LANGUAGE TypeFamilies #-}
+diff --git a/src/Stack/Storage/User.hs b/src/Stack/Storage/User.hs
+index 3845b094..ccd5a66f 100644
+--- a/src/Stack/Storage/User.hs
++++ b/src/Stack/Storage/User.hs
+@@ -1,3 +1,4 @@
++{-# LANGUAGE DerivingStrategies #-}
+ {-# LANGUAGE FlexibleInstances #-}
+ {-# LANGUAGE GADTs #-}
+ {-# LANGUAGE GeneralizedNewtypeDeriving #-}
+@@ -6,6 +7,7 @@
+ {-# LANGUAGE OverloadedStrings #-}
+ {-# LANGUAGE QuasiQuotes #-}
+ {-# LANGUAGE RecordWildCards #-}
++{-# LANGUAGE StandaloneDeriving #-}
+ {-# LANGUAGE TemplateHaskell #-}
+ {-# LANGUAGE TupleSections #-}
+ {-# LANGUAGE TypeFamilies #-}

Copied: stack/repos/community-staging-x86_64/stack.install (from rev 592040, stack/trunk/stack.install)
===================================================================
--- community-staging-x86_64/stack.install	                        (rev 0)
+++ community-staging-x86_64/stack.install	2020-03-08 14:36:27 UTC (rev 592041)
@@ -0,0 +1,4 @@
+post_install() {
+  echo "You need to either 1) install latest stable ghc package from [extra] or 2) install ncurses5-compat-libs from AUR for the prebuilt binaries installed by stack to work."
+}
+



More information about the arch-commits mailing list