cabal-version:       2.2
name:                nix-narinfo
version:             0.1.1.1
synopsis:            Parse and render .narinfo files
description:         Support for parsing and rendering Nix .narinfo files
homepage:            https://github.com/sorki/nix-narinfo
license:             BSD-3-Clause
license-file:        LICENSE
author:              Sorki
maintainer:          srk@48.io
copyright:           2020 Sorki <srk@48.io>
category:            Nix
build-type:          Simple

extra-source-files:
    CHANGELOG.md
    README.md
    test/samples/0
    test/samples/1
    test/samples/guix0

library
  hs-source-dirs:      src
  exposed-modules:     Nix.NarInfo
  other-modules:       Nix.NarInfo.Builder
                     , Nix.NarInfo.Parser
                     , Nix.NarInfo.Types
  build-depends:       base >= 4.7 && < 5
                     , containers
                     , text
                     , attoparsec
  default-language:    Haskell2010

executable pretty-narinfo
  hs-source-dirs:      app
  main-is:             Main.hs
  ghc-options:         -threaded -rtsopts -with-rtsopts=-N
  build-depends:       base
                     , attoparsec
                     , text
                     , nix-narinfo
  default-language:    Haskell2010


test-suite nix-narinfo-samples
  type:                exitcode-stdio-1.0
  hs-source-dirs:      test
  main-is:             Spec.hs
  other-modules:       ParseSpec
                       SpecHelper
  build-depends:       base >= 4.7 && < 5
                     , attoparsec
                     , text
                     , nix-narinfo
                     , hspec
  build-tool-depends:  hspec-discover:hspec-discover
  default-language:    Haskell2010

test-suite nix-narinfo-property
  type:                exitcode-stdio-1.0
  hs-source-dirs:      test
  main-is:             Property.hs
  build-depends:       base >= 4.7 && < 5
                     , attoparsec
                     , filepath
                     , text
                     , nix-narinfo
                     , QuickCheck
  build-tool-depends:  hspec-discover:hspec-discover
  default-language:    Haskell2010

source-repository head
  type:     git
  location: https://github.com/sorki/nix-narinfo