cabal-version:       2.4

name:                nix-tree
synopsis:            Interactively browse a Nix store paths dependencies
description:         A terminal curses application to browse a Nix store paths dependencies
version:             0.6.2
homepage:            https://github.com/utdemir/nix-tree
license:             BSD-3-Clause
license-file:        LICENSE
author:              Utku Demir
maintainer:          Utku Demir
copyright:           Utku Demir
category:            Language.Nix
build-type:          Simple
extra-source-files:  README.md, CHANGELOG.md

common common-options
  ghc-options:        -threaded
                      -Wall -Wpartial-fields -Wincomplete-record-updates -Widentities
  default-language:   Haskell2010
  default-extensions: LambdaCase
                      OverloadedStrings
                      TupleSections
                      TypeApplications
                      GeneralizedNewtypeDeriving
                      DeriveGeneric
                      DeriveFunctor
                      DerivingStrategies
                      DeriveAnyClass
                      FlexibleInstances
                      DeriveLift
                      StandaloneDeriving
                      DataKinds
                      KindSignatures
                      NamedFieldPuns
                      RankNTypes
                      ScopedTypeVariables
                      NumericUnderscores
                      MultiWayIf
                      TemplateHaskell
  other-modules:      NixTree.PathStats
                      NixTree.StorePath
                      NixTree.App
                      Data.InvertedIndex
                      NixTree.Clipboard
  mixins:             base hiding (Prelude)
                    , relude (Relude as Prelude)
  build-depends:      base
                    , relude
                    , aeson
                    , brick >= 2.1
                    , bytestring
                    , containers
                    , clock
                    , filepath
                    , hrfsize
                    , text
                    , typed-process
                    , unordered-containers
                    , vty
                    , directory
                    , optparse-applicative
                    , microlens
                    , dot

executable nix-tree
  import:             common-options
  ghc-options:        -Wunused-packages -threaded -with-rtsopts=-N
  main-is:            NixTree/Main.hs
  hs-source-dirs:     src
  default-language:   Haskell2010
  build-depends:      base >= 4.11 && < 5
                    , terminal-progress-bar
                    , async

test-suite nix-tree-tests
  import:           common-options
  type:             exitcode-stdio-1.0
  hs-source-dirs:   test/ src/
  other-modules:    Test.Data.InvertedIndex
  main-is:          Test.hs
  build-depends:    base >=4.11 && < 5
                  , hedgehog