Skip to content

Commit

Permalink
Merge pull request #524 from raehik/bindings-haskell-build-fix-include
Browse files Browse the repository at this point in the history
Haskell bindings: fix sdist generation/pkg install
  • Loading branch information
wtdcode authored May 19, 2023
2 parents ce229be + 93f1939 commit fb92f32
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 4 deletions.
30 changes: 27 additions & 3 deletions bindings/haskell/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
This documentation explains how to install the Keystone Haskell bindings from
source.

# Keystone Haskell bindings
## Building
1. Install the core Keystone Assembler as a dependency:

Follow docs/COMPILE.md in the root directory to compile & install the core.
Expand All @@ -25,3 +24,28 @@ To build a sample (after having built and installed the Haskell bindings):
$ cd bindings/haskell
$ ghc --make samples/Sample.hs
```

## Using as a dependency
### In a Cabal project
Add the following to the `cabal.project` file in the project root:

```text
source-repository-package
type: git
location: https://github.com/keystone-engine/keystone
subdir:
bindings/haskell
tag: master
-- if the file didn't already exist, add the following also
packages: .
```

### In a Stack project
Add the following to the `stack.yaml` file in the project root:

```yaml
extra-deps:
- git: https://github.com/keystone-engine/keystone
subdir: bindings/haskell
```
4 changes: 3 additions & 1 deletion bindings/haskell/keystone.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
-- documentation, see http://haskell.org/cabal/users-guide/

name: keystone
version: 0.1.0.0
version: 0.1.1.0
synopsis: Keystone lightweight multi-platform, multi-architecture assembler framework
description: Haskell bindings for the Keystone assembler
homepage: https://github.com/keystone-engine/keystone
Expand All @@ -12,6 +12,8 @@ category: System
build-type: Simple
cabal-version: >= 1.10

extra-source-files: src/include/*.h

library
exposed-modules: Keystone.Internal.Core
Keystone.Internal.Keystone
Expand Down

0 comments on commit fb92f32

Please sign in to comment.