GNU bug report logs -
#34146
[PATCH] gnu: Add ghc-c2hs.
Previous Next
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 34146 in the body.
You can then email your comments to 34146 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
guix-patches <at> gnu.org
:
bug#34146
; Package
guix-patches
.
(Sun, 20 Jan 2019 15:06:01 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Gabriel Hondet <gabrielhondet <at> gmail.com>
:
New bug report received and forwarded. Copy sent to
guix-patches <at> gnu.org
.
(Sun, 20 Jan 2019 15:06:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
* gnu/packages/haskell.scm (ghc-c2hs): New variable.
---
gnu/packages/haskell.scm | 56 ++++++++++++++++++++++++++++++++++++++++
1 file changed, 56 insertions(+)
diff --git a/gnu/packages/haskell.scm b/gnu/packages/haskell.scm
index a3ce2a3e4..c7587af7c 100644
--- a/gnu/packages/haskell.scm
+++ b/gnu/packages/haskell.scm
@@ -11405,4 +11405,60 @@ from a shell. The @code{tldr} pages are a community effort to simplify the
man pages with practical examples.")
(license license:bsd-3)))
+(define-public ghc-c2hs
+ (package
+ (name "ghc-c2hs")
+ (version "0.28.6")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (string-append
+ "https://hackage.haskell.org/package/c2hs/c2hs-"
+ version
+ ".tar.gz"))
+ (sha256
+ (base32
+ "1nplgxfin139x12sb656f5870rpdclrhzi8mq8pry035qld15pci"))))
+ (build-system haskell-build-system)
+ (inputs
+ `(("ghc-language-c" ,ghc-language-c)
+ ("ghc-dlist" ,ghc-dlist)))
+ (native-inputs
+ `(("ghc-test-framework" ,ghc-test-framework)
+ ("ghc-test-framework-hunit" ,ghc-test-framework-hunit)
+ ("ghc-hunit" ,ghc-hunit)
+ ("ghc-shelly" ,ghc-shelly)
+ ("ghc-text" ,ghc-text)
+ ("gcc" ,gcc)))
+ (arguments
+ `(#:tests? #f ;some tests fail because of syntax errors
+ #:phases
+ (modify-phases %standard-phases
+ (add-before 'check 'set-cc
+ ;; add a cc executable in the path, needed for some tests to pass
+ (lambda* (#:key inputs #:allow-other-keys)
+ (let ((gcc (assoc-ref inputs "gcc"))
+ (tmpbin (tmpnam))
+ (curpath (getenv "PATH")))
+ (mkdir-p tmpbin)
+ (symlink (which "gcc") (string-append tmpbin "/cc"))
+ (setenv "PATH" (string-append tmpbin ":" curpath)))
+ #t))
+ (add-after 'check 'remove-cc
+ ;; clean the tmp dir made in 'set-cc
+ (lambda _
+ (let* ((cc-path (which "cc"))
+ (cc-dir (dirname cc-path)))
+ (delete-file-recursively cc-dir)
+ #t))))))
+ (home-page "https://github.com/haskell/c2hs")
+ (synopsis
+ "C->Haskell FFI tool that gives some cross-language type safety")
+ (description "C->Haskell 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 hsc2hs), this ensures that C functions are
+imported with the correct Haskell types.")
+ (license license:gpl2)))
+
;;; haskell.scm ends here
--
2.20.1
[signature.asc (application/pgp-signature, inline)]
Reply sent
to
Ludovic Courtès <ludo <at> gnu.org>
:
You have taken responsibility.
(Wed, 23 Jan 2019 22:35:02 GMT)
Full text and
rfc822 format available.
Notification sent
to
Gabriel Hondet <gabrielhondet <at> gmail.com>
:
bug acknowledged by developer.
(Wed, 23 Jan 2019 22:35:02 GMT)
Full text and
rfc822 format available.
Message #10 received at 34146-done <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
Gabriel Hondet <gabrielhondet <at> gmail.com> skribis:
> * gnu/packages/haskell.scm (ghc-c2hs): New variable.
Applied with the changes below.
It’d be nice to report the test failures upstream since it could be
fairly problematic for such a tool to fail to parse C headers.
Thanks,
Ludo’.
[Message part 2 (text/x-patch, inline)]
diff --git a/gnu/packages/haskell.scm b/gnu/packages/haskell.scm
index 02af900354..b8ea36852b 100644
--- a/gnu/packages/haskell.scm
+++ b/gnu/packages/haskell.scm
@@ -11429,7 +11429,10 @@ man pages with practical examples.")
("ghc-text" ,ghc-text)
("gcc" ,gcc)))
(arguments
- `(#:tests? #f ;some tests fail because of syntax errors
+ `(;; XXX: Test failures are induced by a parse error in <bits/floatn.h>
+ ;; of glibc 2.28.
+ #:tests? #f
+
#:phases
(modify-phases %standard-phases
(add-before 'check 'set-cc
@@ -11450,8 +11453,7 @@ man pages with practical examples.")
(delete-file-recursively cc-dir)
#t))))))
(home-page "https://github.com/haskell/c2hs")
- (synopsis
- "C->Haskell FFI tool that gives some cross-language type safety")
+ (synopsis "Create Haskell bindings to C libraries")
(description "C->Haskell 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
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Thu, 21 Feb 2019 12:24:04 GMT)
Full text and
rfc822 format available.
This bug report was last modified 5 years and 59 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.