cabal-scaffold

[ bsd3, library, program, unclassified ] [ Propose Tags ] [ Report a vulnerability ]

Please see the README on GitHub at https://github.com/konn/cabal-scaffold#readme


[Skip to Readme]

Modules

  • Development
    • Scaffold
      • Development.Scaffold.Cabal
        • Actions
          • Development.Scaffold.Cabal.Actions.Expand
          • Development.Scaffold.Cabal.Actions.Import
          • Development.Scaffold.Cabal.Actions.List
          • Development.Scaffold.Cabal.Actions.New
        • Development.Scaffold.Cabal.App
        • Development.Scaffold.Cabal.Config
        • Development.Scaffold.Cabal.Constants
        • Development.Scaffold.Cabal.Runner
        • Development.Scaffold.Cabal.Snapshots
        • Development.Scaffold.Cabal.Template
      • Development.Scaffold.Template
  • Path
    • IO
      • Path.IO.Utils
  • Streaming
    • ByteString
      • Char8
        • Replace
          • Streaming.ByteString.Char8.Replace.Attoparsec

Downloads

Maintainer's Corner

Package maintainers

For package maintainers and hackage trustees

Candidates

  • No Candidates
Versions [RSS] 0.1.0.0
Change log CHANGELOG.md
Dependencies aeson, attoparsec, base (>=4.7 && <5), base64-bytestring, bytestring, cabal-scaffold, case-insensitive, conduit, containers, dlist, exceptions, foldable1-classes-compat, foldl, generic-lens, githash, http-conduit, http-types, lens, lens-aeson, mustache, optparse-applicative, path, path-io, project-template, regex-applicative-text, replace-attoparsec, rio, rio-orphans, safe-exceptions, streaming, streaming-attoparsec, streaming-bytestring, strict, template-haskell, text, time, transformers, unordered-containers, yaml [details]
License BSD-3-Clause
Copyright 2023 (c) Hiromi Ishii
Author Hiromi Ishii
Maintainer konn.jinro_at_gmail.com
Home page https://github.com/konn/cabal-scaffold#readme
Bug tracker https://github.com/konn/cabal-scaffold/issues
Source repo head: git clone https://github.com/konn/cabal-scaffold
Uploaded by HiromiIshii at 2024-09-11T07:22:15Z
Distributions
Executables cabal-scaffold
Downloads 39 total (1 in the last 30 days)
Rating (no votes yet) [estimated by Bayesian average]
Your Rating
  • λ
  • λ
  • λ
Status Docs not available [build log]
All reported builds failed as of 2024-09-11 [all 2 reports]

Readme for cabal-scaffold-0.1.0.0

[back to package description]

cabal-scaffold - Scaffolding Tool for Cabal-based Projects with Stackage Snapshots

cabal-scaffold provides a cabal-analogue of stack new. It automatically downloads cabal.project.freeze corresponding to the specified Stackage Snapshot.

Usage

Usage: cabal-scaffold new [--resolver ARG] [-p|--param KEY:VALUE] [-w|--with-compiler COMPILER] PROJECT_NAME [TEMPLATE] Create New Project Available options: --resolver ARG Stackage resolver (default: lts) -p,--param KEY:VALUE Parameters to specify explicitly -w,--with-compiler COMPILER The compiler to use in the project PROJECT_NAME Project name TEMPLATE Template Name or path -h,--help Show this help text 

Example Usage

Create a new project my-new-package with the default template, resolver, and compiler:

cabal-scaffold new my-new-package 

Create a package by specifying the template name:

cabal-scaffold new my-new-package my-template 

Create a package by specifying the path to the template:

cabal-scaffold new my-new-package ./path/to/my-template.hsfiles 

Create a package with specified template, resolver, compiler, and custom params:

cabal-scaffold new -p category:Network --resolver lts-20.1 --with-compiler ghc-9.2.6 my-new-package default 

Resolvers can be specified partially (resolved by querying to stackage):

cabal-scaffold new --resolver lts my-new-package cabal-scaffold new --resolver lts-20 my-new-package cabal-scaffold new --resolver nightly my-new-package 

Configuration

Save the following as ${XDG_CONFIG_HOME}/cabal-scaffold.yaml (by default, it is equivalent to ~/.config/cabal-scaffold.yaml):

templateDirs: [] hpack: true defaults: template: default snapshot: lts-20 params: author-name: Your Name author-email: your_name@example.com # github-username: octcat 

Templates

Templates must be placed under ${XDG_DATA_HOME}/cabal-scaffold (defaulted to ~/.local/share/cabal-scaffold). The format is the same as the one used by stack; i.e. hsfiles format. You can just copy templates from ~/.stack/templates, or adding ~/.stack/templates to templateDirs config item.

Templates in the scope can be inspected by cabal-scaffold expand command:

Usage: cabal-scaffold expand TEMPLATE [DIR] Search and expand the template to the specified directory Available options: TEMPLATE The template to expand DIR The directory to put the expanded template -h,--help Show this help text 

Directory or hsfiles can be imported by cabal-scaffold import command:

Usage: cabal-scaffold import [-S|--override] PATH [TEMPLATE_NAME] Import directory or .hsfiles as a new preset template Available options: -S,--override If on, this will overrides the existing templates PATH The path to the hsfiles tempalte-file or directory to import as a template TEMPLATE_NAME The name of the template. If omitted, uses the base name (without extension) of input template path. -h,--help Show this help text