packages feed

hnix-store-db-0.1.0.1: hnix-store-db.cabal

cabal-version:       2.2
name:                hnix-store-db
version:             0.1.0.1
synopsis:            Nix store database support
description:         Implementation of the Nix store database
homepage:            https://github.com/haskell-nix/hnix-store
license:             Apache-2.0
license-file:        LICENSE
author:              Sorki
maintainer:          srk@48.io
copyright:           2023 Sorki
category:            Nix
build-type:          Simple
extra-doc-files:
    CHANGELOG.md
extra-source-files:
    README.md
  , README.lhs

flag build-bench
  default:
    False
  description:
    Build db-bench executable

flag build-readme
  default:
    False
  description:
    Build README.lhs example

common commons
  ghc-options: -Wall -Wunused-packages
  default-extensions:
      OverloadedStrings
    , DataKinds
    , DeriveGeneric
    , DeriveDataTypeable
    , DeriveFunctor
    , DeriveFoldable
    , DeriveTraversable
    , DeriveLift
    , DerivingStrategies
    , FlexibleContexts
    , FlexibleInstances
    , GADTs
    , GeneralizedNewtypeDeriving
    , RecordWildCards
    , ScopedTypeVariables
    , StandaloneDeriving
    , TypeApplications
    , TypeFamilies
    , TypeOperators
    , TypeSynonymInstances
    , InstanceSigs
    , MultiParamTypeClasses
    , TupleSections
    , LambdaCase
    , BangPatterns
    , ViewPatterns
  default-language: Haskell2010

library
  import: commons
  hs-source-dirs:   src
  exposed-modules:
      System.Nix.Store.DB
    , System.Nix.Store.DB.Query
    , System.Nix.Store.DB.Instances
    , System.Nix.Store.DB.Run
    , System.Nix.Store.DB.Schema
    , System.Nix.Store.DB.Util

  build-depends:
      base >=4.10 && <5
    , hnix-store-core >= 0.8
    , attoparsec
    , bytestring
    , bytestring
    , data-default-class
    , text
    , time
    , esqueleto >= 3.5.10 && < 3.7
    , persistent >= 2.14.5 && < 2.18
    , persistent-sqlite >= 2.13.1 && < 2.14
    , template-haskell
    , monad-logger
    , microlens
    , fast-logger
    , transformers
    , unliftio-core

executable db-readme
  if !flag(build-readme)
    buildable: False
  build-depends:
      base >=4.12 && <5
    , data-default-class
    , esqueleto
    , hnix-store-core
    , hnix-store-db
  build-tool-depends:
      markdown-unlit:markdown-unlit
  default-language: Haskell2010
  main-is: README.lhs
  ghc-options: -pgmL markdown-unlit -Wall

executable db-bench
  if !flag(build-bench)
    buildable: False
  build-depends:
      base >=4.12 && <5
    , hnix-store-db
  default-language: Haskell2010
  hs-source-dirs:   apps
  main-is: Bench.hs
  ghc-options: -Wall

test-suite db
  import: commons
  type:             exitcode-stdio-1.0
  main-is:          Smoke.hs
  hs-source-dirs:   tests
  build-depends:
      base
    , hnix-store-db