Skip to content

Commit fb92f32

Browse files
authored
Merge pull request #524 from raehik/bindings-haskell-build-fix-include
Haskell bindings: fix sdist generation/pkg install
2 parents ce229be + 93f1939 commit fb92f32

File tree

2 files changed

+30
-4
lines changed

2 files changed

+30
-4
lines changed

bindings/haskell/README.md

Lines changed: 27 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
1-
This documentation explains how to install the Keystone Haskell bindings from
2-
source.
3-
1+
# Keystone Haskell bindings
2+
## Building
43
1. Install the core Keystone Assembler as a dependency:
54

65
Follow docs/COMPILE.md in the root directory to compile & install the core.
@@ -25,3 +24,28 @@ To build a sample (after having built and installed the Haskell bindings):
2524
$ cd bindings/haskell
2625
$ ghc --make samples/Sample.hs
2726
```
27+
28+
## Using as a dependency
29+
### In a Cabal project
30+
Add the following to the `cabal.project` file in the project root:
31+
32+
```text
33+
source-repository-package
34+
type: git
35+
location: https://github.com/keystone-engine/keystone
36+
subdir:
37+
bindings/haskell
38+
tag: master
39+
40+
-- if the file didn't already exist, add the following also
41+
packages: .
42+
```
43+
44+
### In a Stack project
45+
Add the following to the `stack.yaml` file in the project root:
46+
47+
```yaml
48+
extra-deps:
49+
- git: https://github.com/keystone-engine/keystone
50+
subdir: bindings/haskell
51+
```

bindings/haskell/keystone.cabal

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
-- documentation, see http://haskell.org/cabal/users-guide/
33

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

15+
extra-source-files: src/include/*.h
16+
1517
library
1618
exposed-modules: Keystone.Internal.Core
1719
Keystone.Internal.Keystone

0 commit comments

Comments
 (0)