Add git-annex assistant and dependencies

  • Done
  • quality assurance status badge
Details
2 participants
  • Christopher Lemmer Webber
  • Timothy Sample
Owner
unassigned
Submitted by
Christopher Lemmer Webber
Severity
normal

Debbugs page

Christopher Lemmer Webber wrote 4 years ago
(address . guix-patches@gnu.org)
878sbi9rbb.fsf@dustycloud.org
Attached is a highly WIP patch for the git-annex assistant (sloppily
includes the two dependencies that also need to be added, will separate
once I get it all working). However, it doesn't work... here's the
point at which it stopped working:

[601 of 607] Compiling Assistant ( Assistant.hs, dist/build/git-annex/git-annex-tmp/Assistant.dyn_o )

Assistant.hs:73:55: warning: [-Wunused-matches]
Defined but not used: ‘listenhost’
|
73 | startDaemon assistant foreground startdelay cannotrun listenhost startbrowser = do
| ^^^^^^^^^^
[602 of 607] Compiling Command.Watch ( Command/Watch.hs, dist/build/git-annex/git-annex-tmp/Command/Watch.dyn_o )
[603 of 607] Compiling Command.Assistant ( Command/Assistant.hs, dist/build/git-annex/git-annex-tmp/Command/Assistant.dyn_o )
[604 of 607] Compiling CmdLine.GitAnnex ( CmdLine/GitAnnex.hs, dist/build/git-annex/git-annex-tmp/CmdLine/GitAnnex.dyn_o )
[605 of 607] Compiling Main ( git-annex.hs, dist/build/git-annex/git-annex-tmp/Main.dyn_o )
[606 of 607] Compiling Assistant.Pairing.Network ( Assistant/Pairing/Network.hs, dist/build/git-annex/git-annex-tmp/Assistant/Pairing/Network.dyn_o )

Assistant/Pairing/Network.hs:20:1: error:
Could not find module ‘Network.Multicast’
Use -v to see a list of the files searched for.
|
20 | import Network.Multicast
| ^^^^^^^^^^^^^^^^^^^^^^^^

Assistant/Pairing/Network.hs:21:1: error:
Could not load module ‘Network.Info’
It is a member of the hidden package ‘network-info-0.2.0.10’.
Perhaps you need to add ‘network-info’ to the build-depends in your .cabal file.
Use -v to see a list of the files searched for.
|
21 | import Network.Info
| ^^^^^^^^^^^^^^^^^^^
command "runhaskell" "Setup.hs" "build" "--ghc-option=-j8" failed with status 1

I'm unsure why it would be failing since I did add network-info to the
inputs. Any ideas?
From 092183597b503ef349401a99ce1e981f4b3d29ba Mon Sep 17 00:00:00 2001
From: Christopher Lemmer Webber <cwebber@dustycloud.org>
Date: Tue, 3 Nov 2020 14:21:51 -0500
Subject: [PATCH] Git annex assistant wip

---
gnu/packages/haskell-apps.scm | 6 +++++-
gnu/packages/haskell-xyz.scm | 21 +++++++++++++++++++++
2 files changed, 26 insertions(+), 1 deletion(-)

