packages feed

nix-lang-qq-0.1.0.0: nix-lang-qq.cabal

cabal-version: 3.0
name:          nix-lang-qq
version:       0.1.0.0
synopsis:
  Quasiquoter for generated Nix expressions with antiquotation

description:
  nix-lang-qq provides a Template Haskell quasiquoter on top of nix-lang.
  It parses Nix snippets with antiquotation support and lowers them into the
  fresh Syn AST used by RFCPrint.

category:      Nix
license:       BSD-3-Clause
license-file:  LICENSE
author:        berberman
maintainer:    berberman <berberman@yandex.com>
copyright:     Copyright (c) berberman 2022-2026
tested-with:   GHC ==9.10.3
build-type:    Simple

common common-attrs
  build-depends:      base ^>=4.20
  default-language:   Haskell2010
  ghc-options:
    -Wall -Wcompat -Widentities -Wincomplete-uni-patterns
    -Wincomplete-record-updates

  if impl(ghc >=8.0)
    ghc-options: -Wredundant-constraints

  if impl(ghc >=8.2)
    ghc-options: -fhide-source-paths

  default-extensions:
    BangPatterns
    ConstraintKinds
    DataKinds
    DeriveAnyClass
    DeriveFunctor
    DeriveGeneric
    DerivingStrategies
    DerivingVia
    FlexibleContexts
    FlexibleInstances
    FunctionalDependencies
    KindSignatures
    LambdaCase
    NoStarIsType
    OverloadedStrings
    RecordWildCards
    ScopedTypeVariables
    TupleSections
    TypeApplications
    TypeFamilies
    TypeOperators
    ViewPatterns

library
  import:          common-attrs
  hs-source-dirs:  src
  build-depends:
    , containers        ^>=0.7
    , haskell-src-meta  ^>=0.8
    , megaparsec        ^>=9.7.0
    , nix-lang
    , template-haskell  ^>=2.22.0
    , text              ^>=2.1.3

  exposed-modules: Nix.Lang.QQ

test-suite nix-lang-qq-test
  import:         common-attrs
  type:           exitcode-stdio-1.0
  hs-source-dirs: test
  main-is:        Spec.hs
  build-depends:
    , nix-lang
    , nix-lang-qq
    , tasty
    , tasty-hunit
    , text