summary refs log tree commit diff
path: root/pkgs
diff options
context:
space:
mode:
authorMichael Raskin <7c6f434c@mail.ru>2009-08-25 05:46:48 +0000
committerMichael Raskin <7c6f434c@mail.ru>2009-08-25 05:46:48 +0000
commitfeed5f087fd46b80e776e4c5536f3c36841146b1 (patch)
tree9e1262367fc528a9e2de6fb1da845b1904b3c501 /pkgs
parent4ba8f74591b0f6b0a1de616129509bf7ebb04ada (diff)
Try selecting packages to build based on their being maintained
svn path=/nixpkgs/trunk/; revision=16844
Diffstat (limited to 'pkgs')
-rw-r--r--pkgs/applications/misc/gphoto2/gphotofs.nix3
-rw-r--r--pkgs/top-level/all-packages.nix72
-rw-r--r--pkgs/top-level/release.nix21
3 files changed, 65 insertions, 31 deletions
diff --git a/pkgs/applications/misc/gphoto2/gphotofs.nix b/pkgs/applications/misc/gphoto2/gphotofs.nix
index 767c8078e97f8..dc760b8e80b94 100644
--- a/pkgs/applications/misc/gphoto2/gphotofs.nix
+++ b/pkgs/applications/misc/gphoto2/gphotofs.nix
@@ -26,5 +26,8 @@ rec {
     maintainers = [
       a.lib.maintainers.raskin
     ];
+    platforms = [
+      "i686-linux" "x86_64-linux"
+    ];
   };
 }
diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix
index 664113504eefb..4f1a6634e5881 100644
--- a/pkgs/top-level/all-packages.nix
+++ b/pkgs/top-level/all-packages.nix
@@ -190,6 +190,10 @@ let
         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
 
@@ -1704,10 +1708,14 @@ let
     profiledCompiler = true;
   });
 
-  gccApple = wrapGCC (import ../development/compilers/gcc-apple {
-    inherit fetchurl stdenv noSysDirs;
-    profiledCompiler = true;
-  });
+  gccApple = (condPackage stdenv.isDarwin 
+    (wrapGCC (import ../development/compilers/gcc-apple {
+      inherit fetchurl stdenv noSysDirs;
+      profiledCompiler = true;
+    }))) // {
+      meta.platforms = ["i686-darwin"];
+      meta.maintainers = [];
+    };
 
   gccupc40 = wrapGCCUPC (import ../development/compilers/gcc-upc-4.0 {
     inherit fetchurl stdenv bison autoconf gnum4 noSysDirs;
@@ -2042,17 +2050,17 @@ let
     inherit fetchurl stdenv perl texinfo;
   };
 
-  visualcpp = import ../development/compilers/visual-c++ {
+  visualcpp = platformPackage ["i686-cygwin"] (import ../development/compilers/visual-c++ {
     inherit fetchurl stdenv cabextract;
-  };
+  });
 
   webdsl = import ../development/compilers/webdsl {
     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;
-  };
+  });
 
   wrapGCCWith = gccWrapper: glibc: baseGCC: gccWrapper {
     nativeTools = stdenv ? gcc && stdenv.gcc.nativeTools;
@@ -3142,26 +3150,28 @@ let
   };
 
   glibc_multi =
-    assert system == "x86_64-linux";
-    runCommand "${glibc.name}-multi"
-      { glibc64 = glibc;
-        glibc32 = (import ./all-packages.nix {system = "i686-linux";}).glibc;
-      }
-      ''
-        ensureDir $out
-        ln -s $glibc64/* $out/
-
-        rm $out/lib $out/lib64
-        ensureDir $out/lib
-        ln -s $glibc64/lib/* $out/lib
-        ln -s $glibc32/lib $out/lib/32
-        ln -s lib $out/lib64
-
-        rm $out/include
-        cp -rs $glibc32/include $out
-        chmod -R u+w $out/include
-        cp -rsf $glibc64/include $out
-      ''; # */
+    let package = (
+      runCommand "${glibc.name}-multi"
+        { glibc64 = glibc;
+          glibc32 = (import ./all-packages.nix {system = "i686-linux";}).glibc;
+        }
+        ''
+          ensureDir $out
+          ln -s $glibc64/* $out/
+
+          rm $out/lib $out/lib64
+          ensureDir $out/lib
+          ln -s $glibc64/lib/* $out/lib
+          ln -s $glibc32/lib $out/lib/32
+          ln -s lib $out/lib64
+
+          rm $out/include
+          cp -rs $glibc32/include $out
+          chmod -R u+w $out/include
+          cp -rsf $glibc64/include $out
+        '' # */
+        );
+    in platformPackage ["x86_64-linux"] package;
 
   gmime = import ../development/libraries/gmime {
     inherit fetchurl stdenv pkgconfig zlib;
@@ -4741,6 +4751,9 @@ let
     inherit stdenv fetchurl alsaLib gettext ncurses;
   };
 
+  /*
+  # Will maybe move to kernelPackages properly later.
+
   blcr = builderDefsPackage (selectVersion ../os-specific/linux/blcr "0.6.5"){
     inherit perl;
   };
@@ -4748,6 +4761,7 @@ let
   blcrCurrent = kernel : (blcr.passthru.function {
     inherit kernel;
   });
+  */
 
   bluez = import ../os-specific/linux/bluez {
     inherit fetchurl stdenv pkgconfig dbus libusb alsaLib;
@@ -6044,7 +6058,7 @@ let
   };
 
   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
       intltool binutils;
     inherit (xorg) libXcomposite libXfixes libXdamage libXrandr
diff --git a/pkgs/top-level/release.nix b/pkgs/top-level/release.nix
index c5e00663cf960..2bc07b483ccb1 100644
--- a/pkgs/top-level/release.nix
+++ b/pkgs/top-level/release.nix
@@ -33,6 +33,23 @@ let
           (pkgs.lib.getAttrFromPath path pkgs);
       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. */
   linux = ["i686-linux" "x86_64-linux"];
   darwin = ["i686-darwin"];
@@ -49,7 +66,7 @@ in {
 
   tarball = import ./make-tarball.nix;
 
-} // mapTestOn rec {
+} // (mapTestOn ((selectMaintained pkgs) // rec {
 
   MPlayer = linux;
   abcde = linux;
@@ -582,4 +599,4 @@ in {
     xset = linux;
   };
 
-}
+} ))