Skip to content

kbmackenzie/henhen

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

HenHen is a build tool for CHICKEN Scheme, designed to work alongside chicken-install. It can:

HenHen logo

  • 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.

Table of Contents

  1. Philosophy
  2. Installation
  3. Documentation
  4. Quick Start

Philosophy

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-install installs every egg globally, system-wide.
  • Because of the default location of the egg repository, chicken-install requires 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.

Installation

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!

Documentation

An introduction to HenHen can be found on this section!

To learn more about HenHen, read the documentation! πŸ”

Quick Start

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
    - bar

After writing our project configuration, all we need to do is build our project:

henhen build

And we can run the static foobar binary inside the virtual environment!

henhen run foobar

We want to distribute that binary executable, so let's copy it to our project root:

henhen copy foobar

And we can share it!

Dancing chicken

About

πŸ” Isolated virual environments for CHICKEN Scheme.

Resources

License

Stars

Watchers

Forks

Packages

No packages published