packages feed

nova-cache-0.5.0.0: nova-cache.cabal

cabal-version:      3.0
name:               nova-cache
version:            0.5.0.0
synopsis:           Pure-first Nix binary cache protocol library
description:
  A pure-first library implementing the Nix binary cache protocol -
  nix-base32, NAR serialization, narinfo parsing, Ed25519 signing, store
  path handling, and content validation - with an optional WAI server.

license:            Apache-2.0
license-file:       LICENSE
copyright:          2026 Novavero AI Inc.
author:             Devon Tomlin
maintainer:         devon.tomlin@novavero.ai
homepage:           https://github.com/Novavero-AI/nova-cache
bug-reports:        https://github.com/Novavero-AI/nova-cache/issues
category:           Nix, Distribution
stability:          experimental
build-type:         Simple
tested-with:        GHC == 9.8.4
extra-doc-files:
    CHANGELOG.md
    NOTICE
    README.md

flag server
  description: Build the cache server executable (pulls in warp and wai-extra)
  default:     False
  manual:      True

library
  exposed-modules:
    NovaCache.Base32
    NovaCache.Base64
    NovaCache.Hash
    NovaCache.NAR
    NovaCache.NarInfo
    NovaCache.Server
    NovaCache.Signing
    NovaCache.Store
    NovaCache.StorePath
    NovaCache.Validate

  build-depends:
      base                >= 4.16 && < 5
    , base64-bytestring   >= 1.2 && < 1.3
    , bytestring          >= 0.11 && < 0.13
    , containers          >= 0.6 && < 0.9
    , crypton             >= 1.1 && < 2
    , directory           >= 1.3 && < 1.4
    , filepath            >= 1.4 && < 1.6
    , http-types          >= 0.12 && < 0.13
    , ram                 >= 0.20 && < 1
    , text                >= 2.0 && < 2.2
    , vector              >= 0.12 && < 0.14
    , wai                 >= 3.2 && < 3.3


  hs-source-dirs:   src
  default-language:  Haskell2010
  default-extensions:
    BangPatterns
    OverloadedStrings
  ghc-options:
    -Wall
    -Wcompat
    -Wincomplete-record-updates
    -Wincomplete-uni-patterns

executable nova-cache-server
  if !flag(server)
    buildable: False

  main-is:          Main.hs
  other-modules:    LandingPage
  hs-source-dirs:   exe
  default-language:  Haskell2010
  default-extensions:
    OverloadedStrings
  ghc-options:      -Wall -Wcompat -threaded -rtsopts

  build-depends:
      base                >= 4.16 && < 5
    , bytestring          >= 0.11 && < 0.13
    , nova-cache
    , http-types          >= 0.12 && < 0.13
    , text                >= 2.0 && < 2.2
    , wai                 >= 3.2 && < 3.3
    , wai-extra           >= 3.1 && < 3.2
    , warp                >= 3.3 && < 3.5

test-suite nova-cache-test
  type:             exitcode-stdio-1.0
  main-is:          Main.hs
  hs-source-dirs:   test
  default-language: Haskell2010
  default-extensions:
    OverloadedStrings
  ghc-options:      -Wall -Wcompat

  build-depends:
      base                >= 4.16 && < 5
    , base64-bytestring   >= 1.2 && < 1.3
    , bytestring          >= 0.11 && < 0.13
    , crypton             >= 1.1 && < 2
    , directory           >= 1.3 && < 1.4
    , http-types          >= 0.12 && < 0.13
    , nova-cache
    , ram                 >= 0.20 && < 1
    , text                >= 2.0 && < 2.2
    , wai                 >= 3.2 && < 3.3
    , wai-extra           >= 3.1 && < 3.2

source-repository head
  type:     git
  location: https://github.com/Novavero-AI/nova-cache
  branch:   main