From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0 ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id cFFNN82BWGEpPwEAgWs5BA (envelope-from ) for ; Sat, 02 Oct 2021 17:59:09 +0200 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0 with LMTPS id qDv4Ms2BWGHaKgAA1q6Kng (envelope-from ) for ; Sat, 02 Oct 2021 15:59:09 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id E3C5D822F for ; Sat, 2 Oct 2021 17:59:08 +0200 (CEST) Received: from localhost ([::1]:51438 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mWhPn-0000o1-VO for larch@yhetil.org; Sat, 02 Oct 2021 11:59:07 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:33172) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mWhPi-0000ns-Vl for guix-patches@gnu.org; Sat, 02 Oct 2021 11:59:03 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:48806) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mWhPi-0000zp-OL for guix-patches@gnu.org; Sat, 02 Oct 2021 11:59:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mWhPi-0007Aj-CJ; Sat, 02 Oct 2021 11:59:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#50969] [PATCH wip-haskell] gnu: idris: Fix build. Resent-From: Xinglu Chen Original-Sender: "Debbugs-submit" Resent-CC: lars@6xq.net, guix-patches@gnu.org Resent-Date: Sat, 02 Oct 2021 15:59:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 50969 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 50969@debbugs.gnu.org Cc: Lars-Dominik Braun X-Debbugs-Original-To: guix-patches@gnu.org X-Debbugs-Original-Xcc: Lars-Dominik Braun Received: via spool by submit@debbugs.gnu.org id=B.163319033027549 (code B ref -1); Sat, 02 Oct 2021 15:59:02 +0000 Received: (at submit) by debbugs.gnu.org; 2 Oct 2021 15:58:50 +0000 Received: from localhost ([127.0.0.1]:60351 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mWhPS-0007AC-3A for submit@debbugs.gnu.org; Sat, 02 Oct 2021 11:58:50 -0400 Received: from lists.gnu.org ([209.51.188.17]:54846) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mWhPQ-0007A4-5f for submit@debbugs.gnu.org; Sat, 02 Oct 2021 11:58:44 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:33142) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mWhPP-0000mF-TI for guix-patches@gnu.org; Sat, 02 Oct 2021 11:58:43 -0400 Received: from h87-96-130-155.cust.a3fiber.se ([87.96.130.155]:34550 helo=mail.yoctocell.xyz) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mWhPM-0000cq-1i for guix-patches@gnu.org; Sat, 02 Oct 2021 11:58:43 -0400 From: Xinglu Chen DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=yoctocell.xyz; s=mail; t=1633190313; bh=JqqFl7YVCPwrhIJVCTfb/P5hil5SGK/0dol3eAIuJx8=; h=From:To:Subject:Date; b=XLOmpPBwas5R9r5B8NDvQLK7vr5Q+nUTOP/SuC9ymeWFKXWdWIAztnM4OwEGL1QIp mByKk7ATx9zY5tAuyksuHn4xoBeB7csPW7oHKWu5XeZd0vk4FucY9m7uEWMwba1wsA H9L4JpNN5hNfBWUvzwEogiF3aZZkUUvugHzkwzN8= Message-Id: <02ff55a1802f9494b4bef0ab344590acf69ea0ce.1633190248.git.public@yoctocell.xyz> Date: Sat, 02 Oct 2021 17:58:32 +0200 MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=87.96.130.155; envelope-from=public@yoctocell.xyz; helo=mail.yoctocell.xyz X-Spam_score_int: 39 X-Spam_score: 3.9 X-Spam_bar: +++ X-Spam_report: (3.9 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FROM_SUSPICIOUS_NTLD=0.5, FROM_SUSPICIOUS_NTLD_FP=0.233, PDS_OTHER_BAD_TLD=1.999, PDS_RDNS_DYNAMIC_FP=0.001, RDNS_DYNAMIC=0.982, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, TO_NO_BRKTS_DYNIP=2.299 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: "Guix-patches" X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1633190349; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:resent-cc:resent-from:resent-sender: resent-message-id:list-id:list-help:list-unsubscribe:list-subscribe: list-post:dkim-signature; bh=1tissb7zRbiU+xSaixkj5b1p4TQMN7RLqOPDfDYuNyc=; b=d1UtDMBKnPvOq7m9rGJwPRmUqz1mNSEbGiOtMk4hjEt8BxaJxQ2qa1Me08HTrt0c10iuqH /mkjHSRhKMsorKR3LciDZ2V52+TRByRF7fMQueGW/le4niY5w2KAH7d2BxHIcQ9GiaXaD6 T+YxGq1vaT8iCOY0yjGjgfdbcofizm+cwH5h8Wf0UM4cp8FC6iuA+pUlXwe426iQtjTG1p dFKRIJ0kalheIBwwqxbd8Qcz0udT/cQerpN07kNhRJJV6+FiOzuZty30fUThDO+6B8bpy3 IxiXOEUKoWAWsS50m8nVVScRXEBUKKvMWJ4MgKI1AWOWBCMJWKJrLx9RneCm2Q== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1633190349; a=rsa-sha256; cv=none; b=DqUbO4Vl1GV4U1OvSDzza8mq5JV3DtobUN29se6TLu/gc6/HjCu4ELRv6idjRDVs+qnFD6 U9N2p2pE1RmkAQjgbFhE8aPaRq1O6aJ14B0+JmPweGnsLCHqAYz5AojNxDQs4kv5csijeL nRKP7uWN1C3V7UPUBnXLV8jMn/HcL+oCGLXsk12pfPYXXsgbf+1eAHbL/NS/h7Dg7UVWOo SVUeVzu4kvBbSdCqGNrhA9029I1DMBJtBLk4WMdb8OwQ0Lg53j9PRgBBsuZHqV6buRckUY E+Fc5yLoLdG9+yax9HFBTKpnaoa3sY84B7wmA7wbr22amfQPGxUMUkjI8qkycw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=yoctocell.xyz header.s=mail header.b=XLOmpPBw; dmarc=fail reason="SPF not aligned (relaxed)" header.from=yoctocell.xyz (policy=none); spf=pass (aspmx1.migadu.com: domain of guix-patches-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-patches-bounces@gnu.org X-Migadu-Spam-Score: -0.30 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=yoctocell.xyz header.s=mail header.b=XLOmpPBw; dmarc=fail reason="SPF not aligned (relaxed)" header.from=yoctocell.xyz (policy=none); spf=pass (aspmx1.migadu.com: domain of guix-patches-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-patches-bounces@gnu.org X-Migadu-Queue-Id: E3C5D822F X-Spam-Score: -0.30 X-Migadu-Scanner: scn0.migadu.com X-TUID: kj4Tpkiq+LoE Backport some commits from upstream. * gnu/packages/patches/idris-build-with-haskeline-0.8.patch: * gnu/packages/patches/idris-build-with-megaparsec-9.patch: New patches * gnu/local.mk (dist_patch_DATA): Add them. * gnu/packages/idris.scm (idris): Use them. --- gnu/local.mk | 2 + gnu/packages/idris.scm | 4 +- .../idris-build-with-haskeline-0.8.patch | 85 +++++++++++++++++++ .../idris-build-with-megaparsec-9.patch | 27 ++++++ 4 files changed, 117 insertions(+), 1 deletion(-) create mode 100644 gnu/packages/patches/idris-build-with-haskeline-0.8.patch create mode 100644 gnu/packages/patches/idris-build-with-megaparsec-9.patch diff --git a/gnu/local.mk b/gnu/local.mk index ac5337b491..12661d8c94 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1257,6 +1257,8 @@ dist_patch_DATA = \ %D%/packages/patches/id3lib-CVE-2007-4460.patch \ %D%/packages/patches/id3lib-UTF16-writing-bug.patch \ %D%/packages/patches/idris-disable-test.patch \ + %D%/packages/patches/idris-build-with-haskeline-0.8.patch \ + %D%/packages/patches/idris-build-with-megaparsec-9.patch \ %D%/packages/patches/ilmbase-fix-tests.patch \ %D%/packages/patches/imagemagick-CVE-2020-27829.patch \ %D%/packages/patches/imagemagick-ReadDCMImage-fix.patch \ diff --git a/gnu/packages/idris.scm b/gnu/packages/idris.scm index 0e8502b908..10ad154923 100644 --- a/gnu/packages/idris.scm +++ b/gnu/packages/idris.scm @@ -47,7 +47,9 @@ (define-public idris (sha256 (base32 "1pachwc6msw3n1mz2z1r1w6h518w9gbhdvbaa5vi1qp3cn3wm6q4")) - (patches (search-patches "idris-disable-test.patch")))) + (patches (search-patches "idris-disable-test.patch" + "idris-build-with-haskeline-0.8.patch" + "idris-build-with-megaparsec-9.patch")))) (build-system haskell-build-system) (native-inputs ;For tests `(("perl" ,perl) diff --git a/gnu/packages/patches/idris-build-with-haskeline-0.8.patch b/gnu/packages/patches/idris-build-with-haskeline-0.8.patch new file mode 100644 index 0000000000..5d1fec2409 --- /dev/null +++ b/gnu/packages/patches/idris-build-with-haskeline-0.8.patch @@ -0,0 +1,85 @@ +From 89a87cf666eb8b27190c779e72d0d76eadc1bc14 Mon Sep 17 00:00:00 2001 +From: Niklas Larsson +Date: Sat, 6 Jun 2020 15:29:45 +0200 +Subject: [PATCH] Fix to unblock haskeline-0.8 + +--- +Taken from + + idris.cabal | 2 +- + src/Idris/Output.hs | 8 -------- + src/Idris/REPL.hs | 12 +++++------- + 3 files changed, 6 insertions(+), 16 deletions(-) + +diff --git a/idris.cabal b/idris.cabal +index 38359019a9..bc9e265023 100644 +--- a/idris.cabal ++++ b/idris.cabal +@@ -336,7 +336,7 @@ Library + , directory >= 1.2.2.0 && < 1.2.3.0 || > 1.2.3.0 + , filepath < 1.5 + , fingertree >= 0.1.4.1 && < 0.2 +- , haskeline >= 0.7 && < 0.8 ++ , haskeline >= 0.8 && < 0.9 + , ieee754 >= 0.7 && < 0.9 + , megaparsec >= 7.0.4 && < 9 + , mtl >= 2.1 && < 2.3 +diff --git a/src/Idris/Output.hs b/src/Idris/Output.hs +index 70b4d48a30..6b5d59948c 100644 +--- a/src/Idris/Output.hs ++++ b/src/Idris/Output.hs +@@ -37,21 +37,13 @@ import Prelude hiding ((<$>)) + #endif + + import Control.Arrow (first) +-import Control.Monad.Trans.Except (ExceptT(ExceptT), runExceptT) + import Data.List (intersperse, nub) + import Data.Maybe (fromJust, fromMaybe, isJust, listToMaybe) + import qualified Data.Set as S +-import System.Console.Haskeline.MonadException (MonadException(controlIO), +- RunIO(RunIO)) + import System.FilePath (replaceExtension) + import System.IO (Handle, hPutStr, hPutStrLn) + import System.IO.Error (tryIOError) + +-instance MonadException m => MonadException (ExceptT Err m) where +- controlIO f = ExceptT $ controlIO $ \(RunIO run) -> let +- run' = RunIO (fmap ExceptT . run . runExceptT) +- in fmap runExceptT $ f run' +- + pshow :: IState -> Err -> String + pshow ist err = displayDecorated (consoleDecorate ist) . + renderPretty 1.0 80 . +diff --git a/src/Idris/REPL.hs b/src/Idris/REPL.hs +index 05587d9672..5e0dc21089 100644 +--- a/src/Idris/REPL.hs ++++ b/src/Idris/REPL.hs +@@ -122,23 +122,21 @@ repl orig mods efile + (if colour && not isWindows + then colourisePrompt theme str + else str) ++ " " +- x <- H.catch (H.withInterrupt $ getInputLine prompt) +- (ctrlC (return $ Just "")) ++ x <- H.handleInterrupt (ctrlC (return $ Just "")) (H.withInterrupt $ getInputLine prompt) + case x of + Nothing -> do lift $ when (not quiet) (iputStrLn "Bye bye") + return () + Just input -> -- H.catch +- do ms <- H.catch (H.withInterrupt $ lift $ processInput input orig mods efile) +- (ctrlC (return (Just mods))) ++ do ms <- H.handleInterrupt (ctrlC (return (Just mods))) (H.withInterrupt $ lift $ processInput input orig mods efile) + case ms of + Just mods -> let efile' = fromMaybe efile (listToMaybe mods) + in repl orig mods efile' + Nothing -> return () + -- ctrlC) + -- ctrlC +- where ctrlC :: InputT Idris a -> SomeException -> InputT Idris a +- ctrlC act e = do lift $ iputStrLn (show e) +- act -- repl orig mods ++ where ctrlC :: InputT Idris a -> InputT Idris a ++ ctrlC act = do lift $ iputStrLn "Interrupted" ++ act -- repl orig mods + + showMVs c thm [] = "" + showMVs c thm ms = "Holes: " ++ diff --git a/gnu/packages/patches/idris-build-with-megaparsec-9.patch b/gnu/packages/patches/idris-build-with-megaparsec-9.patch new file mode 100644 index 0000000000..6d7ff1d713 --- /dev/null +++ b/gnu/packages/patches/idris-build-with-megaparsec-9.patch @@ -0,0 +1,27 @@ +From 6ea9bc913877d765048d7cdb7fc5aec60b196fac Mon Sep 17 00:00:00 2001 +From: Felix Yan +Date: Wed, 16 Dec 2020 21:48:32 +0800 +Subject: [PATCH] Fix compatibility with megaparsec 9 + +--- +Taken from + + src/Idris/Parser/Stack.hs | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/src/Idris/Parser/Stack.hs b/src/Idris/Parser/Stack.hs +index fb7b611440..879786f4d2 100644 +--- a/src/Idris/Parser/Stack.hs ++++ b/src/Idris/Parser/Stack.hs +@@ -84,7 +84,11 @@ instance Message ParseError where + (pos, _) = P.reachOffsetNoLine (parseErrorOffset err) (parseErrorPosState err) + #endif + messageText = PP.text . init . P.parseErrorTextPretty . parseError ++#if MIN_VERSION_megaparsec(9,0,0) ++ messageSource err = sline ++#else + messageSource err = Just sline ++#endif + where + #if MIN_VERSION_megaparsec(8,0,0) + (sline, _) = P.reachOffset (parseErrorOffset err) (parseErrorPosState err) base-commit: 8dfb377a135e1b068eb51e9958b0f1f56f8613e2 -- 2.33.0