all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* [PATCH] Add libgit2.
@ 2015-12-17 15:55 Ricardo Wurmus
  2015-12-19 13:59 ` Ludovic Courtès
  0 siblings, 1 reply; 4+ messages in thread
From: Ricardo Wurmus @ 2015-12-17 15:55 UTC (permalink / raw)
  To: guix-devel

[-- Attachment #1: Type: text/plain, Size: 379 bytes --]

Hi Guix,

attached is a patch to add libgit2.  Unfortunately, I couldn’t get all
tests to pass.  Does someone here have an idea how to fix them?

The tests only fail when run with “guix build”.
I run them like this:

    ./libgit2_clar -v -Q

And I get erros like this:

   Function call failed: (chdir(sandbox))
      error -1 - <no message>

~~ Ricardo


[-- Attachment #2: 0001-gnu-Add-libgit2.patch --]
[-- Type: text/x-patch, Size: 2961 bytes --]

From 12e67f7fc769329ad1d162ab47f36edb362d451f Mon Sep 17 00:00:00 2001
From: Ricardo Wurmus <ricardo.wurmus@mdc-berlin.de>
Date: Thu, 17 Dec 2015 16:20:05 +0100
Subject: [PATCH] gnu: Add libgit2.

* gnu/packages/version-control.scm (libgit2): New variable.
---
 gnu/packages/version-control.scm | 41 ++++++++++++++++++++++++++++++++++++++++
 1 file changed, 41 insertions(+)

diff --git a/gnu/packages/version-control.scm b/gnu/packages/version-control.scm
index 6861e35..f186a96 100644
--- a/gnu/packages/version-control.scm
+++ b/gnu/packages/version-control.scm
@@ -8,6 +8,7 @@
 ;;; Copyright © 2014 Eric Bavier <bavier@member.fsf.org>
 ;;; Copyright © 2015 Efraim Flashner <efraim@flashner.co.il>
 ;;; Copyright © 2015 Kyle Meyer <kyle@kyleam.com>
+;;; Copyright © 2015 Ricardo Wurmus <rekado@elephly.net>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -32,6 +33,7 @@
   #:use-module (guix packages)
   #:use-module (guix download)
   #:use-module (guix git-download)
+  #:use-module (guix build-system cmake)
   #:use-module (guix build-system gnu)
   #:use-module (guix build-system python)
   #:use-module (guix build-system trivial)
@@ -311,6 +313,45 @@ everything from small to very large projects with speed and efficiency.")
 This is the documentation displayed when using the '--help' option of a 'git'
 command.")))
 
+(define-public libgit2
+  (package
+    (name "libgit2")
+    (version "0.23.3")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append "https://github.com/libgit2/libgit2/"
+                                  "archive/v" version ".tar.gz"))
+              (file-name (string-append name "-" version ".tar.gz"))
+              (sha256
+               (base32
+                "1bhyzw9b7xr1vj24hgbwbfjw2wiaigiklccsdvd8r4kmcr180p1d"))))
+    (build-system cmake-build-system)
+    (arguments
+     `(#:phases
+       (modify-phases %standard-phases
+         ;; Run checks more verbosely.
+         (replace 'check
+           (lambda _
+             ;; FIXME: tests fail when run in a chroot:
+             ;;   Function call failed: (chdir(sandbox))
+             ;;   error -1 - <no message>
+             ;;(zero? (system* "./libgit2_clar" "-v" "-Q"))
+             #t)))))
+    (inputs
+     `(("libssh2" ,libssh2)
+       ("python" ,python)
+       ("openssl" ,openssl)))
+    (native-inputs
+     `(("pkg-config" ,pkg-config)))
+    (home-page "http://libgit2.github.com/")
+    (synopsis "Library providing Git core methods")
+    (description
+     "Libgit2 is a portable, pure C implementation of the Git core methods
+provided as a re-entrant linkable library with a solid API, allowing you to
+write native speed custom Git applications in any language with bindings.")
+    ;; GPLv2 with linking exception
+    (license gpl2)))
+
 (define-public shflags
   (package
     (name "shflags")
-- 
2.1.0


^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2015-12-21 13:37 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-12-17 15:55 [PATCH] Add libgit2 Ricardo Wurmus
2015-12-19 13:59 ` Ludovic Courtès
2015-12-21 10:35   ` Ricardo Wurmus
2015-12-21 13:37     ` Ludovic Courtès

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.