[arch-commits] Commit in (5 files)

Felix Yan felixonmars at gemini.archlinux.org
Wed Apr 6 20:07:59 UTC 2022


    Date: Wednesday, April 6, 2022 @ 20:07:59
  Author: felixonmars
Revision: 1181637

addpkg: haskell-nothunks 0.1.3-1

Added:
  haskell-nothunks/
  haskell-nothunks/repos/
  haskell-nothunks/trunk/
  haskell-nothunks/trunk/PKGBUILD
  haskell-nothunks/trunk/hedgehog-1.1.1.patch

----------------------+
 PKGBUILD             |   55 +++++++++++++++++++++++++++++++++++++++++++++++++
 hedgehog-1.1.1.patch |   46 ++++++++++++++++++++++++++++++++++++++++
 2 files changed, 101 insertions(+)

Added: haskell-nothunks/trunk/PKGBUILD
===================================================================
--- haskell-nothunks/trunk/PKGBUILD	                        (rev 0)
+++ haskell-nothunks/trunk/PKGBUILD	2022-04-06 20:07:59 UTC (rev 1181637)
@@ -0,0 +1,55 @@
+# Maintainer: Felix Yan <felixonmars at archlinux.org>
+
+_hkgname=nothunks
+pkgname=haskell-nothunks
+pkgver=0.1.3
+pkgrel=1
+pkgdesc="Examine values for unexpected thunks"
+url="https://github.com/input-output-hk/nothunks"
+license=("MIT")
+arch=('x86_64')
+depends=('ghc-libs' 'haskell-vector')
+makedepends=('ghc' 'uusi' 'haskell-hedgehog' 'haskell-random' 'haskell-tasty' 'haskell-tasty-hedgehog')
+source=("https://hackage.haskell.org/packages/archive/$_hkgname/$pkgver/$_hkgname-$pkgver.tar.gz"
+        hedgehog-1.1.1.patch)
+sha256sums=('c191e9c3d86ca006bf8d85adfd936ff997759120b0fcfaf4960a56d8bd850e53'
+            'd6342d09e8447b9b595587128704fe08e93ae1539244c3bd5172db5bcf8678bc')
+
+prepare() {
+  cd $_hkgname-$pkgver
+  patch -p1 -i ../hedgehog-1.1.1.patch
+  gen-setup
+  uusi -u hedgehog -u tasty-hedgehog $_hkgname.cabal
+}
+
+build() {
+  cd $_hkgname-$pkgver
+
+  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 \
+    --ghc-option=-optl-Wl\,-z\,relro\,-z\,now \
+    --ghc-option='-pie' \
+    -fbytestring -ftext -fvector
+
+  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 $_hkgname-$pkgver
+  runhaskell Setup test
+}
+
+package() {
+  cd $_hkgname-$pkgver
+
+  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 -t "$pkgdir"/usr/share/licenses/$pkgname/
+  rm -f "$pkgdir"/usr/share/doc/$pkgname/LICENSE
+}

Added: haskell-nothunks/trunk/hedgehog-1.1.1.patch
===================================================================
--- haskell-nothunks/trunk/hedgehog-1.1.1.patch	                        (rev 0)
+++ haskell-nothunks/trunk/hedgehog-1.1.1.patch	2022-04-06 20:07:59 UTC (rev 1181637)
@@ -0,0 +1,46 @@
+commit 357834dc4493cc955199d56bc69df7a66a0da367
+Author: Felix Yan <felixonmars at archlinux.org>
+Date:   Wed Apr 6 22:55:57 2022 +0300
+
+    Fix compatibility with hedgehog 1.1.1+
+
+diff --git a/nothunks.cabal b/nothunks.cabal
+index faa70a5..3b37089 100644
+--- a/nothunks.cabal
++++ b/nothunks.cabal
+@@ -72,10 +72,10 @@ test-suite nothunks-test
+                     , ghc-prim
+ 
+                       -- Additional dependencies
+-                    , hedgehog       >= 1.0 && < 1.1
++                    , hedgehog       >= 1.0 && < 1.2
+                     , random         >= 1.1 && < 1.3
+                     , tasty          >= 1.3 && < 1.5
+-                    , tasty-hedgehog >= 1.0 && < 1.2
++                    , tasty-hedgehog >= 1.0 && < 1.3
+ 
+     hs-source-dirs:   test
+     default-language: Haskell2010
+diff --git a/test/Test/NoThunks/Class.hs b/test/Test/NoThunks/Class.hs
+index b1eca72..d109acd 100644
+--- a/test/Test/NoThunks/Class.hs
++++ b/test/Test/NoThunks/Class.hs
+@@ -1,4 +1,5 @@
+ {-# LANGUAGE BangPatterns        #-}
++{-# LANGUAGE CPP                 #-}
+ {-# LANGUAGE DataKinds           #-}
+ {-# LANGUAGE DeriveFunctor       #-}
+ {-# LANGUAGE DeriveGeneric       #-}
+@@ -649,7 +650,11 @@ unsafeCheckNFAtomically expectedNF k = withTests 1 $ property $ k $ \x -> do
+ expectFailure :: Property -> Property
+ expectFailure p = withTests 1 $ property $ do
+     report <- liftIO $ displayRegion $ \r ->
+-                checkNamed r EnableColor (Just "EXPECTED FAILURE") p
++                checkNamed r EnableColor (Just "EXPECTED FAILURE")
++#if MIN_VERSION_hedgehog(1,1,1)
++                Nothing
++#endif
++                p
+     case reportStatus report of
+       Failed _ ->
+         success



More information about the arch-commits mailing list