[PATCH 0/8] git-annex

  • Done
  • quality assurance status badge
Details
4 participants
  • Christopher Lemmer Webber
  • Joey Hess
  • Ludovic Courtès
  • Timothy Sample
Owner
unassigned
Submitted by
Timothy Sample
Severity
normal
T
T
Timothy Sample wrote on 24 May 2018 21:19
(address . guix-patches@gnu.org)
878t88vp2n.fsf@ngyro.com
Hello!

This patch series adds a package for “git-annex”. The package is not
quite perfect, but I think it is far enough along to be included.

One of the issues is that it only builds a very minimal version,
disabling most of the optional features (the most important being the
Web app). One reason for this is that we are missing quite a few of
these features’ dependencies. Another reason is that I’m not really
familiar with them, so I wouldn’t know how to test them ;).

The other issue is that I needed to rework the build a fair bit, and I
did it in a bit of a shoddy way. The way that the Haskell build system
sets up the environment means that the “Setup.hs” does not run properly.
It passes the Haskell package DB as a parameter to Cabal, but this
doesn’t affect the code that initializes Cabal. On the other hand,
Cabal disallows the package DB to be passed in by environment variables.
It might be possible to pass it in as a parameter to “runhaskell”, but
I’m not sure. Following that path would require copying large chunks of
the build system into the package, which seems like a poor choice! (As
far as I can tell, this is the first package with this problem. If it
were more common, I would suggest an update to the build system itself.)
In the end, I decided to cheat a little, and factor out the different
parts so that they can be run separately. This means that the ‘man’
pages do not get installed :/. Maybe that could be fixed later, though.


-- Tim
T
T
Timothy Sample wrote on 19 Feb 2018 18:58
[PATCH 1/8] gnu: Add ghc-bloomfilter.
(address . 31582@debbugs.gnu.org)
874liwuaa8.fsf@mrblack.i-did-not-set--mail-host-address--so-tickle-me
* gnu/package/haskell.scm (ghc-bloomfilter): New variable.
---
gnu/packages/haskell.scm | 25 +++++++++++++++++++++++++
1 file changed, 25 insertions(+)

Toggle diff (38 lines)
diff --git a/gnu/packages/haskell.scm b/gnu/packages/haskell.scm
index c8fade065..ccb3adf15 100644
--- a/gnu/packages/haskell.scm
+++ b/gnu/packages/haskell.scm
@@ -3573,6 +3573,31 @@ vector types are supported. Specific instances are provided for unboxed,
boxed and storable vectors.")
(license license:bsd-3)))
+(define-public ghc-bloomfilter
+ (package
+ (name "ghc-bloomfilter")
+ (version "2.0.1.0")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (string-append "https://hackage.haskell.org/package/"
+ "bloomfilter/bloomfilter-" version ".tar.gz"))
+ (sha256
+ (base32
+ "03vrmncg1c10a2wcg5skq30m1yiknn7nwxz2gblyyfaxglshspkc"))))
+ (build-system haskell-build-system)
+ (native-inputs
+ `(("ghc-quickcheck" ,ghc-quickcheck)
+ ("ghc-random" ,ghc-random)
+ ("ghc-test-framework" ,ghc-test-framework)
+ ("ghc-test-framework-quickcheck2" ,ghc-test-framework-quickcheck2)))
+ (home-page "https://github.com/bos/bloomfilter")
+ (synopsis "Pure and impure Bloom filter implementations")
+ (description "This package provides both mutable and immutable Bloom
+filter data types, along with a family of hash functions and an easy-to-use
+interface.")
+ (license license:bsd-3)))
+
(define-public ghc-network
(package
(name "ghc-network")
--
2.17.0
T
T
Timothy Sample wrote on 20 Feb 2018 01:07
[PATCH 2/8] gnu: Add ghc-feed.
(address . 31582@debbugs.gnu.org)
8736yguaa0.fsf@mrblack.i-did-not-set--mail-host-address--so-tickle-me
* gnu/packages/haskell.scm (ghc-feed): New variable.
---
gnu/packages/haskell.scm | 29 +++++++++++++++++++++++++++++
1 file changed, 29 insertions(+)

Toggle diff (42 lines)
diff --git a/gnu/packages/haskell.scm b/gnu/packages/haskell.scm
index ccb3adf15..07a639b76 100644
--- a/gnu/packages/haskell.scm
+++ b/gnu/packages/haskell.scm
@@ -2988,6 +2988,35 @@ online}.")
(description "This package provides a simple XML library for Haskell.")
(license license:bsd-3)))
+(define-public ghc-feed
+ (package
+ (name "ghc-feed")
+ (version "0.3.12.0")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (string-append "https://hackage.haskell.org/package/"
+ "feed/feed-" version ".tar.gz"))
+ (sha256
+ (base32
+ "0hkrsinspg70bbm3hwqdrvivws6zya1hyk0a3awpaz82j4xnlbfc"))))
+ (build-system haskell-build-system)
+ (inputs
+ `(("ghc-old-locale" ,ghc-old-locale)
+ ("ghc-old-time" ,ghc-old-time)
+ ("ghc-time-locale-compat" ,ghc-time-locale-compat)
+ ("ghc-utf8-string" ,ghc-utf8-string)
+ ("ghc-xml" ,ghc-xml)))
+ (native-inputs
+ `(("ghc-hunit" ,ghc-hunit)
+ ("ghc-test-framework" ,ghc-test-framework)
+ ("ghc-test-framework-hunit" ,ghc-test-framework-hunit)))
+ (home-page "https://github.com/bergmark/feed")
+ (synopsis "Haskell package for handling various syndication formats")
+ (description "This Haskell package includes tools for generating and
+consuming feeds in both RSS (Really Simple Syndication) and Atom format.")
+ (license license:bsd-3)))
+
(define-public ghc-exceptions
(package
(name "ghc-exceptions")
--
2.17.0
T
T
Timothy Sample wrote on 20 Feb 2018 01:08
[PATCH 3/8] gnu: Add ghc-ifelse.
(address . 31582@debbugs.gnu.org)
871se0ua9u.fsf@mrblack.i-did-not-set--mail-host-address--so-tickle-me
* gnu/packages/haskell.scm (ghc-ifelse): New variable.
---
gnu/packages/haskell.scm | 21 +++++++++++++++++++++
1 file changed, 21 insertions(+)

Toggle diff (34 lines)
diff --git a/gnu/packages/haskell.scm b/gnu/packages/haskell.scm
index 07a639b76..f4f054895 100644
--- a/gnu/packages/haskell.scm
+++ b/gnu/packages/haskell.scm
@@ -3812,6 +3812,27 @@ with various performance characteristics.")
manipulating monad transformer stacks.")
(license license:bsd-3)))
+(define-public ghc-ifelse
+ (package
+ (name "ghc-ifelse")
+ (version "0.85")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (string-append "https://hackage.haskell.org/package/"
+ "IfElse/IfElse-" version ".tar.gz"))
+ (sha256
+ (base32
+ "1kfx1bwfjczj93a8yqz1n8snqiq5655qgzwv1lrycry8wb1vzlwa"))))
+ (build-system haskell-build-system)
+ (inputs `(("ghc-mtl" ,ghc-mtl)))
+ (home-page "http://hackage.haskell.org/package/IfElse")
+ (synopsis "Monadic control flow with anaphoric variants")
+ (description "This library provides functions for control flow inside of
+monads with anaphoric variants on @code{if} and @code{when} and a C-like
+@code{switch} function.")
+ (license license:bsd-3)))
+
(define-public ghc-monad-control
(package
(name "ghc-monad-control")
--
2.17.0
T
T
Timothy Sample wrote on 20 Feb 2018 06:12
[PATCH 4/8] gnu: Add ghc-esqueleto.
(address . 31582@debbugs.gnu.org)
87zi0osvp6.fsf@mrblack.i-did-not-set--mail-host-address--so-tickle-me
* gnu/packages/haskell.scm (ghc-esqueleto): New variable.
---
gnu/packages/haskell.scm | 38 ++++++++++++++++++++++++++++++++++++++
1 file changed, 38 insertions(+)

Toggle diff (51 lines)
diff --git a/gnu/packages/haskell.scm b/gnu/packages/haskell.scm
index f4f054895..2c0b66396 100644
--- a/gnu/packages/haskell.scm
+++ b/gnu/packages/haskell.scm
@@ -7811,6 +7811,44 @@ converting between Haskell values and JSON.
JSON (JavaScript Object Notation) is a lightweight data-interchange format.")
(license license:bsd-3)))
+(define-public ghc-esqueleto
+ (package
+ (name "ghc-esqueleto")
+ (version "2.5.3")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (string-append "https://hackage.haskell.org/package/"
+ "esqueleto/esqueleto-" version ".tar.gz"))
+ (sha256
+ (base32
+ "10n49rzqmblky7pwjnysalyy6nacmxfms8dqbsdv6hlyzr8pb69x"))))
+ (build-system haskell-build-system)
+ (inputs
+ `(("ghc-blaze-html" ,ghc-blaze-html)
+ ("ghc-conduit" ,ghc-conduit)
+ ("ghc-monad-logger" ,ghc-monad-logger)
+ ("ghc-persistent" ,ghc-persistent)
+ ("ghc-resourcet" ,ghc-resourcet)
+ ("ghc-tagged" ,ghc-tagged)
+ ("ghc-text" ,ghc-text)
+ ("ghc-unordered-containers" ,ghc-unordered-containers)))
+ (native-inputs
+ `(("ghc-hspec" ,ghc-hspec)
+ ("ghc-hunit" ,ghc-hunit)
+ ("ghc-monad-control" ,ghc-monad-control)
+ ("ghc-persistent-sqlite" ,ghc-persistent-sqlite)
+ ("ghc-persistent-template" ,ghc-persistent-template)
+ ("ghc-quickcheck" ,ghc-quickcheck)))
+ (home-page "https://github.com/bitemyapp/esqueleto")
+ (synopsis "Type-safe embedded domain specific language for SQL queries")
+ (description "This library provides a type-safe embedded domain specific
+language (EDSL) for SQL queries that works with SQL backends as provided by
+@code{ghc-persistent}. Its language closely resembles SQL, so you don't have
+to learn new concepts, just new syntax, and it's fairly easy to predict the
+generated SQL and optimize it for your backend.")
+ (license license:bsd-3)))
+
(define-public shellcheck
(package
(name "shellcheck")
--
2.17.0
T
T
Timothy Sample wrote on 20 Feb 2018 06:25
[PATCH 5/8] gnu: Add ghc-safesemaphore.
(address . 31582@debbugs.gnu.org)
87y3g8svoz.fsf@mrblack.i-did-not-set--mail-host-address--so-tickle-me
* gnu/packages/haskell.scm (ghc-safesemaphore): New variable.
---
gnu/packages/haskell.scm | 24 ++++++++++++++++++++++++
1 file changed, 24 insertions(+)

Toggle diff (37 lines)
diff --git a/gnu/packages/haskell.scm b/gnu/packages/haskell.scm
index 2c0b66396..6860c42c3 100644
--- a/gnu/packages/haskell.scm
+++ b/gnu/packages/haskell.scm
@@ -1938,6 +1938,30 @@ case with other forms of concurrent communication, such as locks or
"This package provides a library for parallel programming.")
(license license:bsd-3)))
+(define-public ghc-safesemaphore
+ (package
+ (name "ghc-safesemaphore")
+ (version "0.10.1")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (string-append "https://hackage.haskell.org/package/"
+ "SafeSemaphore/SafeSemaphore-" version ".tar.gz"))
+ (sha256
+ (base32
+ "0rpg9j6fy70i0b9dkrip9d6wim0nac0snp7qzbhykjkqlcvvgr91"))))
+ (build-system haskell-build-system)
+ (inputs
+ `(("ghc-stm" ,ghc-stm)))
+ (native-inputs
+ `(("ghc-hunit" ,ghc-hunit)))
+ (home-page "https://github.com/ChrisKuklewicz/SafeSemaphore")
+ (synopsis "Exception safe semaphores")
+ (description "This library provides exception safe semaphores that can be
+used in place of @code{QSem}, @code{QSemN}, and @code{SampleVar}, all of which
+are not exception safe and can be broken by @code{killThread}.")
+ (license license:bsd-3)))
+
(define-public ghc-text
(package
(name "ghc-text")
--
2.17.0
T
T
Timothy Sample wrote on 20 Feb 2018 08:56
[PATCH 6/8] gnu: ghc-psqueues: Allow building with newer versions of QuickCheck.
(address . 31582@debbugs.gnu.org)
87wovssvoq.fsf@mrblack.i-did-not-set--mail-host-address--so-tickle-me
* gnu/packages/haskell.scm (ghc-psqueues)[arguments]: Add configure
flag to allow newer versions of QuickCheck.
---
gnu/packages/haskell.scm | 2 ++
1 file changed, 2 insertions(+)

Toggle diff (15 lines)
diff --git a/gnu/packages/haskell.scm b/gnu/packages/haskell.scm
index 6860c42c3..962e63dfa 100644
--- a/gnu/packages/haskell.scm
+++ b/gnu/packages/haskell.scm
@@ -7971,6 +7971,8 @@ bytestrings and their hexademical representation.")
(base32
"0n39s1i88j6s7vvsdhpbhcr3gpbwlzabwcc3nbd7nqb4kb4i0sls"))))
(build-system haskell-build-system)
+ (arguments
+ `(#:configure-flags (list "--allow-newer=QuickCheck")))
(inputs
`(("ghc-hashable" ,ghc-hashable)))
(native-inputs
--
2.17.0
T
T
Timothy Sample wrote on 21 Feb 2018 05:13
[PATCH 7/8] gnu: Add ghc-disk-free-space.
(address . 31582@debbugs.gnu.org)
87vabcsvoi.fsf@mrblack.i-did-not-set--mail-host-address--so-tickle-me
* gnu/packages/haskell.scm (ghc-disk-free-space): New variable.
---
gnu/packages/haskell.scm | 20 ++++++++++++++++++++
1 file changed, 20 insertions(+)

Toggle diff (31 lines)
diff --git a/gnu/packages/haskell.scm b/gnu/packages/haskell.scm
index 962e63dfa..3cbb33fa1 100644
--- a/gnu/packages/haskell.scm
+++ b/gnu/packages/haskell.scm
@@ -9655,4 +9655,24 @@ serialization code.")
(home-page "https://hackage.haskell.org/package/bytes")
(license license:bsd-3)))
+(define-public ghc-disk-free-space
+ (package
+ (name "ghc-disk-free-space")
+ (version "0.1.0.1")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (string-append "https://hackage.haskell.org/package/"
+ "disk-free-space/disk-free-space-"
+ version ".tar.gz"))
+ (sha256
+ (base32
+ "07rqj8k1vh3cykq9yidpjxhgh1f7vgmjs6y1nv5kq2217ff4yypi"))))
+ (build-system haskell-build-system)
+ (home-page "https://github.com/redneb/disk-free-space")
+ (synopsis "Retrieve information about disk space usage")
+ (description "A cross-platform library for retrieving information about
+disk space usage.")
+ (license license:bsd-3)))
+
;;; haskell.scm ends here
--
2.17.0
T
T
Timothy Sample wrote on 21 Feb 2018 05:15
[PATCH 8/8] gnu: Add git-annex.
(address . 31582@debbugs.gnu.org)
87tvqwsvnt.fsf@mrblack.i-did-not-set--mail-host-address--so-tickle-me
* gnu/packages/backup.scm (git-annex): New variable.
---
gnu/packages/backup.scm | 134 ++++++++++++++++++++++++++++++++++++++++
1 file changed, 134 insertions(+)

Toggle diff (172 lines)
diff --git a/gnu/packages/backup.scm b/gnu/packages/backup.scm
index a3782e129..1e4c03427 100644
--- a/gnu/packages/backup.scm
+++ b/gnu/packages/backup.scm
@@ -31,6 +31,7 @@
#:use-module (guix download)
#:use-module (guix utils)
#:use-module (guix build-system gnu)
+ #:use-module (guix build-system haskell)
#:use-module (guix build-system python)
#:use-module (gnu packages)
#:use-module (gnu packages acl)
@@ -39,6 +40,7 @@
#:use-module (gnu packages check)
#:use-module (gnu packages compression)
#:use-module (gnu packages crypto)
+ #:use-module (gnu packages curl)
#:use-module (gnu packages databases)
#:use-module (gnu packages dejagnu)
#:use-module (gnu packages ftp)
@@ -46,6 +48,10 @@
#:use-module (gnu packages gnupg)
#:use-module (gnu packages gperf)
#:use-module (gnu packages guile)
+ #:use-module (gnu packages haskell)
+ #:use-module (gnu packages haskell-check)
+ #:use-module (gnu packages haskell-web)
+ #:use-module (gnu packages haskell-crypto)
#:use-module (gnu packages linux)
#:use-module (gnu packages mcrypt)
#:use-module (gnu packages nettle)
@@ -58,6 +64,7 @@
#:use-module (gnu packages rsync)
#:use-module (gnu packages ssh)
#:use-module (gnu packages tls)
+ #:use-module (gnu packages version-control)
#:use-module (gnu packages xml))
(define-public duplicity
@@ -813,3 +820,130 @@ file systems with unattended creation and expiration. A dirvish backup vault
is like a time machine for your data. ")
(license (license:fsf-free "file://COPYING"
"Open Software License 2.0"))))
+
+(define-public git-annex
+ (package
+ (name "git-annex")
+ (version "6.20170818")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (string-append "https://hackage.haskell.org/package/"
+ "git-annex/git-annex-" version ".tar.gz"))
+ (sha256
+ (base32
+ "0ybxixbqvy4rx6mq9s02rh349rbr04hb17z4bfayin0qwa5kzpvx"))))
+ (build-system haskell-build-system)
+ (arguments
+ `(#:configure-flags
+ '("--flags=-Android -Assistant -Pairing -S3 -Webapp -WebDAV")
+ #:phases
+ (modify-phases %standard-phases
+ (add-before 'configure 'patch-shell
+ (lambda _
+ (substitute* "Utility/Shell.hs"
+ (("/bin/sh") (which "sh")))
+ #t))
+ (add-before 'configure 'factor-setup
+ (lambda _
+ ;; Factor out necessary build logic from the provided
+ ;; `Setup.hs' script. The script as-is does not work because
+ ;; it cannot find its dependencies, and there is no obvious way
+ ;; to tell it where to look. Note that we do not preserve the
+ ;; code that installs man pages here.
+ (call-with-output-file "PreConf.hs"
+ (lambda (out)
+ (format out "import qualified Build.Configure as Configure~%")
+ (format out "main = Configure.run Configure.tests~%")))
+ (call-with-output-file "Setup.hs"
+ (lambda (out)
+ (format out "import Distribution.Simple~%")
+ (format out "main = defaultMain~%")))
+ #t))
+ (add-before 'configure 'pre-configure
+ (lambda _
+ (invoke "runhaskell" "PreConf.hs")
+ #t))
+ (replace 'check
+ (lambda _
+ ;; We need to set the path so that Git recognizes
+ ;; `git annex' as a custom command.
+ (setenv "PATH" (string-append (getenv "PATH") ":"
+ (getcwd) "/dist/build/git-annex"))
+ (with-directory-excursion "dist/build/git-annex"
+ (symlink "git-annex" "git-annex-shell"))
+ (invoke "git-annex" "test")
+ #t))
+ (add-after 'install 'install-symlinks
+ (lambda* (#:key outputs #:allow-other-keys)
+ (let* ((out (assoc-ref outputs "out"))
+ (bin (string-append out "/bin")))
+ (symlink (string-append bin "/git-annex")
+ (string-append bin "/git-annex-shell"))
+ (symlink (string-append bin "/git-annex")
+ (string-append bin "/git-remote-tor-annex"))
+ #t))))))
+ (inputs
+ `(("curl" ,curl)
+ ("ghc-aeson" ,ghc-aeson)
+ ("ghc-async" ,ghc-async)
+ ("ghc-bloomfilter" ,ghc-bloomfilter)
+ ("ghc-byteable" ,ghc-byteable)
+ ("ghc-case-insensitive" ,ghc-case-insensitive)
+ ("ghc-crypto-api" ,ghc-crypto-api)
+ ("ghc-cryptonite" ,ghc-cryptonite)
+ ("ghc-data-default" ,ghc-data-default)
+ ("ghc-disk-free-space" ,ghc-disk-free-space)
+ ("ghc-dlist" ,ghc-dlist)
+ ("ghc-edit-distance" ,ghc-edit-distance)
+ ("ghc-esqueleto" ,ghc-esqueleto)
+ ("ghc-exceptions" ,ghc-exceptions)
+ ("ghc-feed" ,ghc-feed)
+ ("ghc-free" ,ghc-free)
+ ("ghc-hslogger" ,ghc-hslogger)
+ ("ghc-http-client" ,ghc-http-client)
+ ("ghc-http-conduit" ,ghc-http-conduit)
+ ("ghc-http-types" ,ghc-http-types)
+ ("ghc-ifelse" ,ghc-ifelse)
+ ("ghc-memory" ,ghc-memory)
+ ("ghc-monad-control" ,ghc-monad-control)
+ ("ghc-monad-logger" ,ghc-monad-logger)
+ ("ghc-mtl" ,ghc-mtl)
+ ("ghc-network" ,ghc-network)
+ ("ghc-old-locale" ,ghc-old-locale)
+ ("ghc-optparse-applicative" ,ghc-optparse-applicative)
+ ("ghc-persistent" ,ghc-persistent)
+ ("ghc-persistent-sqlite" ,ghc-persistent-sqlite)
+ ("ghc-persistent-template" ,ghc-persistent-template)
+ ("ghc-quickcheck" ,ghc-quickcheck)
+ ("ghc-random" ,ghc-random)
+ ("ghc-regex-tdfa" ,ghc-regex-tdfa)
+ ("ghc-resourcet" ,ghc-resourcet)
+ ("ghc-safesemaphore" ,ghc-safesemaphore)
+ ("ghc-sandi" ,ghc-sandi)
+ ("ghc-securemem" ,ghc-securemem)
+ ("ghc-socks" ,ghc-socks)
+ ("ghc-split" ,ghc-split)
+ ("ghc-stm" ,ghc-stm)
+ ("ghc-stm-chans" ,ghc-stm-chans)
+ ("ghc-text" ,ghc-text)
+ ("ghc-unix-compat" ,ghc-unix-compat)
+ ("ghc-unordered-containers" ,ghc-unordered-containers)
+ ("ghc-utf8-string" ,ghc-utf8-string)
+ ("ghc-uuid" ,ghc-uuid)
+ ("git" ,git)
+ ("rsync" ,rsync)))
+ (native-inputs
+ `(("ghc-tasty" ,ghc-tasty)
+ ("ghc-tasty-hunit" ,ghc-tasty-hunit)
+ ("ghc-tasty-quickcheck" ,ghc-tasty-quickcheck)
+ ("ghc-tasty-rerun" ,ghc-tasty-rerun)))
+ (home-page "https://git-annex.branchable.com/")
+ (synopsis "Manage files with Git, without checking in their contents")
+ (description "This package allows managing files with Git, without
+checking the file contents into Git. It can store files in many places,
+such as local hard drives and cloud storage services. It can also be
+used to keep a folder in sync between computers.")
+ ;; The web app is released under the AGPLv3+.
+ (license (list license:gpl3+
+ license:agpl3+))))
--
2.17.0
C
C
Christopher Lemmer Webber wrote on 29 May 2018 06:08
Re: [bug#31582] [PATCH 1/8] gnu: Add ghc-bloomfilter.
(name . Timothy Sample)(address . samplet@ngyro.com)(address . 31582@debbugs.gnu.org)
871sdvt87y.fsf@dustycloud.org
LGTM.

Timothy Sample writes:

Toggle quote (41 lines)
> * gnu/package/haskell.scm (ghc-bloomfilter): New variable.
> ---
> gnu/packages/haskell.scm | 25 +++++++++++++++++++++++++
> 1 file changed, 25 insertions(+)
>
> diff --git a/gnu/packages/haskell.scm b/gnu/packages/haskell.scm
> index c8fade065..ccb3adf15 100644
> --- a/gnu/packages/haskell.scm
> +++ b/gnu/packages/haskell.scm
> @@ -3573,6 +3573,31 @@ vector types are supported. Specific instances are provided for unboxed,
> boxed and storable vectors.")
> (license license:bsd-3)))
>
> +(define-public ghc-bloomfilter
> + (package
> + (name "ghc-bloomfilter")
> + (version "2.0.1.0")
> + (source
> + (origin
> + (method url-fetch)
> + (uri (string-append "https://hackage.haskell.org/package/"
> + "bloomfilter/bloomfilter-" version ".tar.gz"))
> + (sha256
> + (base32
> + "03vrmncg1c10a2wcg5skq30m1yiknn7nwxz2gblyyfaxglshspkc"))))
> + (build-system haskell-build-system)
> + (native-inputs
> + `(("ghc-quickcheck" ,ghc-quickcheck)
> + ("ghc-random" ,ghc-random)
> + ("ghc-test-framework" ,ghc-test-framework)
> + ("ghc-test-framework-quickcheck2" ,ghc-test-framework-quickcheck2)))
> + (home-page "https://github.com/bos/bloomfilter")
> + (synopsis "Pure and impure Bloom filter implementations")
> + (description "This package provides both mutable and immutable Bloom
> +filter data types, along with a family of hash functions and an easy-to-use
> +interface.")
> + (license license:bsd-3)))
> +
> (define-public ghc-network
> (package
> (name "ghc-network")
C
C
Christopher Lemmer Webber wrote on 29 May 2018 06:11
Re: [bug#31582] [PATCH 0/8] git-annex
(name . Timothy Sample)(address . samplet@ngyro.com)(address . 31582@debbugs.gnu.org)
87zi0jrtgy.fsf@dustycloud.org
Timothy Sample writes:

Toggle quote (29 lines)
> Hello!
>
> This patch series adds a package for “git-annex”. The package is not
> quite perfect, but I think it is far enough along to be included.
>
> One of the issues is that it only builds a very minimal version,
> disabling most of the optional features (the most important being the
> Web app). One reason for this is that we are missing quite a few of
> these features’ dependencies. Another reason is that I’m not really
> familiar with them, so I wouldn’t know how to test them ;).
>
> The other issue is that I needed to rework the build a fair bit, and I
> did it in a bit of a shoddy way. The way that the Haskell build system
> sets up the environment means that the “Setup.hs” does not run properly.
> It passes the Haskell package DB as a parameter to Cabal, but this
> doesn’t affect the code that initializes Cabal. On the other hand,
> Cabal disallows the package DB to be passed in by environment variables.
> It might be possible to pass it in as a parameter to “runhaskell”, but
> I’m not sure. Following that path would require copying large chunks of
> the build system into the package, which seems like a poor choice! (As
> far as I can tell, this is the first package with this problem. If it
> were more common, I would suggest an update to the build system itself.)
> In the end, I decided to cheat a little, and factor out the different
> parts so that they can be run separately. This means that the ‘man’
> pages do not get installed :/. Maybe that could be fixed later, though.
>
>
> -- Tim

I was going to respond to "LGTM" on all the patches, but they all look
good to me. The concerns you raised in this post seem like things we
should address, but which need not block getting an initial version of
git-annex into Guix.

I'm building it now, will report back when I get a chance to test it.
C
C
Christopher Lemmer Webber wrote on 29 May 2018 06:13
Re: [bug#31582] [PATCH 8/8] gnu: Add git-annex.
(name . Timothy Sample)(address . samplet@ngyro.com)(address . 31582@debbugs.gnu.org)
87y3g3rte8.fsf@dustycloud.org
Note that you didn't add a copyright header to this file (or the
haskell.scm one either). I can do that though if everything builds
before I push it.

Timothy Sample writes:

Toggle quote (175 lines)
> * gnu/packages/backup.scm (git-annex): New variable.
> ---
> gnu/packages/backup.scm | 134 ++++++++++++++++++++++++++++++++++++++++
> 1 file changed, 134 insertions(+)
>
> diff --git a/gnu/packages/backup.scm b/gnu/packages/backup.scm
> index a3782e129..1e4c03427 100644
> --- a/gnu/packages/backup.scm
> +++ b/gnu/packages/backup.scm
> @@ -31,6 +31,7 @@
> #:use-module (guix download)
> #:use-module (guix utils)
> #:use-module (guix build-system gnu)
> + #:use-module (guix build-system haskell)
> #:use-module (guix build-system python)
> #:use-module (gnu packages)
> #:use-module (gnu packages acl)
> @@ -39,6 +40,7 @@
> #:use-module (gnu packages check)
> #:use-module (gnu packages compression)
> #:use-module (gnu packages crypto)
> + #:use-module (gnu packages curl)
> #:use-module (gnu packages databases)
> #:use-module (gnu packages dejagnu)
> #:use-module (gnu packages ftp)
> @@ -46,6 +48,10 @@
> #:use-module (gnu packages gnupg)
> #:use-module (gnu packages gperf)
> #:use-module (gnu packages guile)
> + #:use-module (gnu packages haskell)
> + #:use-module (gnu packages haskell-check)
> + #:use-module (gnu packages haskell-web)
> + #:use-module (gnu packages haskell-crypto)
> #:use-module (gnu packages linux)
> #:use-module (gnu packages mcrypt)
> #:use-module (gnu packages nettle)
> @@ -58,6 +64,7 @@
> #:use-module (gnu packages rsync)
> #:use-module (gnu packages ssh)
> #:use-module (gnu packages tls)
> + #:use-module (gnu packages version-control)
> #:use-module (gnu packages xml))
>
> (define-public duplicity
> @@ -813,3 +820,130 @@ file systems with unattended creation and expiration. A dirvish backup vault
> is like a time machine for your data. ")
> (license (license:fsf-free "file://COPYING"
> "Open Software License 2.0"))))
> +
> +(define-public git-annex
> + (package
> + (name "git-annex")
> + (version "6.20170818")
> + (source
> + (origin
> + (method url-fetch)
> + (uri (string-append "https://hackage.haskell.org/package/"
> + "git-annex/git-annex-" version ".tar.gz"))
> + (sha256
> + (base32
> + "0ybxixbqvy4rx6mq9s02rh349rbr04hb17z4bfayin0qwa5kzpvx"))))
> + (build-system haskell-build-system)
> + (arguments
> + `(#:configure-flags
> + '("--flags=-Android -Assistant -Pairing -S3 -Webapp -WebDAV")
> + #:phases
> + (modify-phases %standard-phases
> + (add-before 'configure 'patch-shell
> + (lambda _
> + (substitute* "Utility/Shell.hs"
> + (("/bin/sh") (which "sh")))
> + #t))
> + (add-before 'configure 'factor-setup
> + (lambda _
> + ;; Factor out necessary build logic from the provided
> + ;; `Setup.hs' script. The script as-is does not work because
> + ;; it cannot find its dependencies, and there is no obvious way
> + ;; to tell it where to look. Note that we do not preserve the
> + ;; code that installs man pages here.
> + (call-with-output-file "PreConf.hs"
> + (lambda (out)
> + (format out "import qualified Build.Configure as Configure~%")
> + (format out "main = Configure.run Configure.tests~%")))
> + (call-with-output-file "Setup.hs"
> + (lambda (out)
> + (format out "import Distribution.Simple~%")
> + (format out "main = defaultMain~%")))
> + #t))
> + (add-before 'configure 'pre-configure
> + (lambda _
> + (invoke "runhaskell" "PreConf.hs")
> + #t))
> + (replace 'check
> + (lambda _
> + ;; We need to set the path so that Git recognizes
> + ;; `git annex' as a custom command.
> + (setenv "PATH" (string-append (getenv "PATH") ":"
> + (getcwd) "/dist/build/git-annex"))
> + (with-directory-excursion "dist/build/git-annex"
> + (symlink "git-annex" "git-annex-shell"))
> + (invoke "git-annex" "test")
> + #t))
> + (add-after 'install 'install-symlinks
> + (lambda* (#:key outputs #:allow-other-keys)
> + (let* ((out (assoc-ref outputs "out"))
> + (bin (string-append out "/bin")))
> + (symlink (string-append bin "/git-annex")
> + (string-append bin "/git-annex-shell"))
> + (symlink (string-append bin "/git-annex")
> + (string-append bin "/git-remote-tor-annex"))
> + #t))))))
> + (inputs
> + `(("curl" ,curl)
> + ("ghc-aeson" ,ghc-aeson)
> + ("ghc-async" ,ghc-async)
> + ("ghc-bloomfilter" ,ghc-bloomfilter)
> + ("ghc-byteable" ,ghc-byteable)
> + ("ghc-case-insensitive" ,ghc-case-insensitive)
> + ("ghc-crypto-api" ,ghc-crypto-api)
> + ("ghc-cryptonite" ,ghc-cryptonite)
> + ("ghc-data-default" ,ghc-data-default)
> + ("ghc-disk-free-space" ,ghc-disk-free-space)
> + ("ghc-dlist" ,ghc-dlist)
> + ("ghc-edit-distance" ,ghc-edit-distance)
> + ("ghc-esqueleto" ,ghc-esqueleto)
> + ("ghc-exceptions" ,ghc-exceptions)
> + ("ghc-feed" ,ghc-feed)
> + ("ghc-free" ,ghc-free)
> + ("ghc-hslogger" ,ghc-hslogger)
> + ("ghc-http-client" ,ghc-http-client)
> + ("ghc-http-conduit" ,ghc-http-conduit)
> + ("ghc-http-types" ,ghc-http-types)
> + ("ghc-ifelse" ,ghc-ifelse)
> + ("ghc-memory" ,ghc-memory)
> + ("ghc-monad-control" ,ghc-monad-control)
> + ("ghc-monad-logger" ,ghc-monad-logger)
> + ("ghc-mtl" ,ghc-mtl)
> + ("ghc-network" ,ghc-network)
> + ("ghc-old-locale" ,ghc-old-locale)
> + ("ghc-optparse-applicative" ,ghc-optparse-applicative)
> + ("ghc-persistent" ,ghc-persistent)
> + ("ghc-persistent-sqlite" ,ghc-persistent-sqlite)
> + ("ghc-persistent-template" ,ghc-persistent-template)
> + ("ghc-quickcheck" ,ghc-quickcheck)
> + ("ghc-random" ,ghc-random)
> + ("ghc-regex-tdfa" ,ghc-regex-tdfa)
> + ("ghc-resourcet" ,ghc-resourcet)
> + ("ghc-safesemaphore" ,ghc-safesemaphore)
> + ("ghc-sandi" ,ghc-sandi)
> + ("ghc-securemem" ,ghc-securemem)
> + ("ghc-socks" ,ghc-socks)
> + ("ghc-split" ,ghc-split)
> + ("ghc-stm" ,ghc-stm)
> + ("ghc-stm-chans" ,ghc-stm-chans)
> + ("ghc-text" ,ghc-text)
> + ("ghc-unix-compat" ,ghc-unix-compat)
> + ("ghc-unordered-containers" ,ghc-unordered-containers)
> + ("ghc-utf8-string" ,ghc-utf8-string)
> + ("ghc-uuid" ,ghc-uuid)
> + ("git" ,git)
> + ("rsync" ,rsync)))
> + (native-inputs
> + `(("ghc-tasty" ,ghc-tasty)
> + ("ghc-tasty-hunit" ,ghc-tasty-hunit)
> + ("ghc-tasty-quickcheck" ,ghc-tasty-quickcheck)
> + ("ghc-tasty-rerun" ,ghc-tasty-rerun)))
> + (home-page "https://git-annex.branchable.com/")
> + (synopsis "Manage files with Git, without checking in their contents")
> + (description "This package allows managing files with Git, without
> +checking the file contents into Git. It can store files in many places,
> +such as local hard drives and cloud storage services. It can also be
> +used to keep a folder in sync between computers.")
> + ;; The web app is released under the AGPLv3+.
> + (license (list license:gpl3+
> + license:agpl3+))))
C
C
Christopher Lemmer Webber wrote on 29 May 2018 15:45
(name . Timothy Sample)(address . samplet@ngyro.com)(address . 31582@debbugs.gnu.org)
87vab6shhr.fsf@dustycloud.org
I tested this morning. It seems to work well.

My one comment before I push this is a minor one... should this go in
backup.scm or should it be in version-control.scm? Not everyone is
using it in ways I would consider to be "backups" any more than other
VCS things are... I'm not.

Christopher Lemmer Webber writes:

Toggle quote (181 lines)
> Note that you didn't add a copyright header to this file (or the
> haskell.scm one either). I can do that though if everything builds
> before I push it.
>
> Timothy Sample writes:
>
>> * gnu/packages/backup.scm (git-annex): New variable.
>> ---
>> gnu/packages/backup.scm | 134 ++++++++++++++++++++++++++++++++++++++++
>> 1 file changed, 134 insertions(+)
>>
>> diff --git a/gnu/packages/backup.scm b/gnu/packages/backup.scm
>> index a3782e129..1e4c03427 100644
>> --- a/gnu/packages/backup.scm
>> +++ b/gnu/packages/backup.scm
>> @@ -31,6 +31,7 @@
>> #:use-module (guix download)
>> #:use-module (guix utils)
>> #:use-module (guix build-system gnu)
>> + #:use-module (guix build-system haskell)
>> #:use-module (guix build-system python)
>> #:use-module (gnu packages)
>> #:use-module (gnu packages acl)
>> @@ -39,6 +40,7 @@
>> #:use-module (gnu packages check)
>> #:use-module (gnu packages compression)
>> #:use-module (gnu packages crypto)
>> + #:use-module (gnu packages curl)
>> #:use-module (gnu packages databases)
>> #:use-module (gnu packages dejagnu)
>> #:use-module (gnu packages ftp)
>> @@ -46,6 +48,10 @@
>> #:use-module (gnu packages gnupg)
>> #:use-module (gnu packages gperf)
>> #:use-module (gnu packages guile)
>> + #:use-module (gnu packages haskell)
>> + #:use-module (gnu packages haskell-check)
>> + #:use-module (gnu packages haskell-web)
>> + #:use-module (gnu packages haskell-crypto)
>> #:use-module (gnu packages linux)
>> #:use-module (gnu packages mcrypt)
>> #:use-module (gnu packages nettle)
>> @@ -58,6 +64,7 @@
>> #:use-module (gnu packages rsync)
>> #:use-module (gnu packages ssh)
>> #:use-module (gnu packages tls)
>> + #:use-module (gnu packages version-control)
>> #:use-module (gnu packages xml))
>>
>> (define-public duplicity
>> @@ -813,3 +820,130 @@ file systems with unattended creation and expiration. A dirvish backup vault
>> is like a time machine for your data. ")
>> (license (license:fsf-free "file://COPYING"
>> "Open Software License 2.0"))))
>> +
>> +(define-public git-annex
>> + (package
>> + (name "git-annex")
>> + (version "6.20170818")
>> + (source
>> + (origin
>> + (method url-fetch)
>> + (uri (string-append "https://hackage.haskell.org/package/"
>> + "git-annex/git-annex-" version ".tar.gz"))
>> + (sha256
>> + (base32
>> + "0ybxixbqvy4rx6mq9s02rh349rbr04hb17z4bfayin0qwa5kzpvx"))))
>> + (build-system haskell-build-system)
>> + (arguments
>> + `(#:configure-flags
>> + '("--flags=-Android -Assistant -Pairing -S3 -Webapp -WebDAV")
>> + #:phases
>> + (modify-phases %standard-phases
>> + (add-before 'configure 'patch-shell
>> + (lambda _
>> + (substitute* "Utility/Shell.hs"
>> + (("/bin/sh") (which "sh")))
>> + #t))
>> + (add-before 'configure 'factor-setup
>> + (lambda _
>> + ;; Factor out necessary build logic from the provided
>> + ;; `Setup.hs' script. The script as-is does not work because
>> + ;; it cannot find its dependencies, and there is no obvious way
>> + ;; to tell it where to look. Note that we do not preserve the
>> + ;; code that installs man pages here.
>> + (call-with-output-file "PreConf.hs"
>> + (lambda (out)
>> + (format out "import qualified Build.Configure as Configure~%")
>> + (format out "main = Configure.run Configure.tests~%")))
>> + (call-with-output-file "Setup.hs"
>> + (lambda (out)
>> + (format out "import Distribution.Simple~%")
>> + (format out "main = defaultMain~%")))
>> + #t))
>> + (add-before 'configure 'pre-configure
>> + (lambda _
>> + (invoke "runhaskell" "PreConf.hs")
>> + #t))
>> + (replace 'check
>> + (lambda _
>> + ;; We need to set the path so that Git recognizes
>> + ;; `git annex' as a custom command.
>> + (setenv "PATH" (string-append (getenv "PATH") ":"
>> + (getcwd) "/dist/build/git-annex"))
>> + (with-directory-excursion "dist/build/git-annex"
>> + (symlink "git-annex" "git-annex-shell"))
>> + (invoke "git-annex" "test")
>> + #t))
>> + (add-after 'install 'install-symlinks
>> + (lambda* (#:key outputs #:allow-other-keys)
>> + (let* ((out (assoc-ref outputs "out"))
>> + (bin (string-append out "/bin")))
>> + (symlink (string-append bin "/git-annex")
>> + (string-append bin "/git-annex-shell"))
>> + (symlink (string-append bin "/git-annex")
>> + (string-append bin "/git-remote-tor-annex"))
>> + #t))))))
>> + (inputs
>> + `(("curl" ,curl)
>> + ("ghc-aeson" ,ghc-aeson)
>> + ("ghc-async" ,ghc-async)
>> + ("ghc-bloomfilter" ,ghc-bloomfilter)
>> + ("ghc-byteable" ,ghc-byteable)
>> + ("ghc-case-insensitive" ,ghc-case-insensitive)
>> + ("ghc-crypto-api" ,ghc-crypto-api)
>> + ("ghc-cryptonite" ,ghc-cryptonite)
>> + ("ghc-data-default" ,ghc-data-default)
>> + ("ghc-disk-free-space" ,ghc-disk-free-space)
>> + ("ghc-dlist" ,ghc-dlist)
>> + ("ghc-edit-distance" ,ghc-edit-distance)
>> + ("ghc-esqueleto" ,ghc-esqueleto)
>> + ("ghc-exceptions" ,ghc-exceptions)
>> + ("ghc-feed" ,ghc-feed)
>> + ("ghc-free" ,ghc-free)
>> + ("ghc-hslogger" ,ghc-hslogger)
>> + ("ghc-http-client" ,ghc-http-client)
>> + ("ghc-http-conduit" ,ghc-http-conduit)
>> + ("ghc-http-types" ,ghc-http-types)
>> + ("ghc-ifelse" ,ghc-ifelse)
>> + ("ghc-memory" ,ghc-memory)
>> + ("ghc-monad-control" ,ghc-monad-control)
>> + ("ghc-monad-logger" ,ghc-monad-logger)
>> + ("ghc-mtl" ,ghc-mtl)
>> + ("ghc-network" ,ghc-network)
>> + ("ghc-old-locale" ,ghc-old-locale)
>> + ("ghc-optparse-applicative" ,ghc-optparse-applicative)
>> + ("ghc-persistent" ,ghc-persistent)
>> + ("ghc-persistent-sqlite" ,ghc-persistent-sqlite)
>> + ("ghc-persistent-template" ,ghc-persistent-template)
>> + ("ghc-quickcheck" ,ghc-quickcheck)
>> + ("ghc-random" ,ghc-random)
>> + ("ghc-regex-tdfa" ,ghc-regex-tdfa)
>> + ("ghc-resourcet" ,ghc-resourcet)
>> + ("ghc-safesemaphore" ,ghc-safesemaphore)
>> + ("ghc-sandi" ,ghc-sandi)
>> + ("ghc-securemem" ,ghc-securemem)
>> + ("ghc-socks" ,ghc-socks)
>> + ("ghc-split" ,ghc-split)
>> + ("ghc-stm" ,ghc-stm)
>> + ("ghc-stm-chans" ,ghc-stm-chans)
>> + ("ghc-text" ,ghc-text)
>> + ("ghc-unix-compat" ,ghc-unix-compat)
>> + ("ghc-unordered-containers" ,ghc-unordered-containers)
>> + ("ghc-utf8-string" ,ghc-utf8-string)
>> + ("ghc-uuid" ,ghc-uuid)
>> + ("git" ,git)
>> + ("rsync" ,rsync)))
>> + (native-inputs
>> + `(("ghc-tasty" ,ghc-tasty)
>> + ("ghc-tasty-hunit" ,ghc-tasty-hunit)
>> + ("ghc-tasty-quickcheck" ,ghc-tasty-quickcheck)
>> + ("ghc-tasty-rerun" ,ghc-tasty-rerun)))
>> + (home-page "https://git-annex.branchable.com/")
>> + (synopsis "Manage files with Git, without checking in their contents")
>> + (description "This package allows managing files with Git, without
>> +checking the file contents into Git. It can store files in many places,
>> +such as local hard drives and cloud storage services. It can also be
>> +used to keep a folder in sync between computers.")
>> + ;; The web app is released under the AGPLv3+.
>> + (license (list license:gpl3+
>> + license:agpl3+))))
T
T
Timothy Sample wrote on 29 May 2018 16:55
(name . Christopher Lemmer Webber)(address . cwebber@dustycloud.org)(address . 31582@debbugs.gnu.org)
87muwi8qa4.fsf@ngyro.com
Christopher Lemmer Webber <cwebber@dustycloud.org> writes:

Toggle quote (2 lines)
> I tested this morning. It seems to work well.

Thanks for the review and doing the tests!

Toggle quote (5 lines)
> My one comment before I push this is a minor one... should this go in
> backup.scm or should it be in version-control.scm? Not everyone is
> using it in ways I would consider to be "backups" any more than other
> VCS things are... I'm not.

I hesitated quite a bit here. I agree that “version-control.scm” is the
right place. The website specifically says “git-annex is not a backup
system”. I must have been suffering from categorizing-fatigue when I
made that choice :).

Toggle quote (6 lines)
> Christopher Lemmer Webber writes:
>
>> Note that you didn't add a copyright header to this file (or the
>> haskell.scm one either). I can do that though if everything builds
>> before I push it.

Whoops! Sorry. I will update the patches in a few hours unless you
have your finger on the button and do it first.

Thanks again!
T
T
Timothy Sample wrote on 19 Feb 2018 18:58
[PATCH v2 1/8] gnu: Add ghc-bloomfilter.
(address . 31582@debbugs.gnu.org)(name . Christopher Lemmer Webber)(address . cwebber@dustycloud.org)
87d0xe2u6m.fsf@ngyro.com
* gnu/package/haskell.scm (ghc-bloomfilter): New variable.
---
gnu/packages/haskell.scm | 26 ++++++++++++++++++++++++++
1 file changed, 26 insertions(+)

Toggle diff (46 lines)
diff --git a/gnu/packages/haskell.scm b/gnu/packages/haskell.scm
index c8fade065..ece879778 100644
--- a/gnu/packages/haskell.scm
+++ b/gnu/packages/haskell.scm
@@ -14,6 +14,7 @@
;;; Copyright © 2017 rsiddharth <s@ricketyspace.net>
;;; Copyright © 2017, 2018 Tobias Geerinckx-Rice <me@tobias.gr>
;;; Copyright © 2018 Tonton <tonton@riseup.net>
+;;; Copyright © 2018 Timothy Sample <samplet@ngyro.com>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -3573,6 +3574,31 @@ vector types are supported. Specific instances are provided for unboxed,
boxed and storable vectors.")
(license license:bsd-3)))
+(define-public ghc-bloomfilter
+ (package
+ (name "ghc-bloomfilter")
+ (version "2.0.1.0")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (string-append "https://hackage.haskell.org/package/"
+ "bloomfilter/bloomfilter-" version ".tar.gz"))
+ (sha256
+ (base32
+ "03vrmncg1c10a2wcg5skq30m1yiknn7nwxz2gblyyfaxglshspkc"))))
+ (build-system haskell-build-system)
+ (native-inputs
+ `(("ghc-quickcheck" ,ghc-quickcheck)
+ ("ghc-random" ,ghc-random)
+ ("ghc-test-framework" ,ghc-test-framework)
+ ("ghc-test-framework-quickcheck2" ,ghc-test-framework-quickcheck2)))
+ (home-page "https://github.com/bos/bloomfilter")
+ (synopsis "Pure and impure Bloom filter implementations")
+ (description "This package provides both mutable and immutable Bloom
+filter data types, along with a family of hash functions and an easy-to-use
+interface.")
+ (license license:bsd-3)))
+
(define-public ghc-network
(package
(name "ghc-network")
--
2.17.0
T
T
Timothy Sample wrote on 29 May 2018 18:07
[PATCH v2 8/8] gnu: Add git-annex.
(address . 31582@debbugs.gnu.org)(name . Christopher Lemmer Webber)(address . cwebber@dustycloud.org)
878t822u57.fsf@ngyro.com
* gnu/packages/version-control.scm (git-annex): New variable.
---
gnu/packages/version-control.scm | 129 +++++++++++++++++++++++++++++++
1 file changed, 129 insertions(+)

Toggle diff (153 lines)
diff --git a/gnu/packages/version-control.scm b/gnu/packages/version-control.scm
index 603e8a46d..90e1875b9 100644
--- a/gnu/packages/version-control.scm
+++ b/gnu/packages/version-control.scm
@@ -20,6 +20,7 @@
;;; Copyright © 2017 Oleg Pykhalov <go.wigust@gmail.com>
;;; Copyright © 2018 Sou Bunnbu <iyzsong@member.fsf.org>
;;; Copyright © 2018 Christopher Baines <mail@cbaines.net>
+;;; Copyright © 2018 Timothy Sample <samplet@ngyro.com>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -84,6 +85,7 @@
#:use-module (gnu packages python)
#:use-module (gnu packages python-web)
#:use-module (gnu packages readline)
+ #:use-module (gnu packages rsync)
#:use-module (gnu packages databases)
#:use-module (gnu packages admin)
#:use-module (gnu packages xml)
@@ -1995,3 +1997,130 @@ venerable RCS, hence the anagrammatic acronym. The design is tuned for use
cases like all those little scripts in your @file{~/bin} directory, or a
directory full of HOWTOs.")
(license license:bsd-2)))
+
+(define-public git-annex
+ (package
+ (name "git-annex")
+ (version "6.20170818")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (string-append "https://hackage.haskell.org/package/"
+ "git-annex/git-annex-" version ".tar.gz"))
+ (sha256
+ (base32
+ "0ybxixbqvy4rx6mq9s02rh349rbr04hb17z4bfayin0qwa5kzpvx"))))
+ (build-system haskell-build-system)
+ (arguments
+ `(#:configure-flags
+ '("--flags=-Android -Assistant -Pairing -S3 -Webapp -WebDAV")
+ #:phases
+ (modify-phases %standard-phases
+ (add-before 'configure 'patch-shell
+ (lambda _
+ (substitute* "Utility/Shell.hs"
+ (("/bin/sh") (which "sh")))
+ #t))
+ (add-before 'configure 'factor-setup
+ (lambda _
+ ;; Factor out necessary build logic from the provided
+ ;; `Setup.hs' script. The script as-is does not work because
+ ;; it cannot find its dependencies, and there is no obvious way
+ ;; to tell it where to look. Note that we do not preserve the
+ ;; code that installs man pages here.
+ (call-with-output-file "PreConf.hs"
+ (lambda (out)
+ (format out "import qualified Build.Configure as Configure~%")
+ (format out "main = Configure.run Configure.tests~%")))
+ (call-with-output-file "Setup.hs"
+ (lambda (out)
+ (format out "import Distribution.Simple~%")
+ (format out "main = defaultMain~%")))
+ #t))
+ (add-before 'configure 'pre-configure
+ (lambda _
+ (invoke "runhaskell" "PreConf.hs")
+ #t))
+ (replace 'check
+ (lambda _
+ ;; We need to set the path so that Git recognizes
+ ;; `git annex' as a custom command.
+ (setenv "PATH" (string-append (getenv "PATH") ":"
+ (getcwd) "/dist/build/git-annex"))
+ (with-directory-excursion "dist/build/git-annex"
+ (symlink "git-annex" "git-annex-shell"))
+ (invoke "git-annex" "test")
+ #t))
+ (add-after 'install 'install-symlinks
+ (lambda* (#:key outputs #:allow-other-keys)
+ (let* ((out (assoc-ref outputs "out"))
+ (bin (string-append out "/bin")))
+ (symlink (string-append bin "/git-annex")
+ (string-append bin "/git-annex-shell"))
+ (symlink (string-append bin "/git-annex")
+ (string-append bin "/git-remote-tor-annex"))
+ #t))))))
+ (inputs
+ `(("curl" ,curl)
+ ("ghc-aeson" ,ghc-aeson)
+ ("ghc-async" ,ghc-async)
+ ("ghc-bloomfilter" ,ghc-bloomfilter)
+ ("ghc-byteable" ,ghc-byteable)
+ ("ghc-case-insensitive" ,ghc-case-insensitive)
+ ("ghc-crypto-api" ,ghc-crypto-api)
+ ("ghc-cryptonite" ,ghc-cryptonite)
+ ("ghc-data-default" ,ghc-data-default)
+ ("ghc-disk-free-space" ,ghc-disk-free-space)
+ ("ghc-dlist" ,ghc-dlist)
+ ("ghc-edit-distance" ,ghc-edit-distance)
+ ("ghc-esqueleto" ,ghc-esqueleto)
+ ("ghc-exceptions" ,ghc-exceptions)
+ ("ghc-feed" ,ghc-feed)
+ ("ghc-free" ,ghc-free)
+ ("ghc-hslogger" ,ghc-hslogger)
+ ("ghc-http-client" ,ghc-http-client)
+ ("ghc-http-conduit" ,ghc-http-conduit)
+ ("ghc-http-types" ,ghc-http-types)
+ ("ghc-ifelse" ,ghc-ifelse)
+ ("ghc-memory" ,ghc-memory)
+ ("ghc-monad-control" ,ghc-monad-control)
+ ("ghc-monad-logger" ,ghc-monad-logger)
+ ("ghc-mtl" ,ghc-mtl)
+ ("ghc-network" ,ghc-network)
+ ("ghc-old-locale" ,ghc-old-locale)
+ ("ghc-optparse-applicative" ,ghc-optparse-applicative)
+ ("ghc-persistent" ,ghc-persistent)
+ ("ghc-persistent-sqlite" ,ghc-persistent-sqlite)
+ ("ghc-persistent-template" ,ghc-persistent-template)
+ ("ghc-quickcheck" ,ghc-quickcheck)
+ ("ghc-random" ,ghc-random)
+ ("ghc-regex-tdfa" ,ghc-regex-tdfa)
+ ("ghc-resourcet" ,ghc-resourcet)
+ ("ghc-safesemaphore" ,ghc-safesemaphore)
+ ("ghc-sandi" ,ghc-sandi)
+ ("ghc-securemem" ,ghc-securemem)
+ ("ghc-socks" ,ghc-socks)
+ ("ghc-split" ,ghc-split)
+ ("ghc-stm" ,ghc-stm)
+ ("ghc-stm-chans" ,ghc-stm-chans)
+ ("ghc-text" ,ghc-text)
+ ("ghc-unix-compat" ,ghc-unix-compat)
+ ("ghc-unordered-containers" ,ghc-unordered-containers)
+ ("ghc-utf8-string" ,ghc-utf8-string)
+ ("ghc-uuid" ,ghc-uuid)
+ ("git" ,git)
+ ("rsync" ,rsync)))
+ (native-inputs
+ `(("ghc-tasty" ,ghc-tasty)
+ ("ghc-tasty-hunit" ,ghc-tasty-hunit)
+ ("ghc-tasty-quickcheck" ,ghc-tasty-quickcheck)
+ ("ghc-tasty-rerun" ,ghc-tasty-rerun)))
+ (home-page "https://git-annex.branchable.com/")
+ (synopsis "Manage files with Git, without checking in their contents")
+ (description "This package allows managing files with Git, without
+checking the file contents into Git. It can store files in many places,
+such as local hard drives and cloud storage services. It can also be
+used to keep a folder in sync between computers.")
+ ;; The web app is released under the AGPLv3+.
+ (license (list license:gpl3+
+ license:agpl3+))))
--
2.17.0
L
L
Ludovic Courtès wrote on 1 Jun 2018 10:36
(name . Timothy Sample)(address . samplet@ngyro.com)
87r2lqc38f.fsf@gnu.org
Hello Timothy & Chris,

Since Chris said it’s OK and it builds fine for me, I went ahead and
committed the whole series.

Thank you!

Ludo’.
Closed
J
J
Joey Hess wrote on 1 Jun 2018 19:26
git-annex make install
(name . Timothy Sample)(address . samplet@ngyro.com)(address . 31582@debbugs.gnu.org)
20180601172642.GA10767@kitenet.net
Thanks for your work on this package, I'm excited to see it.

You could avoid most of the problems with Setup.hs by using git-annex's
Makefile. That has targets to build the man pages and install
everything. The equivilant code in Setup.hs is really only there to
minimally support people installing with haskell tooling, but the
Makefile is generally preferable for distribution use.

Also, I'd encourage you to enable S3 and WebDAV in the build, since
those are often used, and you're not testing all the other storage
backends that are already supported in your build; nor should you need
to. `git-annex testremote` is there so users can test this stuff in
their own environments.

--
see shy jo
-----BEGIN PGP SIGNATURE-----

iQIzBAABCgAdFiEEKKUAw1IH6rcvbA8l2xLbD/BfjzgFAlsRgdEACgkQ2xLbD/Bf
jziE0w//daz78eQVoO6W5NxV2+M75jLDoU3m2sSJCgcsnlHrGh1J7EvcT08JHIX2
Fgvvds2omD8kZ450TBlqJ+YTH9ACrXrKWRMz1te/WaU8ls3aUEAGXRmxTYcGO6xJ
0J5nPPlwLmomgtJ9tKD+ROX2/mIFliHYRqBOyFKNAK118oWjRqLzoV9MfZkLg6Jz
jY9shzTD4LoM8KaahPZCzt72RRtc3lRAhvWBnReNfIfjYaME3sH1TXfPdVCEJgc+
DT3fq7FeEh9AXoZ/2loMz6mojGEIDgXl9hOpTwWsC9ZEhwCMK5Dr8o63tcOr5STg
xML5vgGKSYjgjGmJz5xvHrfbonVn6OKN9KlQDWyEbVJqf94ZOx+oC9s3BwFKZ+Rg
G//HQ7eTMvXQkoiJ99b1K1Oyzp8hN73K0NeR0EKLs0BK+fxTliuQcjBkpeo7gwWS
hZz63nlHiMVrZIkWXtZKP61OwF+bRfK4RVOsYG9BX9dS53buV60H6npj8h4KYT6j
iJElm8n9oX6kwDE8BW1+dA2ORURUZt2/xzp2eRNpMeYrk24wh7fGiV6ZusB9x2Fg
dpx4r6Wx5bUhSsYe4MrEKE+T51Wp0jetbdZSl2kqEe6nDmEqomz6WeSrBeu7TaKY
qOp8jbBGyWSBWXSYOfqNAn1bcjy3fFMWEsR/2qVk9b9Wx4D2Mc0=
=jze8
-----END PGP SIGNATURE-----


T
T
Timothy Sample wrote on 1 Jun 2018 22:12
(name . Joey Hess)(address . id@joeyh.name)(address . 31582@debbugs.gnu.org)
877enixo43.fsf@ngyro.com
Joey Hess <id@joeyh.name> writes:

Toggle quote (2 lines)
> Thanks for your work on this package, I'm excited to see it.

My pleasure! Thanks for creating git-annex :).

Toggle quote (6 lines)
> You could avoid most of the problems with Setup.hs by using git-annex's
> Makefile. That has targets to build the man pages and install
> everything. The equivilant code in Setup.hs is really only there to
> minimally support people installing with haskell tooling, but the
> Makefile is generally preferable for distribution use.

This is really useful. I probably should have looked at the Debian
package a little more closely. I got the impression that Hackage was
the main source for git-annex, and went straight from there to Cabal.

Toggle quote (6 lines)
> Also, I'd encourage you to enable S3 and WebDAV in the build, since
> those are often used, and you're not testing all the other storage
> backends that are already supported in your build; nor should you need
> to. `git-annex testremote` is there so users can test this stuff in
> their own environments.

Thanks for the recommendation. Both WebDAV and S3 should be easy enough
to add to the package. The web client and the Android stuff probably
not so much.

Thanks a million for your help here. I will put together some patches
soon to fix the manuals using the Makefile, and I will add S3 and
WebDAV.
J
J
Joey Hess wrote on 1 Jun 2018 23:00
(name . Timothy Sample)(address . samplet@ngyro.com)(address . 31582@debbugs.gnu.org)
20180601210004.GA26792@kitenet.net
Timothy Sample wrote:
Toggle quote (4 lines)
> This is really useful. I probably should have looked at the Debian
> package a little more closely. I got the impression that Hackage was
> the main source for git-annex, and went straight from there to Cabal.

Indeed Hackage is not the main source, and due to clumsiness of cabal, the
git-annex.tar.gz stored on Hackage doesn't include all the files from the
upstream source; only the ones needed for cabal to build it. So for the
Makefile etc you'll need to get the source from git or use a git
archive.

--
see shy jo
-----BEGIN PGP SIGNATURE-----

iQIzBAABCgAdFiEEKKUAw1IH6rcvbA8l2xLbD/BfjzgFAlsRs9EACgkQ2xLbD/Bf
jzjKqRAAwuOJtCAjqZH6y6FwVKSvadsrxBNBMFcQ3UIV2wGHWWAh2osZ0dRqwBLq
hFkbeLY/wG/YfISN2QenFFhCD7Nk6+Ro/zGIPe4LPcopzm153wAffLdngtGdMdCb
N65cxhxjrNeJTk0t5+NA+J3aZM/iF74+X+pcgag0L9D95XqYuRy8Q3boTidaNTA1
mbcql3lXtpptSORNcQnSJe3YslYA83yjYt3iQIw/ZclrbBo8TdsCqfMgKtHH4lFV
41fatKUZjdzIkLPr1le1anB9C6bCxTjJ14MAaAHRcafRSlJqIagceS+CkQ+FPabs
bBMOJqXJUEJUfmb2Ax0F0PGhYiWPaoUZQSpwzWawNC2/IaTK4k2aOOhmjytgqciy
1Hh1foAtA/7Oijm0QHMU9s20iyT8S8ClX8xeDtapnQDx4qmW/a2VrZ2oxPPVZF5+
iZwwnI5MbTimkesW2FjoP/ELUQ5+BDhO5kws+sm9BjdZuSXzs0d6twhCkIafZDR4
3XV/NPfHY+mLFeokny61MwCqnFRc9B7TjNEkVpEYx+mpNMz78WAhB9kLYUHIO9mB
AtAhlK0dWYCosmBGLN9E+GxokyjxVj+A7EQ/zdX3MZUaKBNDRKtvPm9D+H8Dn+VN
3KESq4ubLIRtyRLS6X7RsVV25alqtwA/8WJUtEOpjNwkaEQOsz8=
=DM5D
-----END PGP SIGNATURE-----


?
Your comment

This issue is archived.

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

To respond to this issue using the mumi CLI, first switch to it
mumi current 31582
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