CI: {build.sh,default.nix}: upd settings structure, upd descriptions
M build.sh M default.nix
This commit is contained in:
parent
1a730fcfd0
commit
b597748fa5
12
build.sh
12
build.sh
|
@ -6,10 +6,11 @@
|
||||||
set -Eexuo pipefail
|
set -Eexuo pipefail
|
||||||
|
|
||||||
### NOTE: Section handles imports from env, these are settings for Nixpkgs.
|
### NOTE: Section handles imports from env, these are settings for Nixpkgs.
|
||||||
|
# Settings expose most of the Nixpkgs Haskell.lib API: https://github.com/NixOS/nixpkgs/blob/master/pkgs/development/haskell-modules/lib.nix
|
||||||
# Some of these options implicitly switch the dependent options.
|
# Some of these options implicitly switch the dependent options.
|
||||||
|
|
||||||
|
|
||||||
# NOTE: If var not imported - set to the default value
|
# NOTE: If vars not imported - set to the default value
|
||||||
compiler=${compiler:-'ghc8101'}
|
compiler=${compiler:-'ghc8101'}
|
||||||
# NOTE: Nix by default uses nixpkgs-unstable channel
|
# NOTE: Nix by default uses nixpkgs-unstable channel
|
||||||
# Setup for Nixpkgs revision:
|
# Setup for Nixpkgs revision:
|
||||||
|
@ -29,24 +30,25 @@ export NIX_PATH
|
||||||
# NOTE: Project name, used by cachix
|
# NOTE: Project name, used by cachix
|
||||||
project=${project:-'defaultProjectName'}
|
project=${project:-'defaultProjectName'}
|
||||||
|
|
||||||
# This settings expose most of the Nixpkgs Haskell.lib API: https://github.com/NixOS/nixpkgs/blob/master/pkgs/development/haskell-modules/lib.nix
|
|
||||||
|
|
||||||
# Don't fail at configure time if there are multiple versions of the same package in the (recursive) dependencies of the package being built. Will delay failures, if any, to compile time.
|
# Don't fail at configure time if there are multiple versions of the same package in the (recursive) dependencies of the package being built. Will delay failures, if any, to compile time.
|
||||||
allowInconsistentDependencies=${allowInconsistentDependencies:-'false'}
|
allowInconsistentDependencies=${allowInconsistentDependencies:-'false'}
|
||||||
|
|
||||||
# Escape the version bounds from the cabal file. You may want to avoid this function.
|
# Escape the version bounds from the cabal file. You may want to avoid this function.
|
||||||
doJailbreak=${doJailbreak:-'false'}
|
doJailbreak=${doJailbreak:-'false'}
|
||||||
# Nix dependency checking, compilation and execution of test suites listed in the package description file.
|
# Nix dependency checking, compilation and execution of test suites listed in the package description file.
|
||||||
doCheck=${doCheck:-'true'}
|
doCheck=${doCheck:-'true'}
|
||||||
|
|
||||||
# Just produce a SDist src tarball
|
# Just produce a SDist src tarball
|
||||||
sdistTarball=${sdistTarball:-'false'}
|
sdistTarball=${sdistTarball:-'false'}
|
||||||
# Produce SDist tarball and build project from it
|
# Produce SDist tarball and build project from it
|
||||||
# The strict packaging process as used on Hackage. Tests consistency of the Cabal file.
|
# The strict packaging process as used on Hackage. Tests consistency of the Cabal file.
|
||||||
buildFromSdist=${buildFromSdist:-'false'}
|
buildFromSdist=${buildFromSdist:-'false'}
|
||||||
|
|
||||||
# Turn all warn into err with {-Wall,-Werror}
|
# Turn all warn into err with {-Wall,-Werror}
|
||||||
failOnAllWarnings=${failOnAllWarnings:-'false'}
|
failOnAllWarnings=${failOnAllWarnings:-'false'}
|
||||||
# `failOnAllWarnings` + `buildFromSdist`
|
# `failOnAllWarnings` + `buildFromSdist`
|
||||||
buildStrictly=${buildStrictly:-'false'}
|
buildStrictly=${buildStrictly:-'false'}
|
||||||
|
|
||||||
# 2020-06-02: NOTE: enableDeadCodeElimination = true: On GHC =< 8.8.3 macOS build falls due to https://gitlab.haskell.org/ghc/ghc/issues/17283
|
# 2020-06-02: NOTE: enableDeadCodeElimination = true: On GHC =< 8.8.3 macOS build falls due to https://gitlab.haskell.org/ghc/ghc/issues/17283
|
||||||
enableDeadCodeElimination=${enableDeadCodeElimination:-'false'}
|
enableDeadCodeElimination=${enableDeadCodeElimination:-'false'}
|
||||||
# Disabled GHC code optimizations make build/tolling/dev loops faster. Works for Haskel IDE Engine and GHCID
|
# Disabled GHC code optimizations make build/tolling/dev loops faster. Works for Haskel IDE Engine and GHCID
|
||||||
|
@ -54,6 +56,7 @@ enableDeadCodeElimination=${enableDeadCodeElimination:-'false'}
|
||||||
disableOptimization=${disableOptimization:-'true'}
|
disableOptimization=${disableOptimization:-'true'}
|
||||||
# Use faster `gold` ELF linker from GNU binutils instead of older&slower but more versatile GNU linker. Is not available by default since macOS does not have it.
|
# Use faster `gold` ELF linker from GNU binutils instead of older&slower but more versatile GNU linker. Is not available by default since macOS does not have it.
|
||||||
linkWithGold=${linkWithGold:-'false'}
|
linkWithGold=${linkWithGold:-'false'}
|
||||||
|
|
||||||
# Provide an inventory of performance events and timings for the execution. Provides informaiton in an absolute sense. Nothing is timestamped.
|
# Provide an inventory of performance events and timings for the execution. Provides informaiton in an absolute sense. Nothing is timestamped.
|
||||||
enableLibraryProfiling=${enableLibraryProfiling:-'false'}
|
enableLibraryProfiling=${enableLibraryProfiling:-'false'}
|
||||||
enableExecutableProfiling=${enableExecutableProfiling:-'false'}
|
enableExecutableProfiling=${enableExecutableProfiling:-'false'}
|
||||||
|
@ -63,6 +66,7 @@ doTracing=${doTracing:-'false'}
|
||||||
enableDWARFDebugging=${enableDWARFDebugging:-'false'}
|
enableDWARFDebugging=${enableDWARFDebugging:-'false'}
|
||||||
# Strip results from all debugging symbols
|
# Strip results from all debugging symbols
|
||||||
doStrip=${doStrip:-'false'}
|
doStrip=${doStrip:-'false'}
|
||||||
|
|
||||||
# Nixpkgs expects shared libraries
|
# Nixpkgs expects shared libraries
|
||||||
enableSharedLibraries=${enableSharedLibraries:-'true'}
|
enableSharedLibraries=${enableSharedLibraries:-'true'}
|
||||||
# Ability to make static libraries
|
# Ability to make static libraries
|
||||||
|
@ -72,6 +76,7 @@ enableSharedExecutables=${enableSharedExecutables:-'false'}
|
||||||
# link executables statically against haskell libs to reduce closure size
|
# link executables statically against haskell libs to reduce closure size
|
||||||
justStaticExecutables=${justStaticExecutables:-'false'}
|
justStaticExecutables=${justStaticExecutables:-'false'}
|
||||||
enableSeparateBinOutput=${enableSeparateBinOutput:-'false'}
|
enableSeparateBinOutput=${enableSeparateBinOutput:-'false'}
|
||||||
|
|
||||||
# Add a post-build check to verify that dependencies declared in the .cabal file are actually used.
|
# Add a post-build check to verify that dependencies declared in the .cabal file are actually used.
|
||||||
# checkUnusedPackages: is `failOnAllWarnings` + `cabal sdist` to ensure all needed files are listed in the Cabal file. Currently uses `packunused` or GHC 8.8 internals, later switches into GHC internal feature. Adds a post-build check to verify that dependencies declared in the cabal file are actually used.
|
# checkUnusedPackages: is `failOnAllWarnings` + `cabal sdist` to ensure all needed files are listed in the Cabal file. Currently uses `packunused` or GHC 8.8 internals, later switches into GHC internal feature. Adds a post-build check to verify that dependencies declared in the cabal file are actually used.
|
||||||
checkUnusedPackages=${checkUnusedPackages:-'false'}
|
checkUnusedPackages=${checkUnusedPackages:-'false'}
|
||||||
|
@ -88,6 +93,7 @@ generateOptparseApplicativeCompletions=${generateOptparseApplicativeCompletions:
|
||||||
# [ "binary1" "binary2" ] - should pass " quotes into Nix interpreter
|
# [ "binary1" "binary2" ] - should pass " quotes into Nix interpreter
|
||||||
executableNamesToShellComplete=${executableNamesToShellComplete:-'[ "defaultBinaryName" ]'}
|
executableNamesToShellComplete=${executableNamesToShellComplete:-'[ "defaultBinaryName" ]'}
|
||||||
|
|
||||||
|
|
||||||
# Include Hoogle into derivation
|
# Include Hoogle into derivation
|
||||||
withHoogle=${withHoogle:-'false'}
|
withHoogle=${withHoogle:-'false'}
|
||||||
|
|
||||||
|
|
11
default.nix
11
default.nix
|
@ -12,19 +12,23 @@
|
||||||
, doJailbreak ? false
|
, doJailbreak ? false
|
||||||
# Nix dependency checking, compilation and execution of test suites listed in the package description file.
|
# Nix dependency checking, compilation and execution of test suites listed in the package description file.
|
||||||
, doCheck ? true
|
, doCheck ? true
|
||||||
|
|
||||||
# Just produce a SDist src tarball
|
# Just produce a SDist src tarball
|
||||||
, sdistTarball ? false
|
, sdistTarball ? false
|
||||||
# Produce SDist tarball and build project from it
|
# Produce SDist tarball and build project from it
|
||||||
, buildFromSdist ? true
|
, buildFromSdist ? true
|
||||||
|
|
||||||
, failOnAllWarnings ? false
|
, failOnAllWarnings ? false
|
||||||
# `failOnAllWarnings` + `buildFromSdist`
|
# `failOnAllWarnings` + `buildFromSdist`
|
||||||
, buildStrictly ? false
|
, buildStrictly ? false
|
||||||
|
|
||||||
# 2020-06-02: NOTE: enableDeadCodeElimination = true: On GHC =< 8.8.3 macOS build falls due to https://gitlab.haskell.org/ghc/ghc/issues/17283
|
# 2020-06-02: NOTE: enableDeadCodeElimination = true: On GHC =< 8.8.3 macOS build falls due to https://gitlab.haskell.org/ghc/ghc/issues/17283
|
||||||
, enableDeadCodeElimination ? false
|
, enableDeadCodeElimination ? false
|
||||||
# Disable GHC code optimizations for faster dev loops. Enable optimizations for production use or benchmarks.
|
# Disable GHC code optimizations for faster dev loops. Enable optimizations for production use or benchmarks.
|
||||||
, disableOptimization ? true
|
, disableOptimization ? true
|
||||||
# Use faster `gold` ELF linker from GNU binutils instead of older&slower but more versatile GNU linker. Is not available by default since macOS does not have it.
|
# Use faster `gold` ELF linker from GNU binutils instead of older&slower but more versatile GNU linker. Is not available by default since macOS does not have it.
|
||||||
, linkWithGold ? false
|
, linkWithGold ? false
|
||||||
|
|
||||||
# Provide an inventory of performance events and timings for the execution. Provides informaiton in an absolute sense. Nothing is timestamped.
|
# Provide an inventory of performance events and timings for the execution. Provides informaiton in an absolute sense. Nothing is timestamped.
|
||||||
, enableLibraryProfiling ? false
|
, enableLibraryProfiling ? false
|
||||||
, enableExecutableProfiling ? false
|
, enableExecutableProfiling ? false
|
||||||
|
@ -34,8 +38,7 @@
|
||||||
, enableDWARFDebugging ? true
|
, enableDWARFDebugging ? true
|
||||||
# Strip results from all debugging symbols
|
# Strip results from all debugging symbols
|
||||||
, doStrip ? false
|
, doStrip ? false
|
||||||
# Generate hyperlinked source code for documentation using HsColour, and have Haddock documentation link to it.
|
|
||||||
, doHyperlinkSource ? false
|
|
||||||
# Nixpkgs expects shared libraries
|
# Nixpkgs expects shared libraries
|
||||||
, enableSharedLibraries ? true
|
, enableSharedLibraries ? true
|
||||||
# Ability to make static libraries
|
# Ability to make static libraries
|
||||||
|
@ -45,10 +48,13 @@
|
||||||
# link executables statically against haskell libs to reduce closure size
|
# link executables statically against haskell libs to reduce closure size
|
||||||
, justStaticExecutables ? false
|
, justStaticExecutables ? false
|
||||||
, enableSeparateBinOutput ? false
|
, enableSeparateBinOutput ? false
|
||||||
|
|
||||||
# Add a post-build check to verify that dependencies declared in the .cabal file are actually used.
|
# Add a post-build check to verify that dependencies declared in the .cabal file are actually used.
|
||||||
, checkUnusedPackages ? false
|
, checkUnusedPackages ? false
|
||||||
# Generation and installation of haddock API documentation
|
# Generation and installation of haddock API documentation
|
||||||
, doHaddock ? false
|
, doHaddock ? false
|
||||||
|
# Generate hyperlinked source code for documentation using HsColour, and have Haddock documentation link to it.
|
||||||
|
, doHyperlinkSource ? false
|
||||||
# Generation and installation of a coverage report. See https://wiki.haskell.org/Haskell_program_coverage
|
# Generation and installation of a coverage report. See https://wiki.haskell.org/Haskell_program_coverage
|
||||||
, doCoverage ? false
|
, doCoverage ? false
|
||||||
# doBenchmark: Dependency checking + compilation and execution for benchmarks listed in the package description file.
|
# doBenchmark: Dependency checking + compilation and execution for benchmarks listed in the package description file.
|
||||||
|
@ -57,6 +63,7 @@
|
||||||
, generateOptparseApplicativeCompletions ? false
|
, generateOptparseApplicativeCompletions ? false
|
||||||
, executableNamesToShellComplete ? [ "hnix" ]
|
, executableNamesToShellComplete ? [ "hnix" ]
|
||||||
|
|
||||||
|
|
||||||
, withHoogle ? true
|
, withHoogle ? true
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue