Updated from trunk.

svn path=/nixpkgs/branches/stdenv-updates/; revision=23275
This commit is contained in:
Lluís Batlle i Rossell
2010-08-20 13:41:12 +00:00
142 changed files with 2022 additions and 808 deletions

View File

@@ -6,9 +6,13 @@ let
lib = (import ../.. {}).lib;
rel = removeAttrs (import ../../pkgs/top-level/release.nix) ["tarball"];
rel = removeAttrs (import ../../pkgs/top-level/release.nix) [ "tarball" "xbursttools" ];
maybe = x: let y = builtins.tryEval x; in if y.success then y.value else null;
seqList = xs: res: lib.fold (x: xs: lib.seq x xs) res xs;
strictAttrs = as: seqList (lib.attrValues as) as;
maybe = as: let y = builtins.tryEval (strictAttrs as); in if y.success then y.value else builtins.trace "FAIL" null;
call = attrs: lib.flip lib.mapAttrs attrs
(n: v: builtins.trace n (

View File

@@ -623,19 +623,9 @@ exec ${GUILE-guile} -L "$PWD" -l "$0" \
(let ((strverscmp
(let ((sym (or (dynamic-func "strverscmp" (dynamic-link))
(error "could not find `strverscmp' (from GNU libc)"))))
(make-foreign-function int sym (list '* '*))))
(string->null-terminated-utf8
(lambda (s)
(let* ((utf8 (string->utf8 s))
(len (bytevector-length utf8))
(nts (make-bytevector (+ len 1))))
(bytevector-copy! utf8 0 nts 0 len)
(bytevector-u8-set! nts len 0)
nts))))
(make-foreign-function int sym (list '* '*)))))
(lambda (a b)
(let ((a (bytevector->foreign (string->null-terminated-utf8 a)))
(b (bytevector->foreign (string->null-terminated-utf8 b))))
(> (strverscmp a b) 0)))))
(> (strverscmp (string->pointer a) (string->pointer b)) 0))))
(define (latest-release project)
;; Return "FOO-X.Y" or #f.

View File

@@ -0,0 +1,3 @@
#! /bin/sh
nix-instantiate --strict --eval-only --xml --show-trace "$(dirname "$0")"/eval-release.nix 2>&1 > /dev/null