[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] Add libgit2.
From: |
Ricardo Wurmus |
Subject: |
Re: [PATCH] Add libgit2. |
Date: |
Mon, 21 Dec 2015 11:35:17 +0100 |
Ludovic Courtès <address@hidden> writes:
> Ricardo Wurmus <address@hidden> skribis:
>
>> 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>
>
> Does the test also fail outside the build environment? Could you strace
> it to see exactly what the argument to ‘chdir’ is and what its errno
> value is?
>
> At first sight it sounds like it should be fixable, so it’s worth a try.
It was fixable! (I seem to have to give up first before eventually
succeeding.)
Attached is a new patch.
>From 973a38bc00343863ea61d7345661281b84ac4ce7 Mon Sep 17 00:00:00 2001
From: Ricardo Wurmus <address@hidden>
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 | 45 ++++++++++++++++++++++++++++++++++++++++
1 file changed, 45 insertions(+)
diff --git a/gnu/packages/version-control.scm b/gnu/packages/version-control.scm
index 171faab..c24c468 100644
--- a/gnu/packages/version-control.scm
+++ b/gnu/packages/version-control.scm
@@ -8,6 +8,7 @@
;;; Copyright © 2014 Eric Bavier <address@hidden>
;;; Copyright © 2015 Efraim Flashner <address@hidden>
;;; Copyright © 2015 Kyle Meyer <address@hidden>
+;;; Copyright © 2015 Ricardo Wurmus <address@hidden>
;;;
;;; 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,49 @@ 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
+ (add-after 'unpack 'fix-hardcoded-paths
+ (lambda _
+ (substitute* "tests/repo/init.c"
+ (("#!/bin/sh") (string-append "#!" (which "sh"))))
+ (substitute* "tests/clar/fs.h"
+ (("/bin/cp") (which "cp"))
+ (("/bin/rm") (which "rm")))
+ #t))
+ ;; Run checks more verbosely.
+ (replace 'check
+ (lambda _ (zero? (system* "./libgit2_clar" "-v" "-Q")))))))
+ (inputs
+ `(("libssh2" ,libssh2)
+ ("libcurl" ,curl)
+ ("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