From patchwork Sun Aug 8 04:32:47 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Matthew James Kraai X-Patchwork-Id: 31879 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id A770227BC6B; Sun, 8 Aug 2021 05:34:09 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.9 required=5.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.2 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id CE5B627BC78 for ; Sun, 8 Aug 2021 05:34:08 +0100 (BST) Received: from localhost ([::1]:37048 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mCaVj-0005cf-Qh for patchwork@mira.cbaines.net; Sun, 08 Aug 2021 00:34:07 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:44666) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mCaVe-0005cV-Rf for guix-patches@gnu.org; Sun, 08 Aug 2021 00:34:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:41925) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mCaVe-00082D-LB for guix-patches@gnu.org; Sun, 08 Aug 2021 00:34:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mCaVe-0004QQ-EV for guix-patches@gnu.org; Sun, 08 Aug 2021 00:34:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#49939] [PATCH 1/2] gnu: Add ghc-filelock. Resent-From: Matthew James Kraai Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sun, 08 Aug 2021 04:34:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 49939 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 49939@debbugs.gnu.org Cc: Matthew James Kraai X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.162839718516893 (code B ref -1); Sun, 08 Aug 2021 04:34:02 +0000 Received: (at submit) by debbugs.gnu.org; 8 Aug 2021 04:33:05 +0000 Received: from localhost ([127.0.0.1]:53470 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mCaUi-0004OP-UK for submit@debbugs.gnu.org; Sun, 08 Aug 2021 00:33:05 -0400 Received: from lists.gnu.org ([209.51.188.17]:52778) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mCaUd-0004Nx-JV for submit@debbugs.gnu.org; Sun, 08 Aug 2021 00:33:03 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:44522) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mCaUd-0005Zn-CK for guix-patches@gnu.org; Sun, 08 Aug 2021 00:32:59 -0400 Received: from mail.ftbfs.org ([52.8.68.13]:59774 helo=aws.ftbfs.org) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mCaUb-00076p-J2 for guix-patches@gnu.org; Sun, 08 Aug 2021 00:32:59 -0400 Received: from ip68-228-72-85.oc.oc.cox.net ([68.228.72.85] helo=localhost.localdomain) by aws.ftbfs.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mCaUZ-0000sP-5p; Sun, 08 Aug 2021 04:32:55 +0000 From: Matthew James Kraai Date: Sat, 7 Aug 2021 21:32:47 -0700 Message-Id: <20210808043247.28114-1-kraai@ftbfs.org> X-Mailer: git-send-email 2.32.0 MIME-Version: 1.0 Received-SPF: pass client-ip=52.8.68.13; envelope-from=kraai@ftbfs.org; helo=aws.ftbfs.org X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham 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+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" X-getmail-retrieved-from-mailbox: Patches * gnu/packages/haskell-xyz.scm (ghc-filelock): New variable. --- gnu/packages/haskell-xyz.scm | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/gnu/packages/haskell-xyz.scm b/gnu/packages/haskell-xyz.scm index bb59476795..4393b77348 100644 --- a/gnu/packages/haskell-xyz.scm +++ b/gnu/packages/haskell-xyz.scm @@ -28,6 +28,7 @@ ;;; Copyright © 2020 Alexandru-Sergiu Marton ;;; Copyright © 2020 Carlo Holl ;;; Copyright © 2020 Christopher Lemmer Webber +;;; Copyright © 2021 Matthew James Kraai ;;; ;;; This file is part of GNU Guix. ;;; @@ -4478,6 +4479,31 @@ the files in a directory, and turn them into @code{(path, bytestring)} pairs embedded in your Haskell code.") (license license:bsd-3))) +(define-public ghc-filelock + (package + (name "ghc-filelock") + (version "0.1.1.4") + (source + (origin + (method url-fetch) + (uri (string-append + "https://hackage.haskell.org/package/filelock/filelock-" + version + ".tar.gz")) + (sha256 + (base32 + "189n4pvq7f4d235smg2iqs2m5rqmnjdxflifq0mnb2qdbc4jjznr")))) + (build-system haskell-build-system) + (native-inputs `(("ghc-async" ,ghc-async))) + (home-page + "http://github.com/takano-akio/filelock") + (synopsis + "Portable interface to file locking (flock / LockFileEx)") + (description + "This package provides a Haskell interface to Windows and Unix file +locking functionalities.") + (license license:public-domain))) + (define-public ghc-filemanip (package (name "ghc-filemanip") From patchwork Sun Aug 8 04:34:23 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Matthew James Kraai X-Patchwork-Id: 31880 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 09D2B27BC6B; Sun, 8 Aug 2021 05:35:17 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.9 required=5.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.2 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 4808127BC78 for ; Sun, 8 Aug 2021 05:35:16 +0100 (BST) Received: from localhost ([::1]:37270 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mCaWp-0005oF-D6 for patchwork@mira.cbaines.net; Sun, 08 Aug 2021 00:35:15 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:44744) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mCaWd-0005o6-7m for guix-patches@gnu.org; Sun, 08 Aug 2021 00:35:03 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:41935) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mCaWd-0000Q9-1S for guix-patches@gnu.org; Sun, 08 Aug 2021 00:35:03 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mCaWc-0004T1-Uq for guix-patches@gnu.org; Sun, 08 Aug 2021 00:35:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#49939] [PATCH 2/2] gnu: elm-compiler: Update to 0.19.1. References: <20210808043247.28114-1-kraai@ftbfs.org> In-Reply-To: <20210808043247.28114-1-kraai@ftbfs.org> Resent-From: Matthew James Kraai Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sun, 08 Aug 2021 04:35:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 49939 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 49939@debbugs.gnu.org Cc: Matthew James Kraai Received: via spool by 49939-submit@debbugs.gnu.org id=B49939.162839729217136 (code B ref 49939); Sun, 08 Aug 2021 04:35:02 +0000 Received: (at 49939) by debbugs.gnu.org; 8 Aug 2021 04:34:52 +0000 Received: from localhost ([127.0.0.1]:53479 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mCaWK-0004SA-HM for submit@debbugs.gnu.org; Sun, 08 Aug 2021 00:34:52 -0400 Received: from mail.ftbfs.org ([52.8.68.13]:40174 helo=aws.ftbfs.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mCaWI-0004Rw-3a for 49939@debbugs.gnu.org; Sun, 08 Aug 2021 00:34:43 -0400 Received: from ip68-228-72-85.oc.oc.cox.net ([68.228.72.85] helo=localhost.localdomain) by aws.ftbfs.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mCaWB-0000so-Rc; Sun, 08 Aug 2021 04:34:36 +0000 From: Matthew James Kraai Date: Sat, 7 Aug 2021 21:34:23 -0700 Message-Id: <20210808043423.28190-1-kraai@ftbfs.org> X-Mailer: git-send-email 2.32.0 MIME-Version: 1.0 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+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" X-getmail-retrieved-from-mailbox: Patches * gnu/packages/elm.scm (elm-compiler): Update to 0.19.1. [inputs]: Add ghc-filelock. * gnu/packages/patches/elm-compiler-old-time.patch: New file. * gnu/packages/patches/elm-compiler-fix-map-key.patch: Delete file. * gnu/local.mk (dist_patch_DATA): Remove elm-compiler-fix-map-key.patch and add elm-compiler-old-time.patch. * gnu/packages/patches/elm-compiler-disable-reactor.patch: Update. --- gnu/local.mk | 3 +- gnu/packages/elm.scm | 8 +- .../elm-compiler-disable-reactor.patch | 84 ++++++++++--------- .../patches/elm-compiler-fix-map-key.patch | 38 --------- .../patches/elm-compiler-old-time.patch | 39 +++++++++ 5 files changed, 92 insertions(+), 80 deletions(-) delete mode 100644 gnu/packages/patches/elm-compiler-fix-map-key.patch create mode 100644 gnu/packages/patches/elm-compiler-old-time.patch diff --git a/gnu/local.mk b/gnu/local.mk index caa9090bbd..73bf1409d5 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -44,6 +44,7 @@ # Copyright © 2021 Arun Isaac # Copyright © 2021 Sharlatan Hellseher # Copyright © 2021 Dmitry Polyakov +# Copyright © 2021 Matthew James Kraai # # This file is part of GNU Guix. # @@ -987,7 +988,7 @@ dist_patch_DATA = \ %D%/packages/patches/elfutils-tests-ptrace.patch \ %D%/packages/patches/elixir-path-length.patch \ %D%/packages/patches/elm-compiler-disable-reactor.patch \ - %D%/packages/patches/elm-compiler-fix-map-key.patch \ + %D%/packages/patches/elm-compiler-old-time.patch \ %D%/packages/patches/emacs-exec-path.patch \ %D%/packages/patches/emacs-exwm-fix-fullscreen-states.patch \ %D%/packages/patches/emacs-fix-scheme-indent-function.patch \ diff --git a/gnu/packages/elm.scm b/gnu/packages/elm.scm index feaa9c8d5c..885b0c4b5d 100644 --- a/gnu/packages/elm.scm +++ b/gnu/packages/elm.scm @@ -1,5 +1,6 @@ ;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2019 Robert Vollmert +;;; Copyright © 2021 Matthew James Kraai ;;; ;;; This file is part of GNU Guix. ;;; @@ -35,7 +36,7 @@ (define-public elm-compiler (package (name "elm-compiler") - (version "0.19.0") + (version "0.19.1") (source (origin (method git-fetch) @@ -44,10 +45,10 @@ (url "https://github.com/elm/compiler/") (commit version))) (sha256 - (base32 "0s93z9vr0vp5w894ghc5s34nsq09sg1msf59zfiba87sid5vgjqy")) + (base32 "1rdg3xp3js9xadclk3cdypkscm5wahgsfmm4ldcw3xswzhw6ri8w")) (patches (search-patches "elm-compiler-disable-reactor.patch" - "elm-compiler-fix-map-key.patch")))) + "elm-compiler-old-time.patch")))) (build-system haskell-build-system) (arguments `(#:phases @@ -71,6 +72,7 @@ ("ghc-ansi-wl-pprint" ,ghc-ansi-wl-pprint) ("ghc-edit-distance" ,ghc-edit-distance) ("ghc-file-embed" ,ghc-file-embed) + ("ghc-filelock" ,ghc-filelock) ("ghc-http" ,ghc-http) ("ghc-http-client" ,ghc-http-client) ("ghc-http-client-tls" ,ghc-http-client-tls) diff --git a/gnu/packages/patches/elm-compiler-disable-reactor.patch b/gnu/packages/patches/elm-compiler-disable-reactor.patch index 9871b55e8d..39778c1e93 100644 --- a/gnu/packages/patches/elm-compiler-disable-reactor.patch +++ b/gnu/packages/patches/elm-compiler-disable-reactor.patch @@ -1,16 +1,21 @@ -commit 20d80e2323b565a36751c9455e535d8f73fa32f7 -Author: Robert Vollmert -Date: Fri Jun 14 16:05:47 2019 +0200 +From 15807c24dd5721d6112add7f14f0b70e28f00ca4 Mon Sep 17 00:00:00 2001 +From: Robert Vollmert +Date: Wed, 7 Jul 2021 01:42:20 -0700 +Subject: [PATCH] disable reactor - disable reactor +--- + elm.cabal | 5 ----- + terminal/src/Develop.hs | 12 +----------- + terminal/src/Main.hs | 1 - + 3 files changed, 1 insertion(+), 17 deletions(-) diff --git a/elm.cabal b/elm.cabal -index c75f9689..ece63c46 100644 +index bf1cfcf0..8f7b2bd5 100644 --- a/elm.cabal +++ b/elm.cabal -@@ -45,9 +45,6 @@ Executable elm - builder/src - ui/terminal/src +@@ -48,9 +48,6 @@ Executable elm + terminal/impl + terminal/src - other-extensions: - TemplateHaskell @@ -18,34 +23,34 @@ index c75f9689..ece63c46 100644 Main-Is: Main.hs -@@ -56,8 +53,6 @@ Executable elm - Develop +@@ -74,8 +71,6 @@ Executable elm + -- from terminal/ Develop.Generate.Help Develop.Generate.Index - Develop.StaticFiles - Develop.StaticFiles.Build - Diff - Init - Install -diff --git a/ui/terminal/src/Develop.hs b/ui/terminal/src/Develop.hs -index 4b2252e1..7ed7716e 100644 ---- a/ui/terminal/src/Develop.hs -+++ b/ui/terminal/src/Develop.hs -@@ -23,7 +23,6 @@ import Snap.Util.FileServe - import qualified Elm.Project as Project - import qualified Develop.Generate.Help as Generate + + -- from builder/ + Build +diff --git a/terminal/src/Develop.hs b/terminal/src/Develop.hs +index 00339364..167de693 100644 +--- a/terminal/src/Develop.hs ++++ b/terminal/src/Develop.hs +@@ -25,7 +25,6 @@ import qualified Build + import qualified Elm.Details as Details + import qualified Develop.Generate.Help as Help import qualified Develop.Generate.Index as Index -import qualified Develop.StaticFiles as StaticFiles - import qualified Generate.Output as Output - import qualified Json.Encode as Encode - import qualified Reporting.Exit as Exit -@@ -219,16 +218,7 @@ compileToHtmlBuilder mode file = + import qualified Generate.Html as Html + import qualified Generate + import qualified Reporting +@@ -170,16 +169,7 @@ compile path = serveAssets :: Snap () -serveAssets = -- do file <- getSafePath -- case StaticFiles.lookup file of +- do path <- getSafePath +- case StaticFiles.lookup path of - Nothing -> - pass - @@ -57,15 +62,18 @@ index 4b2252e1..7ed7716e 100644 -- MIME TYPES -diff --git a/ui/terminal/src/Main.hs b/terminal/src/Main.hs -index 7000f3ca..2c76965a 100644 ---- a/ui/terminal/src/Main.hs -+++ b/ui/terminal/src/Main.hs -@@ -39,7 +39,6 @@ main = - complex intro outro - [ repl - , init -- , reactor - , make - , install - , bump +diff --git a/terminal/src/Main.hs b/terminal/src/Main.hs +index e2d3f408..cd078422 100644 +--- a/terminal/src/Main.hs ++++ b/terminal/src/Main.hs +@@ -34,7 +34,6 @@ main = + Terminal.app intro outro + [ repl + , init +- , reactor + , make + , install + , bump +-- +2.32.0 + diff --git a/gnu/packages/patches/elm-compiler-fix-map-key.patch b/gnu/packages/patches/elm-compiler-fix-map-key.patch deleted file mode 100644 index 4f05ded530..0000000000 --- a/gnu/packages/patches/elm-compiler-fix-map-key.patch +++ /dev/null @@ -1,38 +0,0 @@ -commit e3512d887df41a8162c3e361171c04beca08415b -Author: Tom Stejskal -Date: Mon Nov 19 20:09:43 2018 +0100 - - Fix Map.!: given key is not an element in the map - -diff --git a/compiler/src/Elm/Compiler/Type/Extract.hs b/compiler/src/Elm/Compiler/Type/Extract.hs -index 1aafe1d4..99763392 100644 ---- a/compiler/src/Elm/Compiler/Type/Extract.hs -+++ b/compiler/src/Elm/Compiler/Type/Extract.hs -@@ -10,6 +10,7 @@ module Elm.Compiler.Type.Extract - - - import Data.Map ((!)) -+import qualified Data.Map as Map - import qualified Data.Maybe as Maybe - import qualified Data.Set as Set - -@@ -134,11 +135,15 @@ extractUnion interfaces (Opt.Global home name) = - else - let - pname = toPublicName home name -- unions = I._unions (interfaces ! home) -+ maybeUnions = I._unions <$> Map.lookup home interfaces - in -- case I.toUnionInternals (unions ! name) of -- Can.Union vars ctors _ _ -> -- T.Union pname vars <$> traverse extractCtor ctors -+ case Map.lookup name =<< maybeUnions of -+ Just union -> -+ case I.toUnionInternals union of -+ Can.Union vars ctors _ _ -> -+ T.Union pname vars <$> traverse extractCtor ctors -+ Nothing -> -+ return $ T.Union pname [] [] - - - extractCtor :: Can.Ctor -> Extractor (N.Name, [T.Type]) diff --git a/gnu/packages/patches/elm-compiler-old-time.patch b/gnu/packages/patches/elm-compiler-old-time.patch new file mode 100644 index 0000000000..c5f669a8bf --- /dev/null +++ b/gnu/packages/patches/elm-compiler-old-time.patch @@ -0,0 +1,39 @@ +From 849e80635427f1ff393728d27022cdd672ba82ba Mon Sep 17 00:00:00 2001 +From: Matthew James Kraai +Date: Sat, 7 Aug 2021 21:18:29 -0700 +Subject: [PATCH] Support time < 1.9.1 + +--- + builder/src/File.hs | 2 +- + elm.cabal | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) + +diff --git a/builder/src/File.hs b/builder/src/File.hs +index 238da083..aaf94369 100644 +--- a/builder/src/File.hs ++++ b/builder/src/File.hs +@@ -46,7 +46,7 @@ newtype Time = Time Fixed.Pico + getTime :: FilePath -> IO Time + getTime path = + fmap +- (Time . Time.nominalDiffTimeToSeconds . Time.utcTimeToPOSIXSeconds) ++ (Time . realToFrac . Time.utcTimeToPOSIXSeconds) + (Dir.getModificationTime path) + + +diff --git a/elm.cabal b/elm.cabal +index bf1cfcf0..e7afe91e 100644 +--- a/elm.cabal ++++ b/elm.cabal +@@ -231,7 +231,7 @@ Executable elm + snap-core, + snap-server, + template-haskell, +- time >= 1.9.1, ++ time, + unordered-containers, + utf8-string, + vector, +-- +2.32.0 +