Updated from trunk.
svn path=/nixpkgs/branches/stdenv-updates/; revision=23275
This commit is contained in:
@@ -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 (
|
||||
|
||||
@@ -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.
|
||||
|
||||
3
maintainers/scripts/test-eval-release.sh
Executable file
3
maintainers/scripts/test-eval-release.sh
Executable file
@@ -0,0 +1,3 @@
|
||||
#! /bin/sh
|
||||
|
||||
nix-instantiate --strict --eval-only --xml --show-trace "$(dirname "$0")"/eval-release.nix 2>&1 > /dev/null
|
||||
Reference in New Issue
Block a user