Toggle diff (70 lines)
diff --git a/gnu/packages/haskell-apps.scm b/gnu/packages/haskell-apps.scm
index 1de8b040f1..e3f0ed01f5 100644
--- a/gnu/packages/haskell-apps.scm
+++ b/gnu/packages/haskell-apps.scm
@@ -350,7 +350,7 @@ to @code{cabal repl}).")
(build-system haskell-build-system)
(arguments
`(#:configure-flags
- '("--flags=-Android -Assistant -Pairing -Webapp")
+ '("--flags=-Android -Pairing -Webapp")
#:phases
(modify-phases %standard-phases
(add-before 'configure 'patch-shell-for-tests
@@ -449,6 +449,7 @@ to @code{cabal repl}).")
("ghc-cryptonite" ,ghc-cryptonite)
("ghc-data-default" ,ghc-data-default)
("ghc-dav" ,ghc-dav)
+ ("ghc-dbus" ,ghc-dbus)
("ghc-disk-free-space" ,ghc-disk-free-space)
("ghc-dlist" ,ghc-dlist)
("ghc-edit-distance" ,ghc-edit-distance)
@@ -457,6 +458,7 @@ to @code{cabal repl}).")
("ghc-feed" ,ghc-feed)
("ghc-filepath-bytestring" ,ghc-filepath-bytestring)
("ghc-free" ,ghc-free)
+ ("ghc-hinotify" ,ghc-hinotify)
("ghc-hslogger" ,ghc-hslogger)
("ghc-http-client" ,ghc-http-client)
("ghc-http-conduit" ,ghc-http-conduit)
@@ -466,7 +468,9 @@ to @code{cabal repl}).")
("ghc-memory" ,ghc-memory)
("ghc-monad-control" ,ghc-monad-control)
("ghc-monad-logger" ,ghc-monad-logger)
+ ("ghc-mountpoints" ,ghc-mountpoints)
("ghc-network" ,ghc-network)
+ ("ghc-network-info" ,ghc-network-info)
("ghc-old-locale" ,ghc-old-locale)
("ghc-optparse-applicative" ,ghc-optparse-applicative)
("ghc-persistent" ,ghc-persistent)
diff --git a/gnu/packages/haskell-xyz.scm b/gnu/packages/haskell-xyz.scm
index 43dc7d5bbf..24be3ce5bc 100644
--- a/gnu/packages/haskell-xyz.scm
+++ b/gnu/packages/haskell-xyz.scm
@@ -15416,3 +15416,24 @@ Zstandard compression algorithm, a fast lossless compression algorithm
targeting real-time compression scenarios at zlib-level and better
compression ratios.")
(license license:bsd-3)))
+
+(define-public ghc-mountpoints
+ (package
+ (name "ghc-mountpoints")
+ (version "1.0.2")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (string-append
+ "https://hackage.haskell.org/package/mountpoints/mountpoints-"
+ version
+ ".tar.gz"))
+ (sha256
+ (base32
+ "1hnm31pqcffphyc463wf0vbik9fzm5lb2r4wjdc1y4dqzmjdzz37"))))
+ (build-system haskell-build-system)
+ (home-page
+ "http://hackage.haskell.org/package/mountpoints")
+ (synopsis "list mount points")
+ (description "Lists currently mounted filesystems. . Works on: Linux, BSD, Mac OS X, Android")
+ (license license:lgpl2.1+)))
--
2.29.1
Christopher Lemmer Webber wrote 4 years ago
871rha9qx9.fsf@dustycloud.org
Just figured out that I also needed ghc-network-multicast. Trying with
that.

Christopher Lemmer Webber writes:

Toggle quote (116 lines)
> Attached is a highly WIP patch for the git-annex assistant (sloppily
> includes the two dependencies that also need to be added, will separate
> once I get it all working). However, it doesn't work... here's the
> point at which it stopped working:
>
> [601 of 607] Compiling Assistant ( Assistant.hs, dist/build/git-annex/git-annex-tmp/Assistant.dyn_o )
>
> Assistant.hs:73:55: warning: [-Wunused-matches]
> Defined but not used: ‘listenhost’
> |
> 73 | startDaemon assistant foreground startdelay cannotrun listenhost startbrowser = do
> | ^^^^^^^^^^
> [602 of 607] Compiling Command.Watch ( Command/Watch.hs, dist/build/git-annex/git-annex-tmp/Command/Watch.dyn_o )
> [603 of 607] Compiling Command.Assistant ( Command/Assistant.hs, dist/build/git-annex/git-annex-tmp/Command/Assistant.dyn_o )
> [604 of 607] Compiling CmdLine.GitAnnex ( CmdLine/GitAnnex.hs, dist/build/git-annex/git-annex-tmp/CmdLine/GitAnnex.dyn_o )
> [605 of 607] Compiling Main ( git-annex.hs, dist/build/git-annex/git-annex-tmp/Main.dyn_o )
> [606 of 607] Compiling Assistant.Pairing.Network ( Assistant/Pairing/Network.hs, dist/build/git-annex/git-annex-tmp/Assistant/Pairing/Network.dyn_o )
>
> Assistant/Pairing/Network.hs:20:1: error:
> Could not find module ‘Network.Multicast’
> Use -v to see a list of the files searched for.
> |
> 20 | import Network.Multicast
> | ^^^^^^^^^^^^^^^^^^^^^^^^
>
> Assistant/Pairing/Network.hs:21:1: error:
> Could not load module ‘Network.Info’
> It is a member of the hidden package ‘network-info-0.2.0.10’.
> Perhaps you need to add ‘network-info’ to the build-depends in your .cabal file.
> Use -v to see a list of the files searched for.
> |
> 21 | import Network.Info
> | ^^^^^^^^^^^^^^^^^^^
> command "runhaskell" "Setup.hs" "build" "--ghc-option=-j8" failed with status 1
>
> I'm unsure why it would be failing since I did add network-info to the
> inputs. Any ideas?
>
>>From 092183597b503ef349401a99ce1e981f4b3d29ba Mon Sep 17 00:00:00 2001
> From: Christopher Lemmer Webber <cwebber@dustycloud.org>
> Date: Tue, 3 Nov 2020 14:21:51 -0500
> Subject: [PATCH] Git annex assistant wip
>
> ---
> gnu/packages/haskell-apps.scm | 6 +++++-
> gnu/packages/haskell-xyz.scm | 21 +++++++++++++++++++++
> 2 files changed, 26 insertions(+), 1 deletion(-)
>
> diff --git a/gnu/packages/haskell-apps.scm b/gnu/packages/haskell-apps.scm
> index 1de8b040f1..e3f0ed01f5 100644
> --- a/gnu/packages/haskell-apps.scm
> +++ b/gnu/packages/haskell-apps.scm
> @@ -350,7 +350,7 @@ to @code{cabal repl}).")
> (build-system haskell-build-system)
> (arguments
> `(#:configure-flags
> - '("--flags=-Android -Assistant -Pairing -Webapp")
> + '("--flags=-Android -Pairing -Webapp")
> #:phases
> (modify-phases %standard-phases
> (add-before 'configure 'patch-shell-for-tests
> @@ -449,6 +449,7 @@ to @code{cabal repl}).")
> ("ghc-cryptonite" ,ghc-cryptonite)
> ("ghc-data-default" ,ghc-data-default)
> ("ghc-dav" ,ghc-dav)
> + ("ghc-dbus" ,ghc-dbus)
> ("ghc-disk-free-space" ,ghc-disk-free-space)
> ("ghc-dlist" ,ghc-dlist)
> ("ghc-edit-distance" ,ghc-edit-distance)
> @@ -457,6 +458,7 @@ to @code{cabal repl}).")
> ("ghc-feed" ,ghc-feed)
> ("ghc-filepath-bytestring" ,ghc-filepath-bytestring)
> ("ghc-free" ,ghc-free)
> + ("ghc-hinotify" ,ghc-hinotify)
> ("ghc-hslogger" ,ghc-hslogger)
> ("ghc-http-client" ,ghc-http-client)
> ("ghc-http-conduit" ,ghc-http-conduit)
> @@ -466,7 +468,9 @@ to @code{cabal repl}).")
> ("ghc-memory" ,ghc-memory)
> ("ghc-monad-control" ,ghc-monad-control)
> ("ghc-monad-logger" ,ghc-monad-logger)
> + ("ghc-mountpoints" ,ghc-mountpoints)
> ("ghc-network" ,ghc-network)
> + ("ghc-network-info" ,ghc-network-info)
> ("ghc-old-locale" ,ghc-old-locale)
> ("ghc-optparse-applicative" ,ghc-optparse-applicative)
> ("ghc-persistent" ,ghc-persistent)
> diff --git a/gnu/packages/haskell-xyz.scm b/gnu/packages/haskell-xyz.scm
> index 43dc7d5bbf..24be3ce5bc 100644
> --- a/gnu/packages/haskell-xyz.scm
> +++ b/gnu/packages/haskell-xyz.scm
> @@ -15416,3 +15416,24 @@ Zstandard compression algorithm, a fast lossless compression algorithm
> targeting real-time compression scenarios at zlib-level and better
> compression ratios.")
> (license license:bsd-3)))
> +
> +(define-public ghc-mountpoints
> + (package
> + (name "ghc-mountpoints")
> + (version "1.0.2")
> + (source
> + (origin
> + (method url-fetch)
> + (uri (string-append
> + "https://hackage.haskell.org/package/mountpoints/mountpoints-"
> + version
> + ".tar.gz"))
> + (sha256
> + (base32
> + "1hnm31pqcffphyc463wf0vbik9fzm5lb2r4wjdc1y4dqzmjdzz37"))))
> + (build-system haskell-build-system)
> + (home-page
> + "http://hackage.haskell.org/package/mountpoints")
> + (synopsis "list mount points")
> + (description "Lists currently mounted filesystems. . Works on: Linux, BSD, Mac OS X, Android")
> + (license license:lgpl2.1+)))
Christopher Lemmer Webber wrote 4 years ago
[PATCH 1/3] gnu: Add ghc-mountpoints.
87v9em8551.fsf@dustycloud.org
Here we go... this actually works now. Working git-annex assistant!

