aboutsummaryrefslogtreecommitdiff
path: root/km-packages/git-annex.scm
diff options
context:
space:
mode:
Diffstat (limited to 'km-packages/git-annex.scm')
-rw-r--r--km-packages/git-annex.scm55
1 files changed, 1 insertions, 54 deletions
diff --git a/km-packages/git-annex.scm b/km-packages/git-annex.scm
index 15eeec8..5390302 100644
--- a/km-packages/git-annex.scm
+++ b/km-packages/git-annex.scm
@@ -20,64 +20,11 @@
(define-module (km-packages git-annex)
#:use-module (gnu packages)
- #:use-module (gnu packages haskell)
- #:use-module (gnu packages haskell-apps)
- #:use-module (gnu packages haskell-xyz)
#:use-module (gnu packages ipfs)
- #:use-module ((guix build utils)
- #:select (with-directory-excursion))
#:use-module (guix build-system trivial)
- #:use-module (guix build-system haskell)
#:use-module (guix download)
- #:use-module (guix gexp)
- #:use-module (guix git-download)
#:use-module ((guix licenses) #:prefix license:)
- #:use-module (guix packages)
- #:use-module (guix utils)
- #:use-module (ice-9 popen)
- #:use-module (ice-9 rdelim))
-
-(define %source-dir
- (string-append (getenv "HOME") "/src/haskell/git-annex-for-guix"))
-
-;; Copied from guile-daemon.
-(define (git-output . args)
- "Execute 'git ARGS ...' command and return its output without trailing
-newspace."
- (with-directory-excursion %source-dir
- (let* ((port (apply open-pipe* OPEN_READ "git" args))
- (output (read-string port)))
- (close-port port)
- (string-trim-right output #\newline))))
-
-(define (current-commit)
- (git-output "rev-parse" "HEAD"))
-
-(define-public git-annex-dev
- (let ((commit (current-commit)))
- (package
- (inherit git-annex)
- (name "git-annex-dev")
- (version (string-append "000-" (string-take commit 7)))
- (source (local-file %source-dir
- #:recursive? #t
- #:select? (git-predicate %source-dir)))
- (arguments
- `(,@(substitute-keyword-arguments (package-arguments git-annex)
- ((#:tests? _ #f) #f)
- ((#:phases phases)
- `(modify-phases ,phases
- (delete 'check)
- (add-before 'factor-setup 'delete-setup
- (lambda _
- ;; Otherwise get write error because is read-only.
- (delete-file "Setup.hs")
- #t))
- (add-before 'unpatch-shell-and-rebuild 'delete-shell
- (lambda _
- ;; Avoid permission error when copying file.
- (delete-file "Utility/Shell.hs")
- #t))))))))))
+ #:use-module (guix packages))
(define-public git-annex-remote-ipfs
(package