From mboxrd@z Thu Jan 1 00:00:00 1970 From: =?UTF-8?q?=E5=AE=8B=E6=96=87=E6=AD=A6?= Subject: [PATCH] gnu: Add cgit. Date: Sun, 27 Mar 2016 22:02:45 +0800 Message-ID: <1459087365-1576-1-git-send-email-iyzsong@gmail.com> Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:48230) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1akBHi-00060Y-Nz for guix-devel@gnu.org; Sun, 27 Mar 2016 10:03:19 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1akBHf-0000Rf-HI for guix-devel@gnu.org; Sun, 27 Mar 2016 10:03:18 -0400 Received: from smtp1.openmailbox.org ([62.4.1.35]:46239) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1akBHf-0000Pd-Bj for guix-devel@gnu.org; Sun, 27 Mar 2016 10:03:15 -0400 List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org To: guix-devel@gnu.org Cc: =?UTF-8?q?=E5=AE=8B=E6=96=87=E6=AD=A6?= * gnu/packages/version-control.scm (cgit): New variable. --- gnu/packages/version-control.scm | 60 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 60 insertions(+) diff --git a/gnu/packages/version-control.scm b/gnu/packages/version-control.scm index 7d7276a..498885d 100644 --- a/gnu/packages/version-control.scm +++ b/gnu/packages/version-control.scm @@ -364,6 +364,66 @@ write native speed custom Git applications in any language with bindings.") ;; GPLv2 with linking exception (license gpl2))) +(define-public cgit + (package + (name "cgit") + (version "0.12") + (source (origin + (method url-fetch) + (uri (string-append + "https://git.zx2c4.com/cgit/snapshot/cgit-" + version ".tar.xz")) + (sha256 + (base32 + "1dx54hgfyabmg9nm5qp6d01f54nlbqbbdwhwl0llb9imjf237qif")))) + (build-system gnu-build-system) + (arguments + '(#:tests? #f ; + #:test-target "test" + #:make-flags '("CC=gcc" "SHELL_PATH=sh") + #:phases + (modify-phases %standard-phases + (add-after 'unpack 'unpack-git + (lambda* (#:key inputs #:allow-other-keys) + ;; Unpack the source of git into the 'git' directory. + (zero? (system* + "tar" "--strip-components=1" "-C" "git" "-xf" + (assoc-ref inputs "git:src"))))) + (delete 'configure) ; no configure script + (add-after 'build 'build-man + (lambda* (#:key make-flags #:allow-other-keys) + (zero? (apply system* `("make" ,@make-flags "doc-man"))))) + (replace 'install + (lambda* (#:key make-flags outputs #:allow-other-keys) + (let ((out (assoc-ref outputs "out"))) + (and (zero? (apply system* + `("make" ,@make-flags + ,(string-append "prefix=" out) + ,(string-append + "CGIT_SCRIPT_PATH=" out "/share/cgit") + "install" "install-man"))) + ;; Move the platform-dependent 'cgit.cgi' into lib + ;; to get it stripped. + (rename-file (string-append out "/share/cgit/cgit.cgi") + (string-append out "/lib/cgit/cgit.cgi")) + #t))))))) + (native-inputs + `(("asciidoc" ,asciidoc) + ("xmllint" ,libxml2) + ("xsltprot" ,libxslt))) + (inputs + `(("docbook-xml" ,docbook-xml) + ("docbook-xsl" ,docbook-xsl) + ("git:src" ,(package-source git)) + ("openssl" ,openssl) + ("zlib" ,zlib))) + (home-page "https://git.zx2c4.com/cgit/") + (synopsis "Web frontend for git repositories") + (description + "CGit is an attempt to create a fast web interface for the Git SCM, using +a built-in cache to decrease server I/O pressure.") + (license gpl2))) + (define-public shflags (package (name "shflags") -- 2.6.3