packages feed

salmon-apps-0.1.0.0: salmon-apps.cabal

cabal-version:      2.4
name:               salmon-apps
version:            0.1.0.0
synopsis:           A set of utilities built with Salmon at their core.
description:        Tools useful for operating systems, and which benefit from specialized implementations configured via external files: salmon-migrator, salmon-pgpair, salmon-fleet, salmon-tui and others.
homepage:           https://lucasdicioccio.github.io/salmon/
bug-reports:        https://github.com/lucasdicioccio/salmon/issues
license:            BSD-3-Clause
license-file:       LICENSE
author:             Lucas DiCioccio
maintainer:         lucas@dicioccio.fr
copyright:          2022-2026 Lucas DiCioccio
category:           Development
build-type:         Simple
tested-with:        GHC == 9.10.3
extra-doc-files:    CHANGELOG.md

source-repository head
    type:     git
    location: https://github.com/lucasdicioccio/salmon
    subdir:   salmon-apps

library
    exposed-modules:
                    Fleet
                    Tui
                    Migrator
                    PgPair
                    QemuPgHaToy
                    PatroniRootfs
                    Initializer
                    GcpToy
                    PgBackup
    other-modules:
                    Migrator.Ops
                    Migrator.Seed
                    Migrator.Spec

    build-depends:    base >=4.16.3.0 && <4.22
                    , aeson
                    , brick
                    , bytestring
                    , http-client
                    , containers
                    , directory
                    , filepath
                    , layoutz-hs
                    , optparse-applicative
                    , optparse-generic
                    , process
                    , salmon-core ^>=0.1.0.0
                    , salmon-ops ^>=0.1.0.0
                    , salmon-ops-recipes ^>=0.1.0.0
                    , text
                    , time
                    , vty
                    , unix
    ghc-options:   -Wall
    hs-source-dirs:   src
    default-language: Haskell2010
    default-extensions: KindSignatures
                      , DataKinds
                      , OverloadedStrings
                      , DeriveFunctor
                      , OverloadedRecordDot
                      , TypeApplications
                      , ScopedTypeVariables

executable salmon-toy-qemu-pg-ha
    main-is:          QemuPgHaToyApp.hs
    build-depends:    base >=4.16.3.0 && <4.22
                    , salmon-apps
    hs-source-dirs:   app
    ghc-options:      -threaded
    default-language: Haskell2010

executable salmon-patroni-rootfs
    main-is:          PatroniRootfsApp.hs
    build-depends:    base >=4.16.3.0 && <4.22
                    , salmon-apps
    hs-source-dirs:   app
    ghc-options:      -threaded
    default-language: Haskell2010

executable salmon-pgpair
    main-is:          PgPairApp.hs
    build-depends:    base >=4.16.3.0 && <4.22
                    , salmon-apps
    hs-source-dirs:   app
    -- every salmon binary can end up running the concurrent driver (`run
    -- serve` does), and a node's own thread must not block the whole runtime.
    ghc-options:      -threaded
    default-language: Haskell2010

executable salmon-migrator
    main-is:          MigratorApp.hs

    -- Modules included in this executable, other than Main.
    -- other-modules:

    -- LANGUAGE extensions used by modules in this package.
    -- other-extensions:
    build-depends:    base >=4.16.3.0 && <4.22
                    , salmon-apps
    hs-source-dirs:   app
    -- every salmon binary can end up running the concurrent driver (`run
    -- serve` does), and a node's own thread must not block the whole runtime.
    ghc-options:      -threaded
    default-language: Haskell2010

executable salmon-init-locally
    main-is:          InitializerApp.hs

    build-depends:    base >=4.16.3.0 && <4.22
                    , salmon-apps
    hs-source-dirs:   app
    -- every salmon binary can end up running the concurrent driver (`run
    -- serve` does), and a node's own thread must not block the whole runtime.
    ghc-options:      -threaded
    default-language: Haskell2010

executable salmon-pg-backup
    main-is:          PgBackupApp.hs

    build-depends:    base >=4.16.3.0 && <4.22
                    , salmon-apps
    hs-source-dirs:   app
    ghc-options:      -threaded
    default-language: Haskell2010

executable salmon-fleet
    main-is:          FleetApp.hs

    build-depends:    base >=4.16.3.0 && <4.22
                    , salmon-apps
    hs-source-dirs:   app
    ghc-options:      -threaded
    default-language: Haskell2010

executable salmon-gcp-toy
    main-is:          GcpToyApp.hs

    build-depends:    base >=4.16.3.0 && <4.22
                    , salmon-apps
    hs-source-dirs:   app
    ghc-options:      -threaded
    default-language: Haskell2010

executable salmon-tui
    main-is:          TuiApp.hs

    build-depends:    base >=4.16.3.0 && <4.22
                    , salmon-apps
    hs-source-dirs:   app
    -- the stream is followed on its own thread while brick owns the terminal
    ghc-options:      -threaded
    default-language: Haskell2010

test-suite salmon-apps-test
    type:             exitcode-stdio-1.0
    main-is:          Main.hs
    hs-source-dirs:   test
    other-modules:    Test.FleetSpec
    build-depends:    base >=4.16.3.0 && <4.22
                    , aeson
                    , bytestring
                    , directory
                    , filepath
                    , salmon-apps
                    , salmon-ops ^>=0.1.0.0
                    , tasty
                    , tasty-hunit
                    , temporary
                    , text
                    , time
    ghc-options:      -Wall
    default-language: Haskell2010
    default-extensions: OverloadedStrings
                      , OverloadedRecordDot
                      , ScopedTypeVariables