guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

01/05: gnu: Add 'git-minimal'.


From: guix-commits
Subject: 01/05: gnu: Add 'git-minimal'.
Date: Mon, 26 Nov 2018 05:10:27 -0500 (EST)

civodul pushed a commit to branch master
in repository guix.

commit c23cf1832aba44c03ba50a6f318b0415a4437d53
Author: Ludovic Courtès <address@hidden>
Date:   Mon Nov 26 10:35:41 2018 +0100

    gnu: Add 'git-minimal'.
    
    * gnu/packages/version-control.scm (git-minimal): New variable.
---
 gnu/packages/version-control.scm | 64 ++++++++++++++++++++++++++++++++++++++++
 1 file changed, 64 insertions(+)

diff --git a/gnu/packages/version-control.scm b/gnu/packages/version-control.scm
index ecd5789..cec3e5f 100644
--- a/gnu/packages/version-control.scm
+++ b/gnu/packages/version-control.scm
@@ -457,6 +457,70 @@ everything from small to very large projects with speed 
and efficiency.")
    (license license:gpl2)
    (home-page "https://git-scm.com/";)))
 
+(define-public git-minimal
+  ;; The size of the closure of 'git-minimal' is two thirds that of 'git'.
+  ;; Its test suite runs slightly faster and most importantly it doesn't
+  ;; depend on packages that are expensive to build such as Subversion.
+  (package
+    (inherit git)
+    (name "git-minimal")
+    (arguments
+     (substitute-keyword-arguments (package-arguments git)
+       ((#:phases phases)
+        `(modify-phases ,phases
+           (replace 'patch-makefiles
+             (lambda _
+               (substitute* "Makefile"
+                 (("/usr/bin/perl") (which "perl")))
+               #t))
+           (delete 'build-subtree)
+           (delete 'split)
+           (delete 'install-man-pages)
+           (delete 'install-subtree)
+           (delete 'install-credential-netrc)
+           (add-before 'check 'delete-svn-test
+             (lambda _
+               ;; This test cannot run since we are not building 'git-svn'.
+               (delete-file "t/t9020-remote-svn.sh")
+               #t))
+           (add-after 'install 'remove-unusable-perl-commands
+             (lambda* (#:key outputs #:allow-other-keys)
+               (let* ((out     (assoc-ref outputs "out"))
+                      (bin     (string-append out "/bin"))
+                      (libexec (string-append out "/libexec")))
+                 (for-each (lambda (file)
+                             (delete-file (string-append libexec
+                                                         "/git-core/" file)))
+                           '("git-svn" "git-cvsimport" "git-archimport"
+                             "git-cvsserver" "git-request-pull"
+                             "git-add--interactive" "git-cvsexportcommit"
+                             "git-instaweb" "git-send-email"))
+                 (delete-file (string-append bin "/git-cvsserver"))
+
+                 ;; These templates typically depend on Perl.  Remove them.
+                 (delete-file-recursively
+                  (string-append out "/share/git-core/templates/hooks"))
+
+                 ;; Gitweb depends on Perl as well.
+                 (delete-file-recursively
+                  (string-append out "/share/gitweb"))
+                 #t)))))
+       ((#:configure-flags flags)
+        ''())
+       ((#:disallowed-references lst '())
+        `(,perl ,@lst))))
+    (outputs '("out"))
+    (native-inputs
+     `(("native-perl" ,perl)
+       ("gettext" ,gettext-minimal)))
+    (inputs
+     `(("curl" ,curl)                             ;for HTTP(S) access
+       ("expat" ,expat)                           ;for 'git push' over HTTP(S)
+       ("openssl" ,openssl)
+       ("perl" ,perl)
+       ("zlib" ,zlib)
+       ("bash-for-tests" ,bash)))))
+
 (define-public libgit2
   (package
     (name "libgit2")



reply via email to

[Prev in Thread] Current Thread [Next in Thread]