name:          process
version:       1.6.18.0
-- NOTE: Don't forget to update ./changelog.md
license:       BSD3
license-file:  LICENSE
maintainer:    libraries@haskell.org
bug-reports:   https://github.com/haskell/process/issues
synopsis:      Process libraries
category:      System
build-type:    Configure
cabal-version: >=1.10
description:
    This package contains libraries for dealing with system processes.
    .
    The typed-process package is a more recent take on a process API,
    which uses this package internally. It features better binary
    support, easier concurrency, and a more composable API. You can
    read more about it at
    <https://github.com/fpco/typed-process/#readme>.

extra-source-files:
    aclocal.m4
    changelog.md
    configure
    configure.ac
    include/HsProcessConfig.h.in
    process.buildinfo
    exes/echo.bat
    exes/subdir/echo.bat
    cbits/posix/common.h

extra-tmp-files:
    autom4te.cache
    config.log
    config.status
    include/HsProcessConfig.h

source-repository head
    type:     git
    location: https://github.com/haskell/process.git

library
    default-language: Haskell2010
    other-extensions:
        BangPatterns
        CPP
        InterruptibleFFI
        RecordWildCards
        Trustworthy
        Safe

    exposed-modules:
        System.Cmd
        System.Process
        System.Process.Internals
    other-modules: System.Process.Common
    if os(windows)
        c-sources:
            cbits/win32/runProcess.c
        other-modules: System.Process.Windows
        build-depends: Win32 >=2.4 && < 2.14
        -- ole32 and rpcrt4 are needed to create GUIDs for unique named pipes
        -- for process.
        extra-libraries: kernel32, ole32, rpcrt4
        cpp-options: -DWINDOWS
    else
        if arch(javascript)
            js-sources:
                jsbits/process.js
            other-modules: System.Process.JavaScript
        else
            c-sources:
                cbits/posix/runProcess.c
                cbits/posix/fork_exec.c
                cbits/posix/posix_spawn.c
                cbits/posix/find_executable.c
            other-modules: System.Process.Posix
            build-depends: unix >= 2.5 && < 2.9

    include-dirs: include
    includes:
        runProcess.h
    install-includes:
        runProcess.h
        processFlags.h

    ghc-options: -Wall

    build-depends: base      >= 4.10 && < 4.20,
                   directory >= 1.1 && < 1.4,
                   filepath  >= 1.2 && < 1.5,
                   deepseq   >= 1.1 && < 1.6

test-suite test
  default-language: Haskell2010
  hs-source-dirs: test
  main-is: main.hs
  type: exitcode-stdio-1.0
  -- Add otherwise redundant bounds on base since GHC's build system runs
  -- `cabal check`, which mandates bounds on base.
  build-depends: base >= 4 && < 5
               , bytestring
               , directory
               , process
  ghc-options: -threaded
               -with-rtsopts "-N"
  if os(windows)
        cpp-options: -DWINDOWS