nova-cache-0.10.0.0: nova-cache.cabal
cabal-version: 3.0
name: nova-cache
version: 0.10.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 (whole-tree and streaming), narinfo
parsing, Ed25519 signing, store path handling, and content
validation - with an optional WAI server, and bounded xz and zstd
codecs as the public @nova-cache:xz@ and @nova-cache:zstandard@
sublibraries.
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.14.1
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.NAR.Stream
NovaCache.NarInfo
NovaCache.SafeName
NovaCache.Server
NovaCache.Signing
NovaCache.Store
NovaCache.StorePath
NovaCache.Validate
build-depends:
base >= 4.22 && < 5
, base64-bytestring >= 1.2 && < 1.3
, bytestring >= 0.11 && < 0.13
, containers >= 0.6 && < 0.9
, crypton >= 1.1 && < 2
, directory >= 1.3.8 && < 1.4
, filepath >= 1.4.100 && < 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
-- The bounded xz decoder as a solver-visible opt-in: a consumer that
-- substitutes foreign caches writes build-depends: nova-cache:xz and
-- gets the module; everyone else never builds lzma-static's bundled
-- liblzma. This replaces the manual xz flag - a dependency's flag
-- cannot be set from a consumer's .cabal file, which forced mirror
-- flags and matching constraints downstream (nova-nix#27) - while
-- keeping the 0.5.0.0 lesson: xz stays out of the default install.
library xz
visibility: public
exposed-modules: NovaCache.Xz
hs-source-dirs: src
default-language: Haskell2010
default-extensions:
BangPatterns
OverloadedStrings
ghc-options:
-Wall
-Wcompat
-Wincomplete-record-updates
-Wincomplete-uni-patterns
build-depends:
base >= 4.22 && < 5
, bytestring >= 0.11 && < 0.13
, lzma-static >= 5.2.5 && < 5.3
-- The bounded zstd codec, the same solver-visible opt-in as xz.
-- Named zstandard, not zstd: an in-package component name shadows the
-- like-named external package in every build-depends of this package,
-- so a sublibrary called zstd could never depend on the zstd binding.
-- Consumers substituting from zstd caches (or pushing compressed)
-- depend on nova-cache:zstandard; the zstd package bundles libzstd's
-- C sources, so nobody else builds them.
library zstandard
visibility: public
exposed-modules: NovaCache.Zstd
hs-source-dirs: src
default-language: Haskell2010
default-extensions:
BangPatterns
OverloadedStrings
ghc-options:
-Wall
-Wcompat
-Wincomplete-record-updates
-Wincomplete-uni-patterns
build-depends:
base >= 4.22 && < 5
, bytestring >= 0.11 && < 0.13
, zstd >= 0.1 && < 0.2
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.22 && < 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.22 && < 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
test-suite nova-cache-xz-test
type: exitcode-stdio-1.0
main-is: XzTest.hs
hs-source-dirs: test
default-language: Haskell2010
default-extensions:
OverloadedStrings
ghc-options: -Wall -Wcompat
build-depends:
base >= 4.22 && < 5
, bytestring >= 0.11 && < 0.13
, nova-cache:xz
test-suite nova-cache-zstd-test
type: exitcode-stdio-1.0
main-is: ZstdTest.hs
hs-source-dirs: test
default-language: Haskell2010
default-extensions:
OverloadedStrings
ghc-options: -Wall -Wcompat
build-depends:
base >= 4.22 && < 5
, bytestring >= 0.11 && < 0.13
, nova-cache:zstandard
source-repository head
type: git
location: https://github.com/Novavero-AI/nova-cache
branch: main