HenHen is a build tool for CHICKEN Scheme, designed to work alongside chicken-install. It can:
- Install dependencies in an isolated virtual environment, on a per-project basis. No more system-wide installs.
- Manage interdependent local eggs seamlessly, building them in order.
- Fetch and install dependencies from anywhere by specifying a git repository URL for any dependency that isn't in the official egg index.
It creates an isolated egg repository for each project inside a .henhen folder.
HenHen is designed for convenience. I wrote this to get around some of the behavior of chicken-install that I disliked; namely:
- By default,
chicken-installinstalls every egg globally, system-wide. - Because of the default location of the egg repository,
chicken-installrequires superuser privilleges to install eggs (see this section). To change the repository location, you must either build CHICKEN from source or set specific environment variables.
HenHen is designed to circumvent both of these issues with as little hassle as possible.
HenHen is a single binary executable. A comprehensive installation guide can be found here.
The guide linked above also includes steps to build HenHen from source!
An introduction to HenHen can be found on this section!
To learn more about HenHen, read the documentation! π
To initialize HenHen in the current directory, you can use:
henhen init "your project name"This will create a henhen.yaml file populated with basic fields. This is the configuration file for your project, where you can...
- ... list dependencies to be installed.
- ... define git repository URLs to fetch custom dependencies from.
- ... define targets to build. A target can be an egg or a static binary executable.
A simple config file to build a simple egg should look like this:
name: simple
source-files:
- '*.scm'
- '*.egg'
dependencies:
- srfi-1
targets:
simple:
type: egg
directory: '.'We can do a lot more, however. As a more complex example, let's build a local egg foo, a local egg bar that depends on foo, and a static executable that uses both foo and bar. That's simple with HenHen!
With a folder structure like this:
.
βββ bar
βΒ Β βββ bar.egg
βΒ Β βββ bar.scm
βββ foo
βΒ Β βββ foo.egg
βΒ Β βββ foo.scm
βββ foobar.scm
βββ henhen.yaml
Let's write our henhen.yaml config file to build our project:
name: foobar
source-files:
- 'foo/**'
- 'bar/**'
- 'foobar.scm'
dependencies:
- srfi-1
- monad:5.1
- yaml:0.2.2
targets:
foo:
type: egg
directory: './foo'
bar:
type: egg
directory: './bar'
dependencies:
- foo
foobar:
type: executable
source: './foobar.scm'
dependencies:
- foo
- barAfter writing our project configuration, all we need to do is build our project:
henhen buildAnd we can run the static foobar binary inside the virtual environment!
henhen run foobarWe want to distribute that binary executable, so let's copy it to our project root:
henhen copy foobarAnd we can share it!
