packages feed

nixfmt-0.4.0: nixfmt.cabal

cabal-version:       2.0

-- © 2019 Serokell <hi@serokell.io>
-- © 2019 Lars Jellema <lars.jellema@gmail.com>
--
-- SPDX-License-Identifier: MPL-2.0

name:                nixfmt
version:             0.4.0
synopsis:            An opinionated formatter for Nix
description:
  A formatter for Nix that ensures consistent and clear formatting by forgetting
  all existing formatting during parsing.
homepage:            https://github.com/serokell/nixfmt
bug-reports:         https://github.com/serokell/nixfmt/issues
license:             MPL-2.0
license-file:        LICENSE
author:              Lars Jellema
maintainer:          lars.jellema@gmail.com
copyright:           2019 Serokell, 2019 Lars Jellema
category:            Development
build-type:          Simple
extra-source-files:  README.md, CHANGELOG.md

source-repository head
  type:     git
  location: git://github.com/serokell/nixfmt.git

executable nixfmt
  main-is:             Main.hs
  other-modules:
    Paths_nixfmt
    System.IO.Utf8
    System.IO.Atomic
  autogen-modules:
    Paths_nixfmt
  other-extensions:    DeriveDataTypeable
  hs-source-dirs:      main
  if impl(ghcjs)
    buildable: False
  else
    buildable: True
  build-depends:
      base             >= 4.12.0 && < 4.13
    , cmdargs          >= 0.10.20 && < 0.11
    , nixfmt
    , unix             >= 2.7.2 && < 2.8
    , text             >= 1.2.3 && < 1.3

    -- for System.IO.Atomic
    , directory        >= 1.3.3 && < 1.4
    , filepath         >= 1.4.2 && < 1.5
    , safe-exceptions  >= 0.1.7 && < 0.2
  default-language:    Haskell2010
  ghc-options:
    -Wall
    -Wcompat
    -Wincomplete-record-updates
    -Wincomplete-uni-patterns
    -Wredundant-constraints
    -threaded

library
  exposed-modules:
    Nixfmt
    Nixfmt.Lexer
    Nixfmt.Parser
    Nixfmt.Predoc
    Nixfmt.Pretty
    Nixfmt.Types
    Nixfmt.Util
  other-extensions:    OverloadedStrings, LambdaCase, FlexibleInstances, DeriveFoldable, DeriveFunctor, StandaloneDeriving
  hs-source-dirs:      src
  build-depends:
      base             >= 4.12.0 && < 4.13
    , megaparsec       >= 7.0.5 && < 7.1
    , parser-combinators >= 1.0.3 && < 1.3
    , text             >= 1.2.3 && < 1.3
  default-language:    Haskell2010
  ghc-options:
    -Wall
    -Wcompat
    -Wincomplete-record-updates
    -Wincomplete-uni-patterns
    -Wredundant-constraints
    -Wno-orphans

executable js-interface
  main-is: JSInterface.hs

  if impl(ghcjs)
    buildable: True
    ghc-options:
      -Wall
      -Wcompat
      -Wincomplete-record-updates
      -Wincomplete-uni-patterns
      -Wredundant-constraints
      -Wno-orphans
    build-depends:
        base           >= 4.12.0 && < 4.13
      , ghcjs-base     >= 0.2.0 && < 0.3
      , nixfmt
    js-sources:        js/js-interface-wrapper.js
    hs-source-dirs:    js/
  else
    buildable: False

  default-language: Haskell2010