@@ -29,6 +29,10 @@ extra-source-files: c/helper.h,
2929 test/largest-string.yaml
3030 test/json.yaml
3131
32+flag no-exe
33+ description: don't install the yaml2json executable
34+ default: False
35+
3236flag system-libyaml
3337 description: Use the system-wide libyaml instead of the bundled copy
3438 default: False
@@ -63,6 +67,20 @@ library
6367 libyaml/writer.c
6468 include-dirs: libyaml
6569
70+executable yaml2json
71+ if flag(no-exe)
72+ Buildable: False
73+ else
74+ Buildable: True
75+
76+ hs-source-dirs: exe
77+ main-is: yaml2json.hs
78+ build-depends: base >= 4 && < 5
79+ , yaml
80+ , bytestring >= 0.9.1.4
81+ , aeson >= 0.5
82+
83+
6684test-suite test
6785 type: exitcode-stdio-1.0
6886 hs-source-dirs: test