Accepting request 932892 from devel:languages:haskell

Automatic submission by obs-autosubmit

OBS-URL: https://build.opensuse.org/request/show/932892
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/ghc-generic-random?expand=0&rev=4
This commit is contained in:
Dominique Leuenberger 2021-12-19 16:34:21 +00:00 committed by Git OBS Bridge
commit 39dadbe8dc
3 changed files with 113 additions and 0 deletions

105
generic-random.cabal Normal file
View File

@ -0,0 +1,105 @@
name: generic-random
version: 1.5.0.0
x-revision: 1
synopsis: Generic random generators for QuickCheck
description:
Derive instances of @Arbitrary@ for QuickCheck,
with various options to customize implementations.
.
For more information
.
- See the README
.
- "Generic.Random.Tutorial"
.
- http://blog.poisson.chat/posts/2018-01-05-generic-random-tour.html
homepage: http://github.com/lysxia/generic-random
license: MIT
license-file: LICENSE
stability: Stable
author: Li-yao Xia
maintainer: lysxia@gmail.com
category: Generics, Testing
build-type: Simple
extra-source-files: README.md CHANGELOG.md
cabal-version: >=1.10
tested-with: GHC == 8.4.1, GHC == 8.6.1, GHC == 8.8.4, GHC == 8.10.5, GHC == 9.0.1
library
hs-source-dirs: src
exposed-modules:
Generic.Random
Generic.Random.DerivingVia
Generic.Random.Internal.BaseCase
Generic.Random.Internal.Generic
Generic.Random.Tutorial
build-depends:
base >= 4.11 && < 4.16,
QuickCheck >= 2.14
-- exports RecursivelyShrink
default-language: Haskell2010
ghc-options: -Wall -fno-warn-name-shadowing
source-repository head
type: git
location: https://github.com/lysxia/generic-random
test-suite unit
hs-source-dirs: test
main-is: Unit.hs
build-depends:
base,
deepseq,
QuickCheck,
generic-random
type: exitcode-stdio-1.0
default-language: Haskell2010
test-suite coherence
hs-source-dirs: test
main-is: coherence.hs
build-depends:
base,
deepseq,
QuickCheck,
generic-random
type: exitcode-stdio-1.0
default-language: Haskell2010
test-suite inspect
hs-source-dirs: test
main-is: Inspect.hs
build-depends:
base,
QuickCheck,
inspection-testing,
generic-random
type: exitcode-stdio-1.0
default-language: Haskell2010
if !flag(enable-inspect)
buildable: False
else
build-depends: random < 1.2
-- TODO: this test fails with newer versions of random
test-suite inspect-derivingvia
hs-source-dirs: test
main-is: Inspect/DerivingVia.hs
build-depends:
base,
QuickCheck,
inspection-testing,
generic-random
type: exitcode-stdio-1.0
default-language: Haskell2010
if !flag(enable-inspect)
buildable: False
else
build-depends: random < 1.2
-- TODO: this test fails with newer versions of random
flag enable-inspect
description: Enable inspection tests
default: False
manual: True

View File

@ -1,3 +1,9 @@
-------------------------------------------------------------------
Mon Nov 15 06:59:51 UTC 2021 - psimons@suse.com
- Update generic-random to version 1.5.0.0 revision 1.
Upstream has revised the Cabal build instructions on Hackage.
-------------------------------------------------------------------
Thu Jul 15 16:15:26 UTC 2021 - psimons@suse.com

View File

@ -25,6 +25,7 @@ Summary: Generic random generators for QuickCheck
License: MIT
URL: https://hackage.haskell.org/package/%{pkg_name}
Source0: https://hackage.haskell.org/package/%{pkg_name}-%{version}/%{pkg_name}-%{version}.tar.gz
Source1: https://hackage.haskell.org/package/%{pkg_name}-%{version}/revision/1.cabal#/%{pkg_name}.cabal
BuildRequires: ghc-Cabal-devel
BuildRequires: ghc-QuickCheck-devel
BuildRequires: ghc-rpm-macros
@ -57,6 +58,7 @@ This package provides the Haskell %{pkg_name} library development files.
%prep
%autosetup -n %{pkg_name}-%{version}
cp -p %{SOURCE1} %{pkg_name}.cabal
%build
%ghc_lib_build