From: Ricardo Wurmus <ricardo.wurmus@mdc-berlin.de>
To: 32908@debbugs.gnu.org, 32910@debbugs.gnu.org
Cc: Ricardo Wurmus <ricardo.wurmus@mdc-berlin.de>
Subject: [bug#32910] [PATCH 03/24] gnu: Add ghc-cairo.
Date: Tue, 2 Oct 2018 18:28:51 +0200 [thread overview]
Message-ID: <20181002162912.5037-3-ricardo.wurmus@mdc-berlin.de> (raw)
In-Reply-To: <20181002162912.5037-1-ricardo.wurmus@mdc-berlin.de>
* gnu/packages/haskell.scm (ghc-cairo): New variable.
---
gnu/packages/haskell.scm | 77 ++++++++++++++++++++++++++++++++++++++++
1 file changed, 77 insertions(+)
diff --git a/gnu/packages/haskell.scm b/gnu/packages/haskell.scm
index c8e4523eb..964b14749 100644
--- a/gnu/packages/haskell.scm
+++ b/gnu/packages/haskell.scm
@@ -43,6 +43,7 @@
#:use-module (gnu packages ghostscript)
#:use-module (gnu packages gl)
#:use-module (gnu packages graphviz)
+ #:use-module (gnu packages gtk)
#:use-module (gnu packages haskell-check)
#:use-module (gnu packages haskell-crypto)
#:use-module (gnu packages haskell-web)
@@ -10587,6 +10588,82 @@ expose it from another module in the hierarchy.
@end itemize")
(license license:expat)))
+(define-public ghc-cairo
+ (package
+ (name "ghc-cairo")
+ (version "0.13.5.0")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (string-append "https://hackage.haskell.org/package/cairo/"
+ "cairo-" version ".tar.gz"))
+ (sha256
+ (base32
+ "1wxylv4d8120ri0vgar168ikqa9m6533ipdwi38qlmxmw20ws2j2"))))
+ (build-system haskell-build-system)
+ (arguments
+ `(#:modules ((guix build haskell-build-system)
+ (guix build utils)
+ (ice-9 match)
+ (srfi srfi-26))
+ #:phases
+ (modify-phases %standard-phases
+ ;; FIXME: This is a copy of the standard configure phase with a tiny
+ ;; difference: this package needs the -package-db flag to be passed
+ ;; to "runhaskell" in addition to the "configure" action, because it
+ ;; depends on gtk2hs-buildtools, which provide setup hooks. Without
+ ;; this option the Setup.hs file cannot be evaluated. The
+ ;; haskell-build-system should be changed to pass "-package-db" to
+ ;; "runhaskell" in any case.
+ (replace 'configure
+ (lambda* (#:key outputs inputs tests? (configure-flags '())
+ #:allow-other-keys)
+ (let* ((out (assoc-ref outputs "out"))
+ (input-dirs (match inputs
+ (((_ . dir) ...)
+ dir)
+ (_ '())))
+ (ghc-path (getenv "GHC_PACKAGE_PATH"))
+ (params (append `(,(string-append "--prefix=" out))
+ `(,(string-append "--libdir=" out "/lib"))
+ `(,(string-append "--bindir=" out "/bin"))
+ `(,(string-append
+ "--docdir=" out
+ "/share/doc/" ((@@ (guix build haskell-build-system)
+ package-name-version) out)))
+ '("--libsubdir=$compiler/$pkg-$version")
+ '("--package-db=../package.conf.d")
+ '("--global")
+ `(,@(map
+ (cut string-append "--extra-include-dirs=" <>)
+ (search-path-as-list '("include") input-dirs)))
+ `(,@(map
+ (cut string-append "--extra-lib-dirs=" <>)
+ (search-path-as-list '("lib") input-dirs)))
+ (if tests?
+ '("--enable-tests")
+ '())
+ configure-flags)))
+ (unsetenv "GHC_PACKAGE_PATH")
+ (apply invoke "runhaskell" "-package-db=../package.conf.d"
+ "Setup.hs" "configure" params)
+ (setenv "GHC_PACKAGE_PATH" ghc-path)
+ #t))))))
+ (inputs
+ `(("ghc-utf8-string" ,ghc-utf8-string)
+ ("ghc-text" ,ghc-text)
+ ("cairo" ,cairo)))
+ (native-inputs
+ `(("ghc-gtk2hs-buildtools" ,ghc-gtk2hs-buildtools)
+ ("pkg-config" ,pkg-config)))
+ (home-page "http://projects.haskell.org/gtk2hs/")
+ (synopsis "Haskell bindings to the Cairo vector graphics library")
+ (description
+ "Cairo is a library to render high quality vector graphics. There exist
+various backends that allows rendering to Gtk windows, PDF, PS, PNG and SVG
+documents, amongst others.")
+ (license license:bsd-3)))
+
(define-public ghc-weigh
(package
(name "ghc-weigh")
--
2.19.0
next prev parent reply other threads:[~2018-10-02 16:30 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-10-02 16:23 [bug#32908] [PATCH 00/24] Add ngless Ricardo Wurmus
2018-10-02 16:28 ` [bug#32908] [PATCH 01/24] gnu: ghc-http-conduit: Remove ghc-http-client from native-inputs Ricardo Wurmus
2018-10-02 16:28 ` [bug#32909] [PATCH 02/24] gnu: ghc-regex: Fix build Ricardo Wurmus
2018-10-02 16:28 ` Ricardo Wurmus [this message]
2018-10-04 16:38 ` [bug#32908] [PATCH 03/24] gnu: Add ghc-cairo Leo Famulari
2018-10-02 16:28 ` [bug#32912] [PATCH 04/24] gnu: Add ghc-chart-cairo Ricardo Wurmus
2018-10-02 16:28 ` [bug#32908] [PATCH 05/24] gnu: Add ghc-atomic-write Ricardo Wurmus
2018-10-02 16:32 ` [bug#32908] [PATCH 06/24] gnu: Add ghc-cereal-conduit Ricardo Wurmus
2018-10-02 16:32 ` [bug#32908] [PATCH 07/24] gnu: Add ghc-lzma Ricardo Wurmus
2018-10-02 16:32 ` [bug#32908] [PATCH 08/24] gnu: Add ghc-stm-conduit Ricardo Wurmus
2018-10-02 16:32 ` [bug#32908] [PATCH 09/24] gnu: Add ghc-bindings-dsl Ricardo Wurmus
2018-10-02 16:32 ` [bug#32908] [PATCH 10/24] gnu: Add ghc-lzma-conduit Ricardo Wurmus
2018-10-02 16:32 ` [bug#32908] [PATCH 11/24] gnu: Add ghc-bzlib-conduit Ricardo Wurmus
2018-10-02 16:32 ` [bug#32908] [PATCH 12/24] gnu: Add ghc-pqueue Ricardo Wurmus
2018-10-02 16:32 ` [bug#32908] [PATCH 13/24] gnu: Add ghc-conduit-algorithms Ricardo Wurmus
2018-10-02 16:32 ` [bug#32908] [PATCH 14/24] gnu: Add ghc-interpolate Ricardo Wurmus
2018-10-02 16:32 ` [bug#32908] [PATCH 15/24] gnu: Add ghc-hpack Ricardo Wurmus
2018-10-02 16:37 ` [bug#32908] [PATCH 16/24] gnu: Add ghc-raw-string-qq Ricardo Wurmus
2018-10-02 16:38 ` [bug#32908] [PATCH 17/24] gnu: Add ghc-inline-c Ricardo Wurmus
2018-10-02 16:38 ` [bug#32908] [PATCH 18/24] gnu: Add ghc-safe-exceptions Ricardo Wurmus
2018-10-02 16:38 ` [bug#32908] [PATCH 19/24] gnu: Add ghc-inline-c-cpp Ricardo Wurmus
2018-10-02 16:38 ` [bug#32908] [PATCH 20/24] gnu: Add ghc-bytestring-lexing Ricardo Wurmus
2018-10-02 16:38 ` [bug#32908] [PATCH 21/24] gnu: Add ghc-configurator Ricardo Wurmus
2018-10-02 16:38 ` [bug#32908] [PATCH 22/24] gnu: Add ghc-file-embed Ricardo Wurmus
2018-10-02 16:38 ` [bug#32908] [PATCH 23/24] gnu: Add ghc-safeio Ricardo Wurmus
2018-10-02 16:38 ` [bug#32908] [PATCH 24/24] gnu: Add ngless Ricardo Wurmus
2018-10-02 16:37 ` bug#32911: submitted by accident Ricardo Wurmus
2018-10-04 16:38 ` [bug#32908] [PATCH 00/24] Add ngless Leo Famulari
2018-10-11 20:03 ` bug#32908: " Ricardo Wurmus
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://guix.gnu.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20181002162912.5037-3-ricardo.wurmus@mdc-berlin.de \
--to=ricardo.wurmus@mdc-berlin.de \
--cc=32908@debbugs.gnu.org \
--cc=32910@debbugs.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/guix.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).