packages feed

hercules-ci-cnix-expr-0.2.0.0: hercules-ci-cnix-expr.cabal

cabal-version: 2.4

name:           hercules-ci-cnix-expr
version:        0.2.0.0
synopsis:       Bindings for the Nix evaluator
category:       Nix, CI, Testing, DevOps
homepage:       https://docs.hercules-ci.com
bug-reports:    https://github.com/hercules-ci/hercules-ci-agent/issues
author:         Hercules CI contributors
maintainer:     info@hercules-ci.com
copyright:      2018-2021 Hercules CI
license:        Apache-2.0
build-type:     Simple
extra-source-files:
    CHANGELOG.md

source-repository head
  type: git
  location: https://github.com/hercules-ci/hercules-ci-agent

flag nix-2_4
  description: Build for Nix >=2.4pre*
  default: False

-- match the C++ language standard Nix is using
common cxx-opts
  cxx-options:
    -std=c++17
    -Wall
  extra-libraries: stdc++

  if os(darwin)
    -- avoid https://gitlab.haskell.org/ghc/ghc/issues/11829
    ld-options:  -Wl,-keep_dwarf_unwind

  if impl(ghc >= 8.10)
    ghc-options:
      -optcxx-std=c++17
      -optcxx-Wall
  else
    ghc-options:
      -optc-std=c++17
      -optc-Wall
    if os(darwin)
      ghc-options: -pgmc=clang++


library
  import: cxx-opts
  exposed-modules:
      Hercules.CNix.Expr
      Hercules.CNix.Expr.Context
      Hercules.CNix.Expr.Raw
      Hercules.CNix.Expr.Typed

  hs-source-dirs:
      src
  default-extensions: DeriveGeneric DeriveTraversable DisambiguateRecordFields FlexibleContexts InstanceSigs LambdaCase MultiParamTypeClasses NoImplicitPrelude OverloadedStrings RankNTypes TupleSections TypeApplications TypeOperators
  ghc-options: -Wall -fwarn-tabs -fwarn-unused-imports -fwarn-missing-signatures -fwarn-name-shadowing -fwarn-incomplete-patterns
  build-depends:
      aeson
    , base >=4.7 && <5
    , bytestring
    , conduit
    , hercules-ci-cnix-store
    , containers
    , exceptions
    , inline-c
    , inline-c-cpp
    , protolude >= 0.3
    , text
    , unliftio
  default-language: Haskell2010
  include-dirs:
      include
  install-includes:
      hercules-ci-cnix/expr.hxx
  extra-libraries:
      boost_context

  if flag(nix-2_4)
    cpp-options:
        -DNIX_2_4
    pkgconfig-depends:
        nix-store >= 2.4
      , nix-expr >= 2.4
      , nix-main >= 2.4
  else
    pkgconfig-depends:
        nix-store >= 2.0
      , nix-expr >= 2.0
      , nix-main >= 2.0
      , bdw-gc