GNU bug report logs - #49939
[PATCH 1/2] gnu: Add ghc-filelock.

Previous Next

Package: guix-patches;

Reported by: Matthew James Kraai <kraai <at> ftbfs.org>

Date: Sun, 8 Aug 2021 04:34:02 UTC

Severity: normal

Tags: patch

Done: Vagrant Cascadian <vagrant <at> debian.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 49939 in the body.
You can then email your comments to 49939 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to guix-patches <at> gnu.org:
bug#49939; Package guix-patches. (Sun, 08 Aug 2021 04:34:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Matthew James Kraai <kraai <at> ftbfs.org>:
New bug report received and forwarded. Copy sent to guix-patches <at> gnu.org. (Sun, 08 Aug 2021 04:34:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Matthew James Kraai <kraai <at> ftbfs.org>
To: guix-patches <at> gnu.org
Cc: Matthew James Kraai <kraai <at> ftbfs.org>
Subject: [PATCH 1/2] gnu: Add ghc-filelock.
Date: Sat,  7 Aug 2021 21:32:47 -0700
* 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 <brown121407 <at> member.fsf.org>
 ;;; Copyright © 2020 Carlo Holl <carloholl <at> gmail.com>
 ;;; Copyright © 2020 Christopher Lemmer Webber <cwebber <at> dustycloud.org>
+;;; Copyright © 2021 Matthew James Kraai <kraai <at> ftbfs.org>
 ;;;
 ;;; 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")
-- 
2.32.0





Information forwarded to guix-patches <at> gnu.org:
bug#49939; Package guix-patches. (Sun, 08 Aug 2021 04:35:02 GMT) Full text and rfc822 format available.

Message #8 received at 49939 <at> debbugs.gnu.org (full text, mbox):

From: Matthew James Kraai <kraai <at> ftbfs.org>
To: 49939 <at> debbugs.gnu.org
Cc: Matthew James Kraai <kraai <at> ftbfs.org>
Subject: [PATCH 2/2] gnu: elm-compiler: Update to 0.19.1.
Date: Sat,  7 Aug 2021 21:34:23 -0700
* 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 <arunisaac <at> systemreboot.net>
 # Copyright © 2021 Sharlatan Hellseher <sharlatanus <at> gmail.com>
 # Copyright © 2021 Dmitry Polyakov <polyakov <at> liltechdude.xyz>
+# Copyright © 2021 Matthew James Kraai <kraai <at> ftbfs.org>
 #
 # 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 <rob <at> vllmrt.net>
+;;; Copyright © 2021 Matthew James Kraai <kraai <at> ftbfs.org>
 ;;;
 ;;; 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 <rob <at> vllmrt.net>
-Date:   Fri Jun 14 16:05:47 2019 +0200
+From 15807c24dd5721d6112add7f14f0b70e28f00ca4 Mon Sep 17 00:00:00 2001
+From: Robert Vollmert <rob <at> vllmrt.net>
+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 <tom.stejskal <at> gmail.com>
-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 <kraai <at> ftbfs.org>
+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
+
-- 
2.32.0





Reply sent to Vagrant Cascadian <vagrant <at> debian.org>:
You have taken responsibility. (Sat, 02 Sep 2023 05:56:02 GMT) Full text and rfc822 format available.

Notification sent to Matthew James Kraai <kraai <at> ftbfs.org>:
bug acknowledged by developer. (Sat, 02 Sep 2023 05:56:02 GMT) Full text and rfc822 format available.

Message #13 received at 49939-done <at> debbugs.gnu.org (full text, mbox):

From: Vagrant Cascadian <vagrant <at> debian.org>
To: Matthew James Kraai <kraai <at> ftbfs.org>, 49939-done <at> debbugs.gnu.org
Subject: Re: [bug#49939] [PATCH 2/2] gnu: elm-compiler: Update to 0.19.1.
Date: Fri, 01 Sep 2023 22:55:35 -0700
[Message part 1 (text/plain, inline)]
On 2021-08-07, Matthew James Kraai wrote:
> * gnu/packages/haskell-xyz.scm (ghc-filelock): New variable.
...
> +(define-public ghc-filelock
> +  (package
> +    (name "ghc-filelock")
> +    (version "0.1.1.4")

The git logs are not exactly clear, but this appears to have been
added or updated to 0.1.1.5 in commit b97f549b144.


> * gnu/packages/elm.scm (elm-compiler): Update to 0.19.1.
...
>  (define-public elm-compiler
>    (package
>      (name "elm-compiler")
> -    (version "0.19.0")
> +    (version "0.19.1")

And this was updated in:

4e99510deadff2fe1f0e8ee5e030e0ff28d569f0 gnu: elm-compiler: Update to 0.19.1.


Marking as done.


live well,
  vagrant
[signature.asc (application/pgp-signature, inline)]

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Sat, 30 Sep 2023 11:24:14 GMT) Full text and rfc822 format available.

This bug report was last modified 1 year and 245 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.