* selectMaintained (renamed): don't use meta.maintainer, just use

meta.platforms.
* Valgrind *should* work on Darwin now, except that our GCC doesn't
  recognise the -arch flag.

svn path=/nixpkgs/trunk/; revision=17372
This commit is contained in:
Eelco Dolstra 2009-09-23 19:45:02 +00:00
parent 880e6ba1f7
commit b7a90c11d3
4 changed files with 22 additions and 18 deletions

View File

@ -10,7 +10,7 @@ stdenv.mkDerivation rec {
# Perl is needed for `cg_annotate'. # Perl is needed for `cg_annotate'.
# GDB is needed to provide a sane default for `--db-command'. # GDB is needed to provide a sane default for `--db-command'.
buildInputs = [ perl gdb ]; buildInputs = [ perl ] ++ stdenv.lib.optional (!stdenv.isDarwin) gdb;
configureFlags = configureFlags =
if stdenv.system == "x86_64-linux" then ["--enable-only64bit"] else []; if stdenv.system == "x86_64-linux" then ["--enable-only64bit"] else [];
@ -37,5 +37,9 @@ stdenv.mkDerivation rec {
''; '';
license = "GPLv2+"; license = "GPLv2+";
maintainers = [ stdenv.lib.maintainers.eelco ];
platforms = stdenv.lib.platforms.linux ++ stdenv.lib.platforms.cygwin;
}; };
} }

View File

@ -29,5 +29,7 @@ stdenv.mkDerivation rec {
homepage = http://www.gnu.org/software/gdb/; homepage = http://www.gnu.org/software/gdb/;
license = "GPLv3+"; license = "GPLv3+";
platforms = stdenv.lib.platforms.linux ++ stdenv.lib.platforms.cygwin;
}; };
} }

View File

@ -1,12 +1,12 @@
let let lists = import ./lists.nix; in
lists = import ./lists.nix;
in
rec { rec {
gnu = linux; /* ++ hurd ++ kfreebsd ++ ... */ gnu = linux; /* ++ hurd ++ kfreebsd ++ ... */
linux = ["i686-linux" "x86_64-linux" "powerpc-linux"]; linux = ["i686-linux" "x86_64-linux" "powerpc-linux"];
darwin = ["i686-darwin" "powerpc-darwin"]; darwin = ["i686-darwin" "powerpc-darwin"];
freebsd = ["i686-freebsd" "x86_64-freebsd" "powerpc-freebsd"]; freebsd = ["i686-freebsd" "x86_64-freebsd" "powerpc-freebsd"];
cygwin = ["i686-cygwin"]; cygwin = ["i686-cygwin"];
unix = linux ++ darwin ++ freebsd;
all = linux ++ darwin ++ cygwin ++ freebsd; all = linux ++ darwin ++ cygwin ++ freebsd;
allBut = platform: lists.filter (x: platform != x) all; allBut = platform: lists.filter (x: platform != x) all;
mesaPlatforms = linux ++ darwin ++ freebsd; mesaPlatforms = linux ++ darwin ++ freebsd;

View File

@ -33,8 +33,10 @@ let
(pkgs.lib.getAttrFromPath path pkgs); (pkgs.lib.getAttrFromPath path pkgs);
in testOn job.systems getPkg); in testOn job.systems getPkg);
selectMaintained = attrSet: /* Find all packages that have a meta.platforms field listing the
if builtins ? tryEval then supported platforms. */
packagesWithMetaPlatform = attrSet:
if builtins ? tryEval then
let pairs = pkgs.lib.concatMap let pairs = pkgs.lib.concatMap
(x: let val = builtins.tryEval (processPackage (builtins.getAttr x attrSet)); in (x: let val = builtins.tryEval (processPackage (builtins.getAttr x attrSet)); in
if val.success && val.value != [] then [{name=x; value=val.value;}] else []) if val.success && val.value != [] then [{name=x; value=val.value;}] else [])
@ -42,17 +44,15 @@ let
in in
builtins.listToAttrs pairs builtins.listToAttrs pairs
else {}; else {};
# May fail as much as it wishes, we will catch the error
# May fail as much as it wishes, we will catch the error.
processPackage = attrSet: processPackage = attrSet:
if attrSet ? recurseForDerivations && attrSet.recurseForDerivations then if attrSet ? recurseForDerivations && attrSet.recurseForDerivations then
selectMaintained attrSet packagesWithMetaPlatform attrSet
else else
if attrSet.meta.maintainers != [] then if builtins.hasAttr "platforms" attrSet.meta
(if builtins.hasAttr "platforms" attrSet.meta then builtins.getAttr "platforms" attrSet.meta
then builtins.getAttr "platforms" attrSet.meta else [];
else pkgs.lib.platforms.all)
else
[];
/* Common platform groups on which to test packages. */ /* Common platform groups on which to test packages. */
inherit (pkgs.lib.platforms) linux darwin cygwin allBut all; inherit (pkgs.lib.platforms) linux darwin cygwin allBut all;
@ -66,7 +66,7 @@ in {
tarball = import ./make-tarball.nix; tarball = import ./make-tarball.nix;
} // (mapTestOn ((selectMaintained pkgs) // rec { } // (mapTestOn ((packagesWithMetaPlatform pkgs) // rec {
MPlayer = linux; MPlayer = linux;
abcde = linux; abcde = linux;
@ -161,7 +161,6 @@ in {
gcc43_multi = ["x86_64-linux"]; gcc43_multi = ["x86_64-linux"];
gcc44 = linux; gcc44 = linux;
gcj44 = linux; gcj44 = linux;
gdb = all;
ghostscript = linux; ghostscript = linux;
ghostscriptX = linux; ghostscriptX = linux;
gimp = linux; gimp = linux;
@ -375,7 +374,6 @@ in {
utillinux = linux; utillinux = linux;
utillinuxCurses = linux; utillinuxCurses = linux;
uzbl = linux; uzbl = linux;
valgrind = linux;
viking = linux; viking = linux;
vice = linux; vice = linux;
vim = linux; vim = linux;