3
0
Fork 0
forked from mirrors/nixpkgs

Try selecting packages to build based on their being maintained

svn path=/nixpkgs/trunk/; revision=16844
This commit is contained in:
Michael Raskin 2009-08-25 05:46:48 +00:00
parent 4ba8f74591
commit feed5f087f
3 changed files with 63 additions and 29 deletions
pkgs
applications/misc/gphoto2
top-level

View file

@ -26,5 +26,8 @@ rec {
maintainers = [ maintainers = [
a.lib.maintainers.raskin a.lib.maintainers.raskin
]; ];
platforms = [
"i686-linux" "x86_64-linux"
];
}; };
} }

View file

@ -190,6 +190,10 @@ let
makeOverridable f (origArgs // (if builtins.isFunction newArgs then newArgs origArgs else newArgs)); makeOverridable f (origArgs // (if builtins.isFunction newArgs then newArgs origArgs else newArgs));
}; };
condPackage = condition: package: if condition then package else {};
platformPackage = platforms : package :
(condPackage (lib.any (x: x == system) platforms) package) //
{ meta.platforms = platforms; };
### STANDARD ENVIRONMENT ### STANDARD ENVIRONMENT
@ -1704,10 +1708,14 @@ let
profiledCompiler = true; profiledCompiler = true;
}); });
gccApple = wrapGCC (import ../development/compilers/gcc-apple { gccApple = (condPackage stdenv.isDarwin
inherit fetchurl stdenv noSysDirs; (wrapGCC (import ../development/compilers/gcc-apple {
profiledCompiler = true; inherit fetchurl stdenv noSysDirs;
}); profiledCompiler = true;
}))) // {
meta.platforms = ["i686-darwin"];
meta.maintainers = [];
};
gccupc40 = wrapGCCUPC (import ../development/compilers/gcc-upc-4.0 { gccupc40 = wrapGCCUPC (import ../development/compilers/gcc-upc-4.0 {
inherit fetchurl stdenv bison autoconf gnum4 noSysDirs; inherit fetchurl stdenv bison autoconf gnum4 noSysDirs;
@ -2042,17 +2050,17 @@ let
inherit fetchurl stdenv perl texinfo; inherit fetchurl stdenv perl texinfo;
}; };
visualcpp = import ../development/compilers/visual-c++ { visualcpp = platformPackage ["i686-cygwin"] (import ../development/compilers/visual-c++ {
inherit fetchurl stdenv cabextract; inherit fetchurl stdenv cabextract;
}; });
webdsl = import ../development/compilers/webdsl { webdsl = import ../development/compilers/webdsl {
inherit stdenv fetchurl pkgconfig strategoPackages; inherit stdenv fetchurl pkgconfig strategoPackages;
}; };
win32hello = import ../development/compilers/visual-c++/test { win32hello = platformPackage ["i686-cygwin"] ( import ../development/compilers/visual-c++/test {
inherit fetchurl stdenv visualcpp windowssdk; inherit fetchurl stdenv visualcpp windowssdk;
}; });
wrapGCCWith = gccWrapper: glibc: baseGCC: gccWrapper { wrapGCCWith = gccWrapper: glibc: baseGCC: gccWrapper {
nativeTools = stdenv ? gcc && stdenv.gcc.nativeTools; nativeTools = stdenv ? gcc && stdenv.gcc.nativeTools;
@ -3142,26 +3150,28 @@ let
}; };
glibc_multi = glibc_multi =
assert system == "x86_64-linux"; let package = (
runCommand "${glibc.name}-multi" runCommand "${glibc.name}-multi"
{ glibc64 = glibc; { glibc64 = glibc;
glibc32 = (import ./all-packages.nix {system = "i686-linux";}).glibc; glibc32 = (import ./all-packages.nix {system = "i686-linux";}).glibc;
} }
'' ''
ensureDir $out ensureDir $out
ln -s $glibc64/* $out/ ln -s $glibc64/* $out/
rm $out/lib $out/lib64 rm $out/lib $out/lib64
ensureDir $out/lib ensureDir $out/lib
ln -s $glibc64/lib/* $out/lib ln -s $glibc64/lib/* $out/lib
ln -s $glibc32/lib $out/lib/32 ln -s $glibc32/lib $out/lib/32
ln -s lib $out/lib64 ln -s lib $out/lib64
rm $out/include rm $out/include
cp -rs $glibc32/include $out cp -rs $glibc32/include $out
chmod -R u+w $out/include chmod -R u+w $out/include
cp -rsf $glibc64/include $out cp -rsf $glibc64/include $out
''; # */ '' # */
);
in platformPackage ["x86_64-linux"] package;
gmime = import ../development/libraries/gmime { gmime = import ../development/libraries/gmime {
inherit fetchurl stdenv pkgconfig zlib; inherit fetchurl stdenv pkgconfig zlib;
@ -4741,6 +4751,9 @@ let
inherit stdenv fetchurl alsaLib gettext ncurses; inherit stdenv fetchurl alsaLib gettext ncurses;
}; };
/*
# Will maybe move to kernelPackages properly later.
blcr = builderDefsPackage (selectVersion ../os-specific/linux/blcr "0.6.5"){ blcr = builderDefsPackage (selectVersion ../os-specific/linux/blcr "0.6.5"){
inherit perl; inherit perl;
}; };
@ -4748,6 +4761,7 @@ let
blcrCurrent = kernel : (blcr.passthru.function { blcrCurrent = kernel : (blcr.passthru.function {
inherit kernel; inherit kernel;
}); });
*/
bluez = import ../os-specific/linux/bluez { bluez = import ../os-specific/linux/bluez {
inherit fetchurl stdenv pkgconfig dbus libusb alsaLib; inherit fetchurl stdenv pkgconfig dbus libusb alsaLib;
@ -6044,7 +6058,7 @@ let
}; };
compizBase = (builderDefsPackage (selectVersion ../applications/window-managers/compiz "0.8.0")) { compizBase = (builderDefsPackage (selectVersion ../applications/window-managers/compiz "0.8.0")) {
inherit lib stringsWithDeps; inherit lib stringsWithDeps builderDefs;
inherit fetchurl stdenv pkgconfig libpng mesa perl perlXMLParser libxslt gettext inherit fetchurl stdenv pkgconfig libpng mesa perl perlXMLParser libxslt gettext
intltool binutils; intltool binutils;
inherit (xorg) libXcomposite libXfixes libXdamage libXrandr inherit (xorg) libXcomposite libXfixes libXdamage libXrandr

View file

@ -33,6 +33,23 @@ let
(pkgs.lib.getAttrFromPath path pkgs); (pkgs.lib.getAttrFromPath path pkgs);
in testOn job.systems getPkg); in testOn job.systems getPkg);
selectMaintained = attrSet: let
pairs = pkgs.lib.concatMap
(x: let val = processPackage (builtins.getAttr x attrSet); in
if val != [] then [{name=x; value=val;}] else [])
(builtins.attrNames attrSet);
in
builtins.listToAttrs pairs;
processPackage = attrSet:
if builtins.isAttrs attrSet then
if pkgs.lib.attrByPath ["recurseForDerivations"] false attrSet then
selectMaintained attrSet
else
if (pkgs.lib.attrByPath ["meta" "maintainers"] [] attrSet) != [] then
pkgs.lib.attrByPath ["meta" "platforms"] [] attrSet
else []
else [];
/* Common platform groups on which to test packages. */ /* Common platform groups on which to test packages. */
linux = ["i686-linux" "x86_64-linux"]; linux = ["i686-linux" "x86_64-linux"];
darwin = ["i686-darwin"]; darwin = ["i686-darwin"];
@ -49,7 +66,7 @@ in {
tarball = import ./make-tarball.nix; tarball = import ./make-tarball.nix;
} // mapTestOn rec { } // (mapTestOn ((selectMaintained pkgs) // rec {
MPlayer = linux; MPlayer = linux;
abcde = linux; abcde = linux;
@ -582,4 +599,4 @@ in {
xset = linux; xset = linux;
}; };
} } ))