Modulehorizon-config-0.8.0GHC2024
Horizon.Config.Schema
The value schema a config denotes: a package set and the export
that turns it into nix. This is the vortex-native replacement for the
dhall-era Horizon.Spec.V0_10 — the very same ADTs, built on the
validated newtypes of Horizon.Config.Types, but deriving only
Eq/Show (no FromDhall/ToDhall). dhall contributed nothing here
but those instances, and the only place they were load-bearing was the
generator's lock file, which now hashes a Show encoding instead.
A config script (a Spec) folds into a
PackageSet; the writers (folded into horizon-config-shell) consume
a PackageSetExportSettings or OverlayExportSettings and emit nix.
One schema, one package: the DSL and its denotation live together, and
horizon-spec is gone from the path.
- 30 types
- 15 values
- Packagehorizon-config-0.8.0
- Exports45
- LanguageGHC2024
- LicenceBSD-3-Clause
- SourceSchema.hs
Sources
9 declarationsA source subdirectory within a repo or tarball. A real relative directory (parsed at the fold boundary), so the writers can place it into cabal2nix's subpath directly.
Constructors
Instances2Eq, Show
Eq SubdirPathDefined in horizon-config-0.8.0 · Horizon.Config.SchemaShow SubdirPathDefined in horizon-config-0.8.0 · Horizon.Config.Schema
A Hackage package pinned to a version.
Constructors
Instances2Eq, Show
Eq HackageSourceDefined in horizon-config-0.8.0 · Horizon.Config.SchemaShow HackageSourceDefined in horizon-config-0.8.0 · Horizon.Config.Schema
A git package: repo, revision, optional subdirectory.
Constructors
A tarball package: url, optional subdirectory.
Constructors
Instances2Eq, Show
Eq TarballSourceDefined in horizon-config-0.8.0 · Horizon.Config.SchemaShow TarballSourceDefined in horizon-config-0.8.0 · Horizon.Config.Schema
A local package: its source is a subdirectory of the config's own repo
(inputs.self), not a fetched artifact. Lets a set include a project
developed alongside it — the code you are writing here — rather than only
upstream releases.
Constructors
Instances2Eq, Show
Eq LocalSourceDefined in horizon-config-0.8.0 · Horizon.Config.SchemaShow LocalSourceDefined in horizon-config-0.8.0 · Horizon.Config.Schema
A secure cabal repository a set pins packages from: its name (the one cabal keeps its index under), its URL, how many root keys must sign its root metadata, and the root key ids.
Constructors
Instances2Eq, Show
Eq SecureRepositoryDefined in horizon-config-0.8.0 · Horizon.Config.SchemaShow SecureRepositoryDefined in horizon-config-0.8.0 · Horizon.Config.Schema
A package pinned to a version in a secure repository other than Hackage. The repository is part of the source, so a pin that moves to another repository, or a repository that changes its URL or keys, is a different pin.
Constructors
Instances2Eq, Show
Eq RepositorySourceDefined in horizon-config-0.8.0 · Horizon.Config.SchemaShow RepositorySourceDefined in horizon-config-0.8.0 · Horizon.Config.Schema
Where a package's source comes from.
Instances2Eq, Show
Eq HaskellSourceDefined in horizon-config-0.8.0 · Horizon.Config.SchemaShow HaskellSourceDefined in horizon-config-0.8.0 · Horizon.Config.Schema
Packages
9 declarationsPer-package build modifiers the writer applies (jailbreak, run tests, include benchmarks, …).
Constructors
The default: build the library (and executables) only, no tests/benchmarks, no jailbreak, no profiling, haddock on.
A cabal flag toggle for a package.
Constructors
A native library a package binds: the callPackage argument its
derivation takes and the nixpkgs attribute that supplies it, e.g.
libblst from pkgs.blst. Usually the two are the same name.
Constructors
A package in the set. What is genuinely per-package: where its source comes from, source patches, native (system) libraries it binds, and its cabal flags. Build policy (jailbreak, tests, …) is NOT here — that is a neighbourhood property of the whole set (Modifiers on PackageSet), all-or-nothing by design.
Constructors
MkHaskellPackagesource :: HaskellSourcepatches :: [FilePath]Source diffs to apply to this package (the
.patchfiles stay raw in the repo; these are their paths, relative to the repo root).systemDeps :: [SystemDep]Native libraries this package binds, each passed as an argument at its
callPackage.flags :: [CabalFlag]
Instances2Eq, Show
Eq HaskellPackageDefined in horizon-config-0.8.0 · Horizon.Config.SchemaShow HaskellPackageDefined in horizon-config-0.8.0 · Horizon.Config.Schema
A package from a source, with no per-package overrides.
The packages in a set, by name.
Constructors
Instances2Eq, Show
Eq PackageListDefined in horizon-config-0.8.0 · Horizon.Config.SchemaShow PackageListDefined in horizon-config-0.8.0 · Horizon.Config.Schema
A whole package set: a compiler, the set-wide build policy (Modifiers — the neighbourhood property applied uniformly), and the packages.
Constructors
Instances2Eq, Show
Eq PackageSetDefined in horizon-config-0.8.0 · Horizon.Config.SchemaShow PackageSetDefined in horizon-config-0.8.0 · Horizon.Config.Schema
An overlay: the packages a base set is missing, as a package set.
Constructors
Repository scope
5 declarationsWhat a repository declares about the Haskell it builds, beyond its
pins: the licence, the warnings contract, the default language and
extensions of its packages, and the nixConfig of its flake. A set
that declares none of it is noRepoScope.
Constructors
MkRepoScoperepoLicense :: Maybe SpdxrepoWarnings :: Maybe WarningsrepoLanguage :: Maybe LanguagerepoExtensions :: [Extension]In declared order, each once.
repoNixConfig :: [(Text, Text)]In declared order; a later pair for a key replaces an earlier one.
A test suite of a local package: its name and the file it runs.
Constructors
What a repository declares about one of its local packages beyond its pin: the modules it exposes and keeps internal, its test suites and the backends it builds for. A package with none is noPackageFacts.
Constructors
MkPackageFactsfactsExposed :: Set ModuleNamefactsInternal :: Set ModuleNamefactsSuites :: [Suite]In declared order, one per name.
factsBackends :: [Backend]In declared order, each once.
Instances2Eq, Show
Eq PackageFactsDefined in horizon-config-0.8.0 · Horizon.Config.SchemaShow PackageFactsDefined in horizon-config-0.8.0 · Horizon.Config.Schema
Export targets
6 declarationsThe directory the per-package .nix files are written into (pkgs).
Constructors
Instances2Eq, Show
Eq PackagesDirDefined in horizon-config-0.8.0 · Horizon.Config.SchemaShow PackagesDirDefined in horizon-config-0.8.0 · Horizon.Config.Schema
The file a whole package set is written to (e.g. initial-packages.nix).
Constructors
Instances2Eq, Show
Eq PackageSetFileDefined in horizon-config-0.8.0 · Horizon.Config.SchemaShow PackageSetFileDefined in horizon-config-0.8.0 · Horizon.Config.Schema
The file an overlay is written to (e.g. overlay.nix).
Constructors
Instances2Eq, Show
Eq OverlayFileDefined in horizon-config-0.8.0 · Horizon.Config.SchemaShow OverlayFileDefined in horizon-config-0.8.0 · Horizon.Config.Schema
Everything the writer needs to emit a package set.
Instances2Eq, Show
Eq PackageSetExportSettingsDefined in horizon-config-0.8.0 · Horizon.Config.SchemaShow PackageSetExportSettingsDefined in horizon-config-0.8.0 · Horizon.Config.Schema
Everything the writer needs to emit an overlay.
Constructors
Instances2Eq, Show
Eq OverlayExportSettingsDefined in horizon-config-0.8.0 · Horizon.Config.SchemaShow OverlayExportSettingsDefined in horizon-config-0.8.0 · Horizon.Config.Schema
Which export a config asked for.
Instances2Eq, Show
Eq HorizonExportDefined in horizon-config-0.8.0 · Horizon.Config.SchemaShow HorizonExportDefined in horizon-config-0.8.0 · Horizon.Config.Schema
Bases
11 declarationsThe branch a repository is followed on: branch "lts/ghc-10.0.x".
The commit is the flake lock's, not the config's.
Constructors
A repository and the branch it is followed on.
Constructors
A package set another set is layered on: its name and where it lives.
Constructors
A lower package set, as a base: set "horizon-core" (forge …) (branch …).
A toolchain root, as a base: toolchain (forge …) (branch …).
The flake input a base is: a lower set's name, or a toolchain's repository name, the last segment of its path.
Smart constructors
5 declarationsA Hackage package at a version.
A git package: repo, revision, optional subdirectory.
A tarball package: url, optional subdirectory.
A package whose source is a subdirectory of the config's own repo.
A package at a version from a secure repository other than Hackage.