hsinstall
Install Haskell software
https://codeberg.org/dinofp/hsinstall
| LTS Haskell 24.56: | 2.8 |
| Stackage Nightly 2026-08-30: | 3.0 |
| Latest on Hackage: | 3.0 |
hsinstall-3.0@sha256:fc2c91843d85602dea89a89a2e7566ba3fa5678f0e36eaf0a81752b89dc12d5c,2895Module documentation for 3.0
- HSInstall
hsinstall
Synopsis
Pack a haskell project into a deployable directory structure
Description
hsinstall is a tool for deploying software projects into directory structures
suitable for installation on a system. It builds upon the stack install and
cabal install commands and adds more features. It’s also a tool for easier
AppImage creation.
- Copies the
LICENSEfile into<PREFIX>/share/<PROJECT-NAME>/doc - Copies the contents of a template directory stucture in your project (named
hsi-tmplorhsi-tmpl.EXE) into the destination prefix directory. This can contain additional binaries or scripts, resources, documentation, etc. - Optionally builds an AppDir-shaped directory structure for the project and produces an an AppImage binary
If the AppImage features are desired, you must have these tools on your PATH:
linuxdeploy: https://github.com/linuxdeploy/linuxdeploy/releases
linuxdeploy-plugin-appimage: https://github.com/linuxdeploy/linuxdeploy-plugin-appimage/releases
Development
Browse the source
Get source with git and build
$ git clone https://codeberg.org/dinofp/hsinstall.git
$ cd hsinstall
$ stack build
If you have the abovementioned linuxdeploy-* programs on your path, we can do
something really cool. Use this freshly-built hsinstall to package itself
into an AppImage:
$ stack run hsinstall -- --appimage hsinstall
And you should see an hsinstall-y.z-x86_64.AppImage binary in .
Tip: Use git clean -df to blow away untracked things like the hsi-* and
AppImage artifacts.
Handy command to generate Haddock docs during development if using stack. This constrains doc generation to modules in the library:
$ stack haddock --no-haddock-deps
Contact
Authors
Dino Morelli [email protected]
This work is hand-crafted with no LLM/AI involved
Changes
3.0 (2026-08-28)
- Extensive operational changes including naming of hsinstall-specific directories
- Removed default operation mode, must specify –dist or –appimage now
- Now using separate template dirs for –dist vs –appimage modes
- Heavily overhauled the CLI args to be more command-like
- Detecting and warning about legacy hsinstall directory
- Now supporting explicit binary list to deploy for –dist
- Warning user if cabal is to be used with explicit binary list
- Added proper logging via the new hslogger-colorfmt library
- Added -v, –verbose switch to quiet down some logging
- Now support debug logging CLI switch
- Extensive documentation and usage changes
- Added made by a human badge to README.md
- Added some status output when saving stock icon
2.10 (2025-09-16)
- Fixed cabal bounds
- Fixes for compatibility with Cabal-syntax-3.14.0.0
- Switched to optparse-applicative-dex library
- No longer need to explicitly derive Typeable
- Added ImportQualifiedPost to cabal file
- Changed URLs from github to codeberg
2.9 (2025-07-30)
- Moved CHANGELOG.md to extra-doc-files stanza
- Added bounds to build-depends libraries
- Removed OverloadedStrings directives from source files
- Switched from putStrLn and printf to the formatting library
- Implemented some hlint suggestions
- Fixed odd range in build-depends for base
- Switched to the more modern prettyprinter library
- Tidied up a bit in the cabal file
- Removed extra whitespace in imports
- Moved Stackage snapshot up to lts-22.6
- Replaced (++) with (<>) in a few places
- Added optional GPG2 signing to appimage creation
- Switched from newtype-generics to OverloadedRecordDot
- Removed ending copyright year
- Fixed linuxdeploy version env variable name
2.8 (2023-01-28)
- Fix for change to the Cabal Distribution API
- Switched from hpack to modern cabal
- Moved copyright date up to 2023
2.7 (2021-12-01)
- Changed how default prefix is constructed
- Turned off stdout/stderr buffering
- Support projects that build with either cabal or stack
- Removed an unused import
- Now forcing all cabal commands to be v2-
- Using newtype wrappers for DeploymentInfo fields
- Using Haskell core type Version for version
- Removed shareDir and rsrcDir from DeploymentInfo
- Now using newtype wrappers for all Options fields
- Added more newtype wrappers around many data types
- Applied hlint suggestions
- Moved stack resolver up to lts-18.18
2.6 (2020-01-12)
- Moved stack resolver up to lts-14.20
- Switched from fmt library to Text.Printf
- Try to force hpack cabal file creation if it’s missing
- Moved copyright date up to 2020
- Fixed various problems in the README
2.5 (2019-12-01)
- Using an infoHelper for the –version switch
- Moved Stackage snapshot up to lts-14.8
- Updated usage to reflect the new template dir behavior
- Changed lib/HSInstall/Resources.hs to Paths.hs
- Added custom code for recursive file copying
- Fixed bug with default prefix directory
- Removed the –delete switch
- Rolled EXE argument into –mk-appimage switch
- Changed how resources and AppImage source files are handled
- Added a handy tip about git clean
- Removed code to force cabal file creation
2.4 (2019-04-26)
- Moved copyright date up to 2019
- Separated code into more modules for clarity
- Switched from GetOpt to optparse-applicative
- Fixed API doc wording
- Adjusted code with hlint’s advice
- Now trying to force stack/hpack to generate the cabal file if it’s missing
- Added app version number to AppImage filename
2.3 (2019-03-03)
- Changed deployment dir name to EXECUTABLE.AppDir
- Switched all uses of Text.Printf to the Fmt library
- Moved Stackage resolver up to lts-13.9
2.2 (2018-11-07)
- Added actual exception handling
- Reworded usage and README text
2.1 (2018-10-22)
- Switched to a a lighter-weight here-document library
- Updated API documentation
2.0 (2018-10-22)
- Redesigned as a binary utility to be installed on a system, not a script
- Added AppImage creation feature
- Got rid of “bundle” style deployment, it’s all FHS now with a prefix
- Removed old sample usage app
- Moved stackage resolver up to lts-12.13
- Moved copyright date up to 2018
1.6 (2017-07-01)
- Changed base lower bound from 4.9 to 4.8
- Updated stack snapshot to lts-8.21
- Added HCAR listing content
- Removed defunct cabal stability field
- Adjusted some documentation in the README
- Moved copyright date up to 2017
1.5 (2016-10-16)
- Now creating bin directory prior to stack install
- Removed comments from auto-generated stack.yaml
1.4 (2016-10-11)
- Added missing files to extra-source-files
- Added switch for making a symlink to the app directory
1.3 (2016-10-07)
- Fixed error in docs
1.2 (2016-10-07)
- Added example additional script copying code
- Updated developer instructions
- Added a tested-with line to the cabal file
1.1 (2016-10-03)
- Updated to stackage lts-7.2
1.0 (2016-10-03)
- Cleaned up cabal file
- Wrote API docs
- Cleaned up README
- Aborting the installation if
stack installfails - Added instructions for compiling install.hs
- Added library for locating resources at runtime
- Initial release