File: persistent-sqlite.cabal

package info (click to toggle)
haskell-persistent-sqlite 2.13.3.1-1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 9,436 kB
  • sloc: ansic: 159,841; haskell: 1,754; makefile: 3
file content (187 lines) | stat: -rw-r--r-- 4,522 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
name:               persistent-sqlite
version:            2.13.3.1
license:            MIT
license-file:       LICENSE
author:             Michael Snoyman <michael@snoyman.com>
maintainer:         Michael Snoyman <michael@snoyman.com>
synopsis:           Backend for the persistent library using sqlite3.
description:
  This package includes a thin sqlite3 wrapper based on the direct-sqlite package, as well as the entire C library, so there are no system dependencies.

category:           Database, Yesod
stability:          Stable
cabal-version:      >=1.10
build-type:         Simple
homepage:           http://www.yesodweb.com/book/persistent
bug-reports:        https://github.com/yesodweb/persistent/issues
extra-source-files:
  cbits/*.c
  cbits/*.h
  ChangeLog.md

flag systemlib
  description: Use the system-wide sqlite library
  default:     False

flag use-pkgconfig
  description: Use pkg-config to find system sqlite library
  default:     False

flag build-sanity-exe
  description: Build a sanity check test executable
  default:     False

flag full-text-search
  description:
    Enable full-text search in the vendored SQLite library; has no effect if a system SQLite library is used.

  default:     True

flag uri-filenames
  description:
    Enable URI filenames in the vendored SQLite library; has no effect if a system SQLite library is used.

  default:     True

flag have-usleep
  description:
    Enable usleep in the vendored SQLite library; has no effect if a system SQLite library is used.

  default:     True

flag json1
  description:
    Enable json1 in the vendored SQLite library; has no effect if a system SQLite library is used.

  default:     True

flag use-stat3
  description:
    This flag is now a no-op, as the corresponding SQLite option is now a no-op; has no effect if a system SQLite library is used.

  default:     False

flag use-stat4
  description:
    Enable STAT4 in the vendored SQLite library (supercedes stat3); has no effect if a system SQLite library is used.

  default:     True

library
  build-depends:
      aeson                 >=1.0
    , base                  >=4.9     && <5
    , bytestring            >=0.10
    , conduit               >=1.2.12
    , containers            >=0.5
    , microlens-th          >=0.4.1.1
    , monad-logger          >=0.3.25
    , mtl
    , persistent            >=2.15.2.0  && <3
    , resource-pool
    , resourcet             >=1.1.9
    , text                  >=1.2
    , time
    , transformers          >=0.5
    , unliftio-core
    , unordered-containers

  exposed-modules:
    Database.Persist.Sqlite
    Database.Sqlite
    Database.Sqlite.Internal

  ghc-options:      -Wall
  default-language: Haskell2010

  if flag(systemlib)
    if flag(use-pkgconfig)
      pkgconfig-depends: sqlite3

    else
      extra-libraries: sqlite3

  else
    c-sources:        cbits/sqlite3.c
    include-dirs:     cbits
    includes:         sqlite3.h
    install-includes: sqlite3.h
    cc-options:       -fPIC -std=c99

  if flag(full-text-search)
    cc-options:
      -DSQLITE_ENABLE_FTS3 -DSQLITE_ENABLE_FTS3_PARENTHESIS
      -DSQLITE_ENABLE_FTS4 -DSQLITE_ENABLE_FTS5

  if flag(uri-filenames)
    cc-options: -DSQLITE_USE_URI

  if flag(have-usleep)
    cc-options: -DHAVE_USLEEP

  if flag(json1)
    cc-options: -DSQLITE_ENABLE_JSON1

  if flag(use-stat4)
    cc-options: -DSQLITE_ENABLE_STAT4

  c-sources:        cbits/config.c

  if !os(windows)
    extra-libraries: pthread

source-repository head
  type:     git
  location: https://github.com/yesodweb/persistent.git

executable sanity
  if flag(build-sanity-exe)
    buildable: True

  else
    buildable: False

  main-is:          sanity.hs
  hs-source-dirs:   test
  build-depends:
      base
    , monad-logger
    , persistent-sqlite

  default-language: Haskell2010

test-suite test
  type:             exitcode-stdio-1.0
  main-is:          main.hs
  hs-source-dirs:   test
  other-modules:
    Database.Persist.Sqlite.CompositeSpec
    SqliteInit

  ghc-options:      -Wall
  build-depends:
      base               >=4.9 && <5
    , bytestring
    , conduit
    , containers
    , exceptions
    , fast-logger
    , hspec              >=2.4
    , HUnit
    , microlens
    , monad-logger
    , mtl
    , persistent
    , persistent-sqlite
    , persistent-test
    , QuickCheck
    , resourcet
    , system-fileio
    , system-filepath
    , temporary
    , text
    , time
    , transformers
    , unliftio-core

  default-language: Haskell2010