For whatever reason I also seemed to enable pairing to get this to
function (there was a compilation error otherwise).
From 1c11f5e8141691e3540cc451c3c4d213fdd38067 Mon Sep 17 00:00:00 2001
From: Christopher Lemmer Webber <cwebber@dustycloud.org>
Date: Tue, 3 Nov 2020 17:00:02 -0500
Subject: [PATCH 1/3] gnu: Add ghc-mountpoints.

* gnu/packages/haskell-xyz.scm (ghc-mountpoints): New variable.
---
gnu/packages/haskell-xyz.scm | 23 +++++++++++++++++++++++
1 file changed, 23 insertions(+)

Toggle diff (40 lines)
diff --git a/gnu/packages/haskell-xyz.scm b/gnu/packages/haskell-xyz.scm
index 43dc7d5bbf..f9da8f573a 100644
--- a/gnu/packages/haskell-xyz.scm
+++ b/gnu/packages/haskell-xyz.scm
@@ -27,6 +27,7 @@
;;; Copyright © 2020 Nicolas Goaziou <mail@nicolasgoaziou.fr>
;;; Copyright © 2020 Alexandru-Sergiu Marton <brown121407@member.fsf.org>
;;; Copyright © 2020 Carlo Holl <carloholl@gmail.com>
+;;; Copyright © 2020 Christopher Lemmer Webber <cwebber@dustycloud.org>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -15416,3 +15417,25 @@ Zstandard compression algorithm, a fast lossless compression algorithm
targeting real-time compression scenarios at zlib-level and better
compression ratios.")
(license license:bsd-3)))
+
+(define-public ghc-mountpoints
+ (package
+ (name "ghc-mountpoints")
+ (version "1.0.2")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (string-append
+ "https://hackage.haskell.org/package/mountpoints/mountpoints-"
+ version
+ ".tar.gz"))
+ (sha256
+ (base32
+ "1hnm31pqcffphyc463wf0vbik9fzm5lb2r4wjdc1y4dqzmjdzz37"))))
+ (build-system haskell-build-system)
+ (home-page
+ "http://hackage.haskell.org/package/mountpoints")
+ (synopsis "Haskell library for listing mount points")
+ (description "This library provides Haskell bindings for checking
+currently mounted filesystems.")
+ (license license:lgpl2.1+)))
--
2.29.1
Christopher Lemmer Webber wrote 4 years ago
[PATCH 2/3] gnu: Add ghc-network-multicast.
87sg9q8542.fsf@dustycloud.org
From 3b0f21df17b9265e6366da0611e7441e66015f0d Mon Sep 17 00:00:00 2001
From: Christopher Lemmer Webber <cwebber@dustycloud.org>
Date: Tue, 3 Nov 2020 17:02:50 -0500
Subject: [PATCH 2/3] gnu: Add ghc-network-multicast.

* gnu/packages/haskell-xyz.scm (ghc-network-multicast): New variable.
---
gnu/packages/haskell-xyz.scm | 26 ++++++++++++++++++++++++++
1 file changed, 26 insertions(+)

Toggle diff (36 lines)
diff --git a/gnu/packages/haskell-xyz.scm b/gnu/packages/haskell-xyz.scm
index f9da8f573a..a10299d48e 100644
--- a/gnu/packages/haskell-xyz.scm
+++ b/gnu/packages/haskell-xyz.scm
@@ -15439,3 +15439,29 @@ compression ratios.")
(description "This library provides Haskell bindings for checking
currently mounted filesystems.")
(license license:lgpl2.1+)))
+
+(define-public ghc-network-multicast
+ (package
+ (name "ghc-network-multicast")
+ (version "0.3.2")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (string-append
+ "https://hackage.haskell.org/package/network-multicast/network-multicast-"
+ version
+ ".tar.gz"))
+ (sha256
+ (base32
+ "0whvi0pbwjy6dbwfdf9rv1j3yr3lcmfp3q7a8pwq63g537l4l2l3"))))
+ (build-system haskell-build-system)
+ (inputs
+ `(("ghc-network" ,ghc-network)
+ ("ghc-network-bsd" ,ghc-network-bsd)))
+ (home-page
+ "http://hackage.haskell.org/package/network-multicast")
+ (synopsis "Simple multicast library for Haskell")
+ (description
+ "This package provides the Network.Multicast Haskell module for
+sending UDP datagrams over multicast (class D) addresses.")
+ (license license:expat)))
--
2.29.1
Christopher Lemmer Webber wrote 4 years ago
87pn4u853b.fsf@dustycloud.org
From db08ffd29e48961c1192be623b13ff272c87e5c5 Mon Sep 17 00:00:00 2001
From: Christopher Lemmer Webber <cwebber@dustycloud.org>
Date: Tue, 3 Nov 2020 17:04:09 -0500
Subject: [PATCH 3/3] git-annex: Enable pairing and assistant features.

* gnu/packages/haskell-apps.scm (git-annex): Add appropriate
dependencies and adjust flags to enable "assistant" and "pairing"
features.
---
gnu/packages/haskell-apps.scm | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)

Toggle diff (34 lines)
diff --git a/gnu/packages/haskell-apps.scm b/gnu/packages/haskell-apps.scm
index 1de8b040f1..da1bd2128c 100644
--- a/gnu/packages/haskell-apps.scm
+++ b/gnu/packages/haskell-apps.scm
@@ -350,7 +350,7 @@ to @code{cabal repl}).")
(build-system haskell-build-system)
(arguments
`(#:configure-flags
- '("--flags=-Android -Assistant -Pairing -Webapp")
+ '("--flags=-Android -Webapp")
#:phases
(modify-phases %standard-phases
(add-before 'configure 'patch-shell-for-tests
@@ -457,6 +457,7 @@ to @code{cabal repl}).")
("ghc-feed" ,ghc-feed)
("ghc-filepath-bytestring" ,ghc-filepath-bytestring)
("ghc-free" ,ghc-free)
+ ("ghc-hinotify" ,ghc-hinotify)
("ghc-hslogger" ,ghc-hslogger)
("ghc-http-client" ,ghc-http-client)
("ghc-http-conduit" ,ghc-http-conduit)
@@ -466,7 +467,10 @@ to @code{cabal repl}).")
("ghc-memory" ,ghc-memory)
("ghc-monad-control" ,ghc-monad-control)
("ghc-monad-logger" ,ghc-monad-logger)
+ ("ghc-mountpoints" ,ghc-mountpoints)
("ghc-network" ,ghc-network)
+ ("ghc-network-info" ,ghc-network-info)
+ ("ghc-network-multicast" ,ghc-network-multicast)
("ghc-old-locale" ,ghc-old-locale)
("ghc-optparse-applicative" ,ghc-optparse-applicative)
("ghc-persistent" ,ghc-persistent)
--
2.29.1
Christopher Lemmer Webber wrote 4 years ago
That last one had the wrong subject, was for git-annex
87mtzy84nv.fsf@dustycloud.org
Just as the subject says (about the previous one being wrong) :)

I should figure out how to do the automated patchseries thing...
Timothy Sample wrote 4 years ago
Re: [bug#44425] [PATCH 1/3] gnu: Add ghc-mountpoints.
(name . Christopher Lemmer Webber)(address . cwebber@dustycloud.org)(address . 44425@debbugs.gnu.org)
87ft5pzqbf.fsf@ngyro.com
Hi Christopher,

Christopher Lemmer Webber <cwebber@dustycloud.org> writes:

Toggle quote (2 lines)
> Here we go... this actually works now. Working git-annex assistant!

That was fast!

I have two little notes. (1) Packages in “haskell-xyz.scm” are sorted
alphabetically, so the new packages shouldn’t go at the end (that file
is something of an outlier there). (2) The license of
ghc-network-multicast is not really clear. According to “LICENSE” and
“network-multicast.cabal”, it is CC0. However, at the top of the only
source file, “src/Network/Multicast.hsc”, it has “License: MIT License”
as a comment. I don’t think there’s a right answer for us, and I think
your choice of the Expat license is reasonable, but maybe it deserves a
comment?

Otherwise, it all lints, builds, runs fine, and LGTM!


-- Tim
Christopher Lemmer Webber wrote 4 years ago
(name . Timothy Sample)(address . samplet@ngyro.com)(address . 44425@debbugs.gnu.org)
87v9el6rdj.fsf@dustycloud.org
Timothy Sample writes:

Toggle quote (12 lines)
> Hi Christopher,
>
> Christopher Lemmer Webber <cwebber@dustycloud.org> writes:
>
>> Here we go... this actually works now. Working git-annex assistant!
>
> That was fast!
>
> I have two little notes. (1) Packages in “haskell-xyz.scm” are sorted
> alphabetically, so the new packages shouldn’t go at the end (that file
> is something of an outlier there).

Okay, I'll fix that.

Toggle quote (8 lines)
> (2) The license of ghc-network-multicast is not really clear.
> According to “LICENSE” and “network-multicast.cabal”, it is CC0.
> However, at the top of the only source file,
> “src/Network/Multicast.hsc”, it has “License: MIT License” as a
> comment. I don’t think there’s a right answer for us, and I think
> your choice of the Expat license is reasonable, but maybe it deserves
> a comment?

Yes, I observed that also. Both are listed. Functionally I think that
makes it effectively Expat/MIT, though notably CC0 has a nontrivial
"fallback license" associated with it in the cases where public domain
is not recognized in a jurisdiction, so it's probably more both. I'll
leave a comment, I think that'll be sufficient.

Toggle quote (2 lines)
> Otherwise, it all lints, builds, runs fine, and LGTM!

Woo woo! Will make the changes you suggested and then push.

Toggle quote (1 lines)
> -- Tim
Christopher Lemmer Webber wrote 4 years ago
Re: [bug#44425] Add git-annex assistant and dependencies
(address . 44425-done@debbugs.gnu.org)
87pn4t6o6g.fsf@dustycloud.org
Committed in 7401f71aec. Everyone enjoy your fresh new git-annex assistant!
Closed
?
Your comment

This issue is archived.

To comment on this conversation send an email to 44425@debbugs.gnu.org

To respond to this issue using the mumi CLI, first switch to it
mumi current 44425
Then, you may apply the latest patchset in this issue (with sign off)
mumi am -- -s
Or, compose a reply to this issue
mumi compose
Or, send patches to this issue
mumi send-email *.patch
You may also tag this issue. See list of standard tags. For example, to set the confirmed and easy tags
mumi command -t +confirmed -t +easy
Or, remove the moreinfo tag and set the help tag
mumi command -t -moreinfo -t +help