From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:60242) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1g7NYn-00037K-GO for guix-patches@gnu.org; Tue, 02 Oct 2018 12:30:11 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1g7NYh-0001pM-N7 for guix-patches@gnu.org; Tue, 02 Oct 2018 12:30:09 -0400 Received: from debbugs.gnu.org ([208.118.235.43]:58452) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1g7NYh-0001p1-Im for guix-patches@gnu.org; Tue, 02 Oct 2018 12:30:03 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1g7NYh-0004EO-C1 for guix-patches@gnu.org; Tue, 02 Oct 2018 12:30:03 -0400 Subject: [bug#32910] [PATCH 03/24] gnu: Add ghc-cairo. Resent-Message-ID: Received: from eggs.gnu.org ([2001:4830:134:3::10]:59979) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1g7NYA-000341-9c for guix-patches@gnu.org; Tue, 02 Oct 2018 12:29:31 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1g7NY8-0001ca-Li for guix-patches@gnu.org; Tue, 02 Oct 2018 12:29:30 -0400 Received: from pegasus.bbbm.mdc-berlin.de ([141.80.25.20]:51076) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1g7NY8-0001bx-7j for guix-patches@gnu.org; Tue, 02 Oct 2018 12:29:28 -0400 From: Ricardo Wurmus Date: Tue, 2 Oct 2018 18:28:51 +0200 Message-ID: <20181002162912.5037-3-ricardo.wurmus@mdc-berlin.de> In-Reply-To: <20181002162912.5037-1-ricardo.wurmus@mdc-berlin.de> References: <20181002162912.5037-1-ricardo.wurmus@mdc-berlin.de> MIME-Version: 1.0 Content-Type: text/plain Content-Transfer-Encoding: quoted-printable List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+kyle=kyleam.com@gnu.org Sender: "Guix-patches" To: 32908@debbugs.gnu.org, 32910@debbugs.gnu.org Cc: Ricardo Wurmus * 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))) =20 +(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 pa= ssed + ;; to "runhaskell" in addition to the "configure" action, becau= se it + ;; depends on gtk2hs-buildtools, which provide setup hooks. Wi= thout + ;; 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=3D" out)= ) + `(,(string-append "--libdir=3D" out = "/lib")) + `(,(string-append "--bindir=3D" out = "/bin")) + `(,(string-append + "--docdir=3D" out + "/share/doc/" ((@@ (guix build h= askell-build-system) + package-name-= version) out))) + '("--libsubdir=3D$compiler/$pkg-$ver= sion") + '("--package-db=3D../package.conf.d"= ) + '("--global") + `(,@(map + (cut string-append "--extra-inc= lude-dirs=3D" <>) + (search-path-as-list '("include= ") input-dirs))) + `(,@(map + (cut string-append "--extra-lib= -dirs=3D" <>) + (search-path-as-list '("lib") i= nput-dirs))) + (if tests? + '("--enable-tests") + '()) + configure-flags))) + (unsetenv "GHC_PACKAGE_PATH") + (apply invoke "runhaskell" "-package-db=3D../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") --=20 2.19.0