diff mbox series

[bug#39105] gnu: Add ghc-llvm-hs and dependency

Message ID 87h8108o4x.fsf@jo.zone
State Accepted
Headers show
Series [bug#39105] gnu: Add ghc-llvm-hs and dependency | expand

Checks

Context Check Description
cbaines/applying patch success Successfully applied
cbaines/applying patch success Successfully applied

Commit Message

JoJo Jan. 12, 2020, 7:10 p.m. UTC
* gnu/packages/haskell-xyz.scm
(ghc-llvm-hs, ghc-llvm-hs-pure): New variables.
---
 gnu/packages/haskell-xyz.scm | 66 ++++++++++++++++++++++++++++++++++++
 1 file changed, 66 insertions(+)

Comments

John Soo Jan. 14, 2020, 9:26 p.m. UTC | #1
Hi JoJo,

Looks good.  Thanks!

One thing you should do before this gets merged is to separate each package into one patch. One package per patch is the convention in guix.

- John
JoJo Jan. 15, 2020, 2:41 p.m. UTC | #2
Hello John,

Alright, two patches coming right up!

On Tue, Jan 14 2020, John Soo wrote:

> Hi JoJo,
>
> Looks good.  Thanks!
>
> One thing you should do before this gets merged is to separate each package into one patch. One package per patch is the convention in guix.
>
> - John
diff mbox series

Patch

diff --git a/gnu/packages/haskell-xyz.scm b/gnu/packages/haskell-xyz.scm
index 3a9880f58c..af507d9d43 100644
--- a/gnu/packages/haskell-xyz.scm
+++ b/gnu/packages/haskell-xyz.scm
@@ -54,6 +54,7 @@ 
   #:use-module (gnu packages haskell-web)
   #:use-module (gnu packages libffi)
   #:use-module (gnu packages linux)
+  #:use-module (gnu packages llvm)
   #:use-module (gnu packages lua)
   #:use-module (gnu packages maths)
   #:use-module (gnu packages ncurses)
@@ -6704,6 +6705,71 @@  ByteString, for types that support input and output, and for types that
 can handle infinite lists.")
     (license license:bsd-3)))
 
+(define-public ghc-llvm-hs-pure
+  (package
+    (name "ghc-llvm-hs-pure")
+    (version "9.0.0")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (string-append
+             "https://hackage.haskell.org/package/llvm-hs-pure/llvm-hs-pure-"
+             version
+             ".tar.gz"))
+       (sha256
+        (base32
+         "0pxb5ah8r5pzpz2ibqw3g9g1isigb4z7pbzfrwr8kmcjn74ab3kf"))))
+    (build-system haskell-build-system)
+    (inputs `(("ghc-attoparsec" ,ghc-attoparsec)
+              ("ghc-fail" ,ghc-fail)
+              ("ghc-unordered-containers" ,ghc-unordered-containers)))
+    (native-inputs `(("ghc-tasty" ,ghc-tasty)
+                     ("ghc-tasty-hunit" ,ghc-tasty-hunit)
+                     ("ghc-tasty-quickcheck" ,ghc-tasty-quickcheck)))
+    (home-page "http://github.com/llvm-hs/llvm-hs/")
+    (synopsis "Pure Haskell LLVM functionality (no FFI).")
+    (description "llvm-hs-pure is a set of pure Haskell types and functions
+for interacting with LLVM. It includes an ADT to represent LLVM IR. The
+llvm-hs package builds on this one with FFI bindings to LLVM, but llvm-hs-pure
+does not require LLVM to be available.")
+    (license license:bsd-3)))
+
+(define-public ghc-llvm-hs
+  (package
+    (name "ghc-llvm-hs")
+    (version "9.0.1")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (string-append
+             "https://hackage.haskell.org/package/llvm-hs/llvm-hs-"
+             version
+             ".tar.gz"))
+       (sha256
+        (base32
+         "0723xgh45h9cyxmmjsvxnsp8bpn1ljy4qgh7a7vqq3sj9d6wzq00"))))
+    (build-system haskell-build-system)
+    (inputs `(("ghc-attoparsec" ,ghc-attoparsec)
+              ("ghc-exceptions" ,ghc-exceptions)
+              ("ghc-utf8-string" ,ghc-utf8-string)
+              ("ghc-llvm-hs-pure" ,ghc-llvm-hs-pure)
+              ("llvm" ,llvm-9)))
+    (native-inputs `(("ghc-tasty" ,ghc-tasty)
+                     ("ghc-tasty-hunit" ,ghc-tasty-hunit)
+                     ("ghc-tasty-quickcheck" ,ghc-tasty-quickcheck)
+                     ("ghc-quickcheck" ,ghc-quickcheck)
+                     ("ghc-temporary" ,ghc-temporary)
+                     ("ghc-pretty-show" ,ghc-pretty-show)
+                     ("ghc-temporary" ,ghc-temporary)))
+    (home-page "http://github.com/llvm-hs/llvm-hs/")
+    (synopsis "General purpose LLVM bindings")
+    (description "llvm-hs is a set of Haskell bindings for LLVM. Unlike other
+current Haskell bindings, it uses an ADT to represent LLVM IR, and so offers
+two advantages: it handles almost all of the stateful complexities of using
+the LLVM API to build IR; and it supports moving IR not only from Haskell into
+LLVM C++ objects, but the other direction - from LLVM C++ into Haskell.")
+    (license license:bsd-3)))
+
 (define-public ghc-logging-facade
   (package
     (name "ghc-logging-facade")