[arch-commits] Commit in haskell-nothunks/repos (3 files)

Felix Yan felixonmars at gemini.archlinux.org
Sat Jun 11 11:43:45 UTC 2022


    Date: Saturday, June 11, 2022 @ 11:43:44
  Author: felixonmars
Revision: 1233044

archrelease: copy trunk to community-staging-x86_64

Added:
  haskell-nothunks/repos/community-staging-x86_64/
  haskell-nothunks/repos/community-staging-x86_64/PKGBUILD
    (from rev 1233043, haskell-nothunks/trunk/PKGBUILD)
  haskell-nothunks/repos/community-staging-x86_64/hedgehog-1.1.1.patch
    (from rev 1233043, haskell-nothunks/trunk/hedgehog-1.1.1.patch)

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

Copied: haskell-nothunks/repos/community-staging-x86_64/PKGBUILD (from rev 1233043, haskell-nothunks/trunk/PKGBUILD)
===================================================================
--- community-staging-x86_64/PKGBUILD	                        (rev 0)
+++ community-staging-x86_64/PKGBUILD	2022-06-11 11:43:44 UTC (rev 1233044)
@@ -0,0 +1,54 @@
+# Maintainer: Felix Yan <felixonmars at archlinux.org>
+
+_hkgname=nothunks
+pkgname=haskell-nothunks
+pkgver=0.1.3
+pkgrel=17
+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
+}
+
+build() {
+  cd $_hkgname-$pkgver
+
+  runhaskell Setup configure -O --enable-shared --enable-executable-dynamic --disable-library-vanilla \
+    --prefix=/usr --docdir=/usr/share/doc/$pkgname --datasubdir=$pkgname --enable-tests \
+    --dynlibdir=/usr/lib --libsubdir=\$compiler/site-local/\$pkgid --ghc-option=-fllvm \
+    --ghc-option=-optl-Wl\,-z\,relro\,-z\,now \
+    --ghc-option='-pie' \
+    -fbytestring -ftext -fvector
+
+  runhaskell Setup build $MAKEFLAGS
+  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 --show-details=direct
+}
+
+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
+}

Copied: haskell-nothunks/repos/community-staging-x86_64/hedgehog-1.1.1.patch (from rev 1233043, haskell-nothunks/trunk/hedgehog-1.1.1.patch)
===================================================================
--- community-staging-x86_64/hedgehog-1.1.1.patch	                        (rev 0)
+++ community-staging-x86_64/hedgehog-1.1.1.patch	2022-06-11 11:43:44 UTC (rev 1233044)
@@ -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