Dive into features for specialized use cases
The tables in the following subsections contain a Field Type column that describes what values are allowed. We describe the field types below.
A build type should always have the value Simple.
A boolean can either be True or False.
A dependency constraint is of the form [package-name] [version-range].
Examples
A directory is a filepath that must necessarily point to a folder.
Examples
/usr/include
A valid Eta language extension. Prefix No to disable the extension.
Examples
A filepath is a valid path to a file on the filesystem.
Examples
A license can take one of the following values:
It can also be any other string, but in that case, it has no special treatment from Etlas since it won't be recognized.
Examples
A list is a whitespace-separated sequence of character sequences which are of type X. You can add any amount of whitespace, including newlines, before and after the commas.
Examples
A comma list is a comma-separated sequence of character sequences which are of type X. You can add any amount of whitespace, including newlines, between Xs.
Examples
A module is a . separated sequence of alphanumeric character sequences that begin with a capital letter.
Examples
A Maven dependency is of the form [group-id]:[artifact-id]:[version] where
Examples
A Maven repository is a location which Etlas can use to resolve a Maven dependency. It can be a URL or one of the keywords listed below.
Keyword | Maven Repository URL |
central | https://repo1.maven.org/maven2/ |
javaNet1 | http://download.java.net/maven/1/ |
sonatype:[type] | https://oss.sonatype.org/content/repositories/[type] |
jcenter | https://jcenter.bintray.com/ |
bintray:[owner]:[repo] | https://dl.bintray.com/[owner]/[repo]/ |
NOTE: If you need to access a Maven repository that requires credentials, you can specify the URL in the form http://[user]:[pass]@[repo-url].
Examples
A package name consists of alpha-numeric character sequences separated by -. Note that each alpha-numeric sequence must contain at least one alphabetic character.
Examples
A source repository type can be any one of the following:
A stability can be any character sequence that describes the stability of the package.
Examples
A strict comma list is just like a comma-list except whitespace is not allowed before or after the comma.
Examples
A test suite type describes the way a test should be run. Etlas only supports exitcode-stdio-1.0.
Examples
exitcode-stdio-1.0
A package executable is of the form [package-name]-[any] where [any] is the name of the executable.
Examples
A version consists of numeric sequences separated by ..
Examples
A version range consists of a comparison operator followed by a version
Comparison operators:
The conjunction operator && can be used to combine multiple version-ranges.
Examples
Other than name, version, and build-type, every other field is optional.
Field | Field Type | Description |
name | package-name | Name of the package |
version | version | Version of the package |
cabal-version | version-range | Versions of the Cabal specifications supported |
build-type | build-type | Type of build used by this package |
license | license | License type that pertains to the package |
license-file | filepath | Path to the license file |
license-files | list[filepath] | List of paths to the license files that pertain to this package |
copyright | any | Copyright notice with holder and years held |
author | any | Author of the package |
maintainer | list[any] | List contact information of maintainers of the package |
stability | stability | Stability level of the package |
homepage | url | Package homepage |
bug-reports | url | URL where users should direct bug reports |
package-url | url | Location of a source bundle for the package |
synopsis | any | Short description of the package |
description | any | Long description of the package |
category | any | Category of the package |
data-files | list[filepath] | List of files to be installed for runtime use by the package |
data-dir | directory | Directory where Etlas looks for data files to install |
extra-tmp-files | list[filepath] | List of additional files/directories to be removed by clean |
The library stanza starts with a library keyword and all the fields of the stanza must be indented underneath. There can only be one library in a package and the name is taken from the name metadata field above.
The library stanza should contain the following fields:
Field | Field Type | Description |
exposed-modules | list[module] | A list of modules exported by this package |
The library stanza supports the common fields below.
name: hello
library
exposed-modules: Hello
The executable stanza starts with a executable keyword followed by the name of the executable and all the fields of the stanza must be indented underneath. There can any number of executables in a package.
The name of the executable can be anything, but it shouldn't contain spaces.
The executable stanza must contain the following fields:
Field | Field Type | Description |
main-is | filepath | The path to the .hs file containing the Main module |
The executable stanza supports the common fields below.
executable my-executable
main-is: Main.hs
The test suite stanza starts with a test-suite keyword followed by the name of the test suite and all the fields of the stanza must be indented underneath. There can any number of test suites in a package.
The name of the test suite can be anything, but it shouldn't contain spaces.
The test suite stanza must contain the following fields:
Field | Field Type | Description |
type | test-suite-type | Type of test suite to execute |
main-is | filepath | Path to the .hs file containing the Main module |
The test suite stanza supports the common fields below.
test-suite my-test-suite
type: exitcode-stdio-1.0
main-is: Main.hs
Common fields shared among library, executable, and test components for building and configuring those components.
Field | Field Type | Description |
build-depends | comma-list[dependency-constraint] | List of dependencies required for this package |
other-modules | list[module] | List of modules used by the component but not exposed to users |
hs-source-dirs | list[directory] | Root directories for modules. |
default-extensions | list[extension] | List of language extensions used by every module |
build-tool-depends | list[package-executable] | List of programs needed to build this component |
buildable | boolean | Is the component buildable? |
eta-options | list[any] | Arguments for the Eta compiler |
includes | list[filepath] | A list of header files to be sent to the Eta preprocessor |
install-includes | list[filepath] | A list of header files from this package to be installed. |
include-dirs | list[directory] | List of directories to search for header files for the Eta preprocessor |
java-sources | list[filepath] | List of Java source file dependencies (.java, .class, .jar) |
cpp-options | list[any] | Arguments for the Eta preprocessor |
maven-depends | list[maven-dependency] | List of Maven dependencies |
maven-repos | list[maven-repo] | List of Maven repositories for resolving Maven dependencies. |
You can declare conditional flags to allow users to build different flavors of your package depending on their need.
You can declare a flag with the flag keyword followed by the name of the flag. The fields allowed for a flag are listed in the table below.
Field | Field Type | Description |
description | any | The description of this flag |
default | boolean | The default value of the flag. |
manual | boolean | The value of the flag when the flag is passed as an argument to Etlas. |
Check out the section on Conditional Configuration for more information on how to use these flags.
flag developer
description: operate in developer mode
default: False
manual: True
You can declare the location of your package's source if it's losted in a source control management (SCM) system like Git, Mercurial, and so on.
You can declare a source repository with the source-repository keyword followed by either this or head.
The fields allowed for a source repository are listed in the table below.
Field | Field Type | Description |
type | source-repository-type | Name of the SCM used for the repository |
location | url | Location of the repository |
branch | any | Branch for the respective SCM |
tag | any | Tag for the respective SCM |
subdir | directory | Subfolder of the repository that is a standalone Etlas package |
module | any | Required for the CVS and should not be used otherwise |
source-repository this
type: git
location: https://github.com/Jyothsnasrinivas/eta-jdbc
tag: 0.2.0.0