From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:470:142:3::10]:42637) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iaecC-0004Jb-7h for guix-patches@gnu.org; Fri, 29 Nov 2019 06:39:14 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iaec7-0001SI-84 for guix-patches@gnu.org; Fri, 29 Nov 2019 06:39:09 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:53546) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1iaec7-0001Hk-3z for guix-patches@gnu.org; Fri, 29 Nov 2019 06:39:07 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1iaec5-0006CV-1P for guix-patches@gnu.org; Fri, 29 Nov 2019 06:39:05 -0500 Subject: [bug#38423] [PATCH 09/49] gnu: Add ghc-wai-cors. Resent-Message-ID: From: Robert Vollmert Date: Fri, 29 Nov 2019 12:37:11 +0100 Message-Id: <20191129113751.82405-9-rob@vllmrt.net> In-Reply-To: <20191129113751.82405-1-rob@vllmrt.net> References: <20191129113751.82405-1-rob@vllmrt.net> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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: 38423@debbugs.gnu.org Cc: Robert Vollmert * gnu/packages/haskell-web.scm (ghc-wai-cors): New package. --- gnu/local.mk | 1 + gnu/packages/haskell-web.scm | 42 +++++++++++++++++++ .../ghc-wai-cors-skip-phantomjs-tests.patch | 13 ++++++ 3 files changed, 56 insertions(+) create mode 100644 gnu/packages/patches/ghc-wai-cors-skip-phantomjs-tests.patch diff --git a/gnu/local.mk b/gnu/local.mk index e49029a379..56ff1d0f7b 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -889,6 +889,7 @@ dist_patch_DATA = \ %D%/packages/patches/ghc-monad-par-fix-tests.patch \ %D%/packages/patches/ghc-pandoc-fix-html-tests.patch \ %D%/packages/patches/ghc-pandoc-fix-latex-test.patch \ + %D%/packages/patches/ghc-wai-cors-skip-phantomjs-tests.patch \ %D%/packages/patches/ghostscript-no-header-id.patch \ %D%/packages/patches/ghostscript-no-header-uuid.patch \ %D%/packages/patches/ghostscript-no-header-creationdate.patch \ diff --git a/gnu/packages/haskell-web.scm b/gnu/packages/haskell-web.scm index e337d33e18..7f54568399 100644 --- a/gnu/packages/haskell-web.scm +++ b/gnu/packages/haskell-web.scm @@ -1599,3 +1599,45 @@ requirements of downstream users (e.g. Debian).") (description "Provide a bridge between WAI and the websockets package.") (license license:expat))) + +(define-public ghc-wai-cors + (package + (name "ghc-wai-cors") + (version "0.2.6") + (source + (origin + (method url-fetch) + (uri (string-append + "https://hackage.haskell.org/package/wai-cors/wai-cors-" + version + ".tar.gz")) + (sha256 + (base32 + "11m9d8hn9pb9brprz0kglldmcqj83kjkjdwdpxdbl12430ii1ina")) + (patches (search-patches "ghc-wai-cors-skip-phantomjs-tests.patch")))) + (build-system haskell-build-system) + (arguments + ;; required for unclear reasons; those flags should default to false + `(#:configure-flags '("--flags=-wai-2" "--flags=-wai-1"))) + (inputs + `(("ghc-attoparsec" ,ghc-attoparsec) + ("ghc-base-unicode-symbols" + ,ghc-base-unicode-symbols) + ("ghc-case-insensitive" ,ghc-case-insensitive) + ("ghc-http-types" ,ghc-http-types) + ("ghc-wai" ,ghc-wai))) + (native-inputs + `(("ghc-tasty" ,ghc-tasty) + ("ghc-tasty-hunit" ,ghc-tasty-hunit) + ("ghc-transformers-compat" ,ghc-transformers-compat) + ("ghc-wai-extra" ,ghc-wai-extra) + ("ghc-wai-websockets" ,ghc-wai-websockets) + ("ghc-warp" ,ghc-warp) + ("ghc-websockets" ,ghc-websockets))) + (home-page + "https://github.com/larskuhtz/wai-cors") + (synopsis "CORS for WAI") + (description + "This package provides an implemenation of Cross-Origin resource sharing +(CORS) for Wai that aims to be compliant with http://www.w3.org/TR/cors.") + (license license:expat))) diff --git a/gnu/packages/patches/ghc-wai-cors-skip-phantomjs-tests.patch b/gnu/packages/patches/ghc-wai-cors-skip-phantomjs-tests.patch new file mode 100644 index 0000000000..ffb1929a03 --- /dev/null +++ b/gnu/packages/patches/ghc-wai-cors-skip-phantomjs-tests.patch @@ -0,0 +1,13 @@ +Skip phantomjs tests. + +--- a/wai-cors.cabal 2017-12-02 19:58:59.000000000 +0100 ++++ b/wai-cors.cabal 2019-06-03 22:02:32.792000000 +0200 +@@ -102,6 +102,8 @@ + ghc-options: -Wall + + Test-Suite phantomjs ++ buildable: False ++ + type: exitcode-stdio-1.0 + default-language: Haskell2010 + main-is: PhantomJS.hs -- 2.21.0 (Apple Git-122.2)