* gnu/packages/haskell.scm (c2hs): New variable. --- gnu/packages/haskell.scm | 35 ++++++++++++++++++++++++++++++++++- 1 file changed, 34 insertions(+), 1 deletion(-)
diff --git a/gnu/packages/haskell.scm b/gnu/packages/haskell.scm index 76ff287..da8e932 100644 --- a/gnu/packages/haskell.scm +++ b/gnu/packages/haskell.scm @@ -20,7 +20,7 @@ (define-module (gnu packages haskell) #:use-module (ice-9 regex) - #:use-module ((guix licenses) #:select (bsd-3 lgpl2.1 lgpl2.1+ gpl3+ expat)) + #:use-module ((guix licenses) #:select (bsd-3 lgpl2.1 lgpl2.1+ gpl2 gpl3+ expat)) #:use-module (guix packages) #:use-module (guix download) #:use-module (guix utils) @@ -1444,6 +1444,39 @@ various Haskell streaming data libraries, such as @code{conduit} and @code{pipe}s.") (license bsd-3))) +(define-public c2hs + (package + (name "c2hs") + (version "0.26.2") + (source + (origin + (method url-fetch) + (uri (string-append + "http://hackage.haskell.org/package/c2hs/c2hs-" + version + ".tar.gz")) + (sha256 + (base32 + "1ga4s91lwdq3xfm09l6p9j65miry1qlwdzjhng00ycb9vjlifpfi")))) + (build-system haskell-build-system) + (arguments + `(#:tests? #f)) ; FIXME: ghc-test-framework and friends are not yet + ; packaged. + (inputs + `(("ghc-language-c" ,ghc-language-c) + ("ghc-dlist" ,ghc-dlist) + ("ghc-shelly" ,ghc-shelly) + ("ghc-text" ,ghc-text))) + (home-page "https://github.com/haskell/c2hs") + (synopsis "C->Haskell FFI tool") + (description + "The C->Haskell tool assists in the development of Haskell bindings to C +libraries. It extracts interface information from C header files and +generates Haskell code with foreign imports and marshaling. Unlike writing +foreign imports by hand (or using @code{hsc2hs}), this ensures that C +functions are imported with the correct Haskell types.") + (license gpl2))) + (define-public cpphs (package (name "cpphs") -- 2.6.2