packages feed

rozbir-0.1.0.0: rozbir.cabal

cabal-version:   3.0
name:            rozbir
version:         0.1.0.0
synopsis:        parse, evaluate, edit and lint RPM spec files
description:
  rozbir is a pure library for RPM spec files. it parses them into a
  lossless syntax tree, partially evaluates macros and conditionals without
  running any shell or Lua, edits them with minimal diffs, and lints them.

category:        Distribution
homepage:        https://github.com/terrapkg/rozbir
bug-reports:     https://github.com/terrapkg/rozbir/issues
license:         GPL-3.0-or-later
license-file:    LICENSE.md
author:          Cypress Reed
maintainer:      cypress@fyralabs.com
build-type:      Simple
extra-doc-files:
  CHANGELOG.md
  README.md

tested-with:     GHC ==9.6.6 || ==9.10.3

source-repository head
  type:     git
  location: https://github.com/terrapkg/rozbir.git

common shared
  default-language:   GHC2021
  default-extensions:
    DeriveAnyClass
    DerivingStrategies
    LambdaCase
    MultiWayIf
    OverloadedStrings
    RecordWildCards

  ghc-options:
    -Wall -Wcompat -Widentities -Wincomplete-uni-patterns
    -Wincomplete-record-updates -Wredundant-constraints

  build-depends:
    , base        >=4.18    && <4.21
    , containers  >=0.6.7   && <0.8
    , deepseq     >=1.4.8   && <1.6
    , text        >=2.0.2   && <2.2

library
  import:          shared
  hs-source-dirs:  src
  exposed-modules:
    Rozbir
    Rozbir.Changelog
    Rozbir.Edit
    Rozbir.Eval
    Rozbir.Eval.Builtin
    Rozbir.Eval.LuaPattern
    Rozbir.Eval.Shell
    Rozbir.Eval.Types
    Rozbir.IO
    Rozbir.Lint
    Rozbir.Lint.Core
    Rozbir.Lint.Rpmlint
    Rozbir.Lint.Terra
    Rozbir.Lint.Types
    Rozbir.MacroFile
    Rozbir.Query
    Rozbir.Spec
    Rozbir.Syntax
    Rozbir.Syntax.Expr
    Rozbir.Syntax.Parse
    Rozbir.Syntax.Render
    Rozbir.Version

  build-depends:
    , aeson       >=2.1.2   && <2.4
    , bytestring  >=0.11.5  && <0.13
    , directory   >=1.3.8   && <1.4
    , filepath    >=1.4.300 && <1.6
    , mtl         >=2.3.1   && <2.4
    , deepseq
    , time        >=1.12.2  && <1.13

test-suite rozbir-test
  import:         shared
  type:           exitcode-stdio-1.0
  hs-source-dirs: test
  main-is:        Spec.hs
  ghc-options:    -threaded
  other-modules:
    Arbitrary
    EditSpec
    EvalSpec
    ExprSpec
    LintSpec
    ParseSpec
    QuerySpec
    ShellSpec
    TotalitySpec
    VersionSpec

  build-depends:
    , hspec       >=2.11.9  && <2.12
    , QuickCheck  >=2.14.3  && <2.20
    , rozbir
    , time        >=1.12.2  && <1.13