GnuTLS 3.0.1.

svn path=/nixpkgs/trunk/; revision=28743
This commit is contained in:
Ludovic Courtès 2011-08-22 17:38:04 +00:00
parent 8fe3128e71
commit 34a5ec9e66
2 changed files with 88 additions and 5 deletions

View File

@ -1,27 +1,30 @@
{ fetchurl, stdenv, zlib, lzo, libtasn1, nettle
{ fetchurl, stdenv, xz, zlib, lzo, libtasn1, nettle
, guileBindings, guile }:
assert guileBindings -> guile != null;
stdenv.mkDerivation rec {
name = "gnutls-2.12.7";
name = "gnutls-3.0.1";
src = fetchurl {
url = "mirror://gnu/gnutls/${name}.tar.bz2";
sha256 = "09vmm1b2iypwk5vh0adyqzra7sgx5hb9xyr1wjncv7947bk4zn3p";
url = "mirror://gnu/gnutls/${name}.tar.xz";
sha256 = "1z3dqjv8zvma2adbwbcw704zf91hazz8ilmxy91gkrdpi5z2kpz2";
};
patches = [ ./fix-guile-priorities-test.patch ];
configurePhase = ''
./configure --prefix="$out" \
--disable-dependency-tracking --enable-fast-install \
--without-p11-kit \
--with-lzo --with-libtasn1-prefix="${libtasn1}" \
${if guileBindings
then "--enable-guile --with-guile-site-dir=\"$out/share/guile/site\""
else ""}
'';
buildInputs = [ zlib lzo libtasn1 ]
buildInputs = [ xz zlib lzo libtasn1 ]
++ stdenv.lib.optional guileBindings guile;
propagatedBuildInputs = [ nettle ];

View File

@ -0,0 +1,80 @@
commit 10115e3fb9c36abcce95bd8f74d212d068cbddce (HEAD, refs/heads/gnutls_3_0_x)
Author: Ludovic Courtès <ludo@gnu.org>
Date: Mon Aug 22 18:17:10 2011 +0200
guile: Fix `priorities' test to use `run-test'.
This is a followup to commit cd7b8102316cd4151356c4b2b7909c7435593890
("guile: Fix tests to match the `exit' behavior introduced in Guile
2.0.1.").
Modified guile/tests/priorities.scm
diff --git a/guile/tests/priorities.scm b/guile/tests/priorities.scm
index 1ee072b..2af837e 100644
--- a/guile/tests/priorities.scm
+++ b/guile/tests/priorities.scm
@@ -24,6 +24,8 @@
;;;
(use-modules (gnutls)
+ (gnutls build tests)
+ (srfi srfi-1)
(srfi srfi-26))
(define %valid-priority-strings
@@ -41,10 +43,7 @@
("NONE:+VERS-TLS-ALL:+AES-128-CBC:"
. "+FAIL-HERE:+SHA1:+COMP-NULL:+SIGN-RSA-SHA1")))
-(dynamic-wind
-
- (lambda ()
- #t)
+(run-test
(lambda ()
(let ((s (make-session connection-end/client)))
@@ -52,25 +51,20 @@
(for-each (cut set-session-priorities! s <>)
%valid-priority-strings)
- (for-each (lambda (prefix+suffix)
- (let* ((prefix (car prefix+suffix))
- (suffix (cdr prefix+suffix))
- (pos (string-length prefix))
- (string (string-append prefix suffix)))
- (catch 'gnutls-error
- (lambda ()
- (let ((s (make-session connection-end/client)))
- (set-session-priorities! s string)))
- (lambda (key err function error-location . unused)
- (or (and (eq? key 'gnutls-error)
- (eq? err error/invalid-request)
- (eq? function 'set-session-priorities!)
- (= error-location pos))
- (exit 1))))))
- %invalid-priority-strings)
-
- (exit 0)))
-
- (lambda ()
- ;; failure
- (exit 1)))
+ (every (lambda (prefix+suffix)
+ (let* ((prefix (car prefix+suffix))
+ (suffix (cdr prefix+suffix))
+ (pos (string-length prefix))
+ (string (string-append prefix suffix)))
+ (catch 'gnutls-error
+ (lambda ()
+ (let ((s (make-session connection-end/client)))
+ ;; The following call should raise an exception.
+ (set-session-priorities! s string)
+ #f))
+ (lambda (key err function error-location . unused)
+ (and (eq? key 'gnutls-error)
+ (eq? err error/invalid-request)
+ (eq? function 'set-session-priorities!)
+ (= error-location pos))))))
+ %invalid-priority-strings))))