+(define-public git-manpages
+ ;; Keep in sync with 'git'!
+
+ ;; Granted, we could build the man pages from the 'git' package itself,
+ ;; which contains the real source. However, it would add a dependency on a
+ ;; full XML tool chain, and building it actually takes ages. So we use this
+ ;; lazy approach.
+ (package
+ (name "git-manpages")
+ (version (package-version git))
+ (source (origin
+ (method url-fetch)
+ (uri (string-append
+ "mirror://kernel.org/software/scm/git/git-manpages-"
+ version ".tar.xz"))
+ (sha256
+ (base32
+ "1k24p33v9hvmpkx4l818x1vbdv090kfgwqshhyyl3h9m9b5skqci"))))
+ (build-system trivial-build-system)
+ (arguments
+ '(#:modules ((guix build utils))
+ #:builder
+ (begin
+ (use-modules (guix build utils))
+
+ (let* ((xz (assoc-ref %build-inputs "xz"))
+ (tar (assoc-ref %build-inputs "tar"))
+ (out (assoc-ref %outputs "out"))
+ (man (string-append out "/share/man")))
+ (setenv "PATH" (string-append tar "/bin:" xz "/bin"))
+
+ (mkdir-p man)
+ (with-directory-excursion man
+ (zero? (system* "tar" "xvf"
+ (assoc-ref %build-inputs "source"))))))))
+
+ (native-inputs `(("tar" ,tar)
+ ("xz" ,xz)))
+ (home-page (package-home-page git))
+ (license (package-license git))
+ (synopsis "Man pages of the Git version control system")
+ (description
+ "This package provides the man pages of the Git version control system.
+This is the documentation displayed when using the '--help' option of a 'git'
+command.")))
+
+(define-public shflags
+ (package
+ (name "shflags")
+ (version "1.0.3")
+ (source (origin
+ (method url-fetch)
+ (uri (string-append "https://shflags.googlecode.com/files/"
+ "shflags-" version ".tgz"))
+ (sha256
+ (base32
+ "08laxhf1hifh3w4j0hri5ppcklaqz0mnkmbaz8j0wxih29vi8slm"))))
+ (build-system trivial-build-system)
+ (native-inputs `(("tar" ,tar)
+ ("gzip" ,gzip)))
+ (arguments
+ `(#:modules ((guix build utils))
+ #:builder (begin
+ (use-modules (guix build utils))
+ (let* ((source (assoc-ref %build-inputs "source"))
+ (tar (assoc-ref %build-inputs "tar"))
+ (gzip (assoc-ref %build-inputs "gzip"))
+ (output (assoc-ref %outputs "out"))
+ (srcdir (string-append output "/src")))
+ (begin
+ (setenv "PATH" (string-append gzip "/bin"))
+ (system* (string-append tar "/bin/tar") "xzf"
+ source)
+ (chdir ,(string-append name "-" version))
+ (mkdir-p srcdir)
+ (copy-file "src/shflags"
+ (string-append srcdir "/shflags"))
+ #t)))))
+ (home-page "https://code.google.com/p/shflags/")
+ (synopsis "Command-line flags library for shell scripts")
+ (description
+ "Shell Flags (shFlags) is a library written to greatly simplify the
+handling of command-line flags in Bourne based Unix shell scripts (bash, dash,
+ksh, sh, zsh). Most shell scripts use getopt for flags processing, but the
+different versions of getopt on various OSes make writing portable shell
+scripts difficult. shFlags instead provides an API that doesn't change across
+shell and OS versions so the script writer can be confident that the script
+will work.")
+ (license lgpl2.1)))
+
+(define-public git-flow
+ (package
+ (name "git-flow")
+ ;; This version has not be officially released yet, so we build it
+ ;; directly from the git repository.
+ (version "0.4.2-pre")
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/nvie/gitflow/")
+ (commit "15aab26")))
+ (sha256
+ (base32
+ "01fs97q76fdfnvmrh2cyjhywcs3pykf1dg58sy0frflnsdzs6prx"))))
+ (build-system gnu-build-system)
+ (inputs `(("shflags" ,shflags)))
+ (arguments
+ '(#:tests? #f ; no tests
+ #:make-flags (list (string-append "prefix="
+ (assoc-ref %outputs "out")))
+ #:phases (alist-cons-after
+ 'unpack 'reset-shFlags-link
+ (lambda* (#:key inputs #:allow-other-keys)
+ ;; The link points to a file in the shFlags submodule.
+ ;; Redirect it to point to our system shFlags.
+ (let ((shflags (assoc-ref inputs "shflags")))
+ (begin
+ (delete-file "gitflow-shFlags")
+ (symlink (string-append shflags "/src/shflags")
+ "gitflow-shFlags"))))
+ (alist-delete
+ 'configure
+ (alist-delete 'build %standard-phases)))))
+ (home-page "http://nvie.com/posts/a-successful-git-branching-model/")
+ (synopsis "Git extensions for Vincent Driessen's branching model")
+ (description
+ "Vincent Driessen's branching model is a git branching and release
+management strategy that helps developers keep track of features, hotfixes,
+and releases in bigger software projects. The git-flow library of git
+subcommands helps automate some parts of the flow to make working with it a
+lot easier.")
+ (license bsd-2)))
+
+(define-public git-test-sequence
+ (let ((commit "48e5a2f"))
+ (package
+ (name "git-test-sequence")
+ (version (string-append "20140312." commit))
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ ;; There are many other scripts in this directory; we
+ ;; are interested in just one for this package.
+ (url "https://github.com/dustin/bindir")
+ (commit commit)))
+ (sha256
+ (base32
+ "1dcq0y16yznbv4k9h8gg90kv1gkn8r8dbvl4m2rpfd7q5nqhn617"))))
+ (build-system trivial-build-system)
+ (arguments
+ `(#:modules ((guix build utils))
+ #:builder (begin
+ (use-modules (guix build utils))
+ (let* ((source (assoc-ref %build-inputs "source"))
+ (output (assoc-ref %outputs "out"))
+ (bindir (string-append output "/bin"))
+ (script "git-test-sequence"))
+ (begin
+ (mkdir-p bindir)
+ (copy-file (string-append source "/" script)
+ (string-append bindir "/" script))
+ #t)))))
+ (home-page "http://dustin.sallings.org/2010/03/28/git-test-sequence.html")
+ (synopsis "Run a command over a sequence of commits")
+ (description
+ "git-test-sequence is similar to an automated git bisect except it’s
+linear. It will test every change between two points in the DAG. It will
+also walk each side of a merge and test those changes individually.")
+ (license (x11-style "file://LICENSE")))))
+
+(define-public gitolite
+ (package
+ (name "gitolite")
+ (version "3.6.2")
+ (source (origin
+ (method url-fetch)
+ (uri (string-append
+ "https://github.com/sitaramc/gitolite/archive/v"
+ version ".tar.gz"))
+ (file-name (string-append name "-" version ".tar.gz"))
+ ;; Commit ed807a4 upstream
+ (patches
+ (list (search-patch "gitolite-openssh-6.8-compat.patch")))
+ (sha256
+ (base32
+ "1gsgzi9ayb4rablki3mqr11b0h8db4xg43df660marfpacmkfb01"))))
+ (build-system gnu-build-system)
+ (arguments
+ '(#:tests? #f ; no tests
+ #:phases (modify-phases %standard-phases
+ (delete 'configure)
+ (delete 'build)
+ (add-before 'install 'patch-scripts
+ (lambda* (#:key inputs #:allow-other-keys)
+ (let ((perl (string-append (assoc-ref inputs "perl")
+ "/bin/perl")))
+ ;; This seems to take care of every shell script that
+ ;; invokes Perl.
+ (substitute* (find-files "." ".*")
+ ((" perl -")
+ (string-append " " perl " -"))))))
+ (replace 'install
+ (lambda* (#:key outputs #:allow-other-keys)
+ (let* ((output (assoc-ref outputs "out"))
+ (sharedir (string-append output "/share/gitolite"))
+ (bindir (string-append output "/bin")))
+ (mkdir-p sharedir)
+ (mkdir-p bindir)
+ (system* "./install" "-to" sharedir)
+ ;; Create symlinks for executable scripts in /bin.
+ (for-each (lambda (script)
+ (symlink (string-append sharedir "/" script)
+ (string-append bindir "/" script)))
+ '("gitolite" "gitolite-shell"))
+ #t))))))
+ (inputs
+ `(("perl" ,perl)))
+ ;; git and openssh are propagated because trying to patch the source via
+ ;; regexp matching is too brittle and prone to false positives.
+ (propagated-inputs
+ `(("git" ,git)
+ ("openssh" ,openssh)))
+ (home-page "http://gitolite.com")
+ (synopsis "Git access control layer")
+ (description
+ "Gitolite is an access control layer on top of Git, providing fine access
+control to Git repositories.")
+ (license gpl2)))
+