psibi / eta-hackage

A set of patches to make Hackage compatible with GHCVM.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Eta Hackage

Build Status

This repository contains a set of patches for particular packages from Hackage that cannot be built out-of-the-box with epm. To install a package, you have to run the following command:

epm install <package-name>

epm will take care of downloading the tar file, optionally patching it, and installing it.

Table of Contents

Package Categorization

Overview

We have categorized the packages from Hackage below in relation to epm support. If a package from Hackage has not been listed here, it means no one has tried to build it and categorize it.

If you would like to have a given package/version made compatible with epm, you can:

Supported Packages

These packages are supported by epm.

Unsupported Packages

These packages are heavy on FFI dependencies and don't make sense in the context of the JVM, hence no effort will be made to port them.

  • None for now

Built-in Packages

These packages have special meaning in the Eta compiler and hence are provided upon installation.

  • base-4.8.2.0
  • integer-0.5.1.0
    • NOTE: Due to the drastic differences between the Integer implementations, the public API between the corresponding GHC package is slightly different.
  • ghc-prim-0.4.0.0
    • NOTE: Due to the introduction of new primitives for Eta, the public API between the corresponding GHC package is slightly different.

Contributing

Patching a Library

Suppose that you find a library you want to patch, say somepackage-0.1.2.3.

Prerequisites

If you have already forked this repository, the skip to step 3.

  1. Fork this repository.

  2. Clone the forked repository & update the master branch.

$ git clone http://github.org/your-name-here/eta-hackage
  1. Checkout the master branch and pull any changes.
$ git checkout master
$ git pull
  1. Create a new branch with the same name as the package.
$ git checkout -b somepackage

Patching

  1. Download the somepackage-0.1.2.3.tar.gz tarball from Hackage.

  2. Initialize a git repository and make an initial commit.

$ git init
$ git add .
$ git commit -m "First"
  1. Build the package.
$ epm build
  1. Apply the desired changes and go back to step 3 as long as the build fails.

  2. Once the build succeeds, make a commit.

$ git add .
$ git commit -m "Patched"
  1. Create a patch.

    $ git format-patch HEAD~ --stdout > somepackage-0.1.2.3.patch
    
  2. If you have changed the .cabal file of the package in your patch , make a copy and rename it from somepackage.cabal to somepackage-0.1.2.3.cabal.

  3. Copy the patch file and the cabal file (if changed) to the patches directory in your local clone of your fork of the eta-hackage repository.

  4. In your eta-hackage repository,

    $ git commit -m "Patched somepackage-0.1.2.3"
    $ git push origin
    

    Also add the name of the package to the packages.json file and update this README.md with the package name (in alphabetical order).

  5. Submit a pull request to this repository for review.

Viewing a Patch

When you want to see how a library (say somepackage-0.1.2.3) looks with the patches applied:

  1. Download the source distribution of that package from Hacakage and extract it.

  2. Initialize a git repository in it and apply the patch (after copying it to the directory).

$ git init
$ git apply somepackage-0.1.2.3.patch

You may wish to modify an existing patch. If so, apply the steps above after Step 2 in Patching a Library/Patching.

About

A set of patches to make Hackage compatible with GHCVM.


Languages

Language:Haskell 100.0%