summary refs log tree commit diff
path: root/pkgs/top-level/all-packages.nix
diff options
context:
space:
mode:
authorEelco Dolstra <eelco.dolstra@logicblox.com>2007-11-26 13:24:56 +0000
committerEelco Dolstra <eelco.dolstra@logicblox.com>2007-11-26 13:24:56 +0000
commitc54b75c9593b115bf3f07cae3dd1a3e2c75a055a (patch)
tree3906501e320becbb583a5fa85be926f26511318f /pkgs/top-level/all-packages.nix
parentd794ae6cbc5d7bd1a77817256e89771bf962e833 (diff)
downloadnixpkgs-c54b75c9593b115bf3f07cae3dd1a3e2c75a055a.tar
nixpkgs-c54b75c9593b115bf3f07cae3dd1a3e2c75a055a.tar.gz
nixpkgs-c54b75c9593b115bf3f07cae3dd1a3e2c75a055a.tar.bz2
nixpkgs-c54b75c9593b115bf3f07cae3dd1a3e2c75a055a.tar.lz
nixpkgs-c54b75c9593b115bf3f07cae3dd1a3e2c75a055a.tar.xz
nixpkgs-c54b75c9593b115bf3f07cae3dd1a3e2c75a055a.tar.zst
nixpkgs-c54b75c9593b115bf3f07cae3dd1a3e2c75a055a.zip
* Get rid of the `(import (__toPath ((toString
  ./JustNothing/.. )+"/"+args.version+".nix")))' hack, you can also just
  write `import (./path/to/pkg + "/${version}.nix)'.

svn path=/nixpkgs/trunk/; revision=9792
Diffstat (limited to 'pkgs/top-level/all-packages.nix')
-rw-r--r--pkgs/top-level/all-packages.nix87
1 files changed, 42 insertions, 45 deletions
diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix
index 8020e628a62..b120869d75e 100644
--- a/pkgs/top-level/all-packages.nix
+++ b/pkgs/top-level/all-packages.nix
@@ -228,6 +228,12 @@ rec {
 		inherit stdenv lib;
 	};
 
+  # Call a specific version of a Nix expression, that is,
+  # `selectVersion ./foo {version = "0.1.2"; args...}' evaluates to
+  # `import ./foo/0.1.2.nix args'.
+  selectVersion = dir: args: import (dir + "/${args.version}.nix") args;
+        
+        
   ### STANDARD ENVIRONMENT
 
 
@@ -1222,16 +1228,14 @@ rec {
     inherit fetchurl stdenv zlib bzip2;
   };
 
-  pyrexFun = lib.sumArgs (import ../development/interpreters/pyrex) {
-  	inherit fetchurl stdenv stringsWithDeps lib builderDefs;
-	python = python_alts.v_2_5;
+  pyrexFun = lib.sumArgs (selectVersion ../development/interpreters/pyrex) {
+    inherit fetchurl stdenv stringsWithDeps lib builderDefs;
+    python = python_alts.v_2_5;
   };
 
-  pyrex = pyrexFun {
-  	version = "0.9.6";
-  } null;
+  pyrex = pyrexFun {version = "0.9.6";} null;
 
-  QiFun = lib.sumArgs (import ../development/compilers/qi) {
+  QiFun = lib.sumArgs (selectVersion ../development/compilers/qi) {
     inherit clisp stdenv fetchurl builderDefs unzip;
   };
 
@@ -1414,7 +1418,7 @@ rec {
     inherit fetchurl stdenv perl perlXMLSimple;
   };
 
-  indentFun = import ../development/tools/misc/indent {
+  indentFun = lib.sumArgs (selectVersion ../development/tools/misc/indent) {
     inherit fetchurl stdenv builderDefs;
   };
 
@@ -1904,9 +1908,9 @@ rec {
     inherit fetchurl stdenv x11 libjpeg libtiff libungif libpng bzip2;
   };
 
-  intltoolFun = lib.sumArgs (import ../development/tools/misc/intltool) {
-  	inherit fetchurl stdenv lib builderDefs stringsWithDeps
-		perl perlXMLParser;
+  intltoolFun = lib.sumArgs (selectVersion ../development/tools/misc/intltool) {
+    inherit fetchurl stdenv lib builderDefs stringsWithDeps
+      perl perlXMLParser;
   };
 
   intltool = intltoolFun {version = "0.36.2";} null;
@@ -3581,10 +3585,9 @@ rec {
       libXinerama libICE libSM libXrender xextproto;
     inherit (gnome) startupnotification libwnck GConf;
     inherit (gtkLibs) gtk;
-    inherit (gnome) libgnome libgnomeui metacity
-	      glib pango libglade libgtkhtml gtkhtml
-              libgnomecanvas libgnomeprint
-              libgnomeprintui gnomepanel;
+    inherit (gnome) libgnome libgnomeui metacity glib pango
+      libglade libgtkhtml gtkhtml libgnomecanvas libgnomeprint
+      libgnomeprintui gnomepanel;
     gnomegtk = gnome.gtk;
     inherit librsvg fuse;
   };
@@ -3593,17 +3596,17 @@ rec {
     version = "0.6.2";
   };
 
-  compizFun = lib.sumArgs (assert mesaSupported; import ../applications/window-managers/compiz) {
- 	inherit lib builderDefs stringsWithDeps;
+  compizFun = lib.sumArgs (assert mesaSupported; selectVersion ../applications/window-managers/compiz) {
+    inherit lib builderDefs stringsWithDeps;
     inherit fetchurl stdenv pkgconfig libpng mesa perl perlXMLParser libxslt;
     inherit (xorg) libXcomposite libXfixes libXdamage libXrandr
       libXinerama libICE libSM libXrender xextproto;
     inherit (gnome) startupnotification libwnck GConf;
     inherit (gtkLibs) gtk;
     inherit (gnome) libgnome libgnomeui metacity
-	      glib pango libglade libgtkhtml gtkhtml
-              libgnomecanvas libgnomeprint
-              libgnomeprintui gnomepanel;
+      glib pango libglade libgtkhtml gtkhtml
+      libgnomecanvas libgnomeprint
+      libgnomeprintui gnomepanel;
     gnomegtk = gnome.gtk;
     inherit librsvg fuse;
     inherit dbus dbus_glib;
@@ -3615,27 +3618,23 @@ rec {
   } null;
 
   compizFusion = assert mesaSupported; import ../applications/window-managers/compiz-fusion {
-
-  	version = getConfig ["compizFusion" "version"] "0.6.0" ;
-	inherit compiz;
-
-	inherit stringsWithDeps lib builderDefs;
-
+    version = getConfig ["compizFusion" "version"] "0.6.0";
+    inherit compiz;
+    inherit stringsWithDeps lib builderDefs;
     inherit fetchurl stdenv pkgconfig libpng mesa perl perlXMLParser libxslt;
     inherit (xorg) libXcomposite libXfixes libXdamage libXrandr
       libXinerama libICE libSM libXrender xextproto;
     inherit (gnome) startupnotification libwnck GConf;
     inherit (gtkLibs) gtk;
     inherit (gnome) libgnome libgnomeui metacity
-	      glib pango libglade libgtkhtml gtkhtml
-              libgnomecanvas libgnomeprint
-              libgnomeprintui gnomepanel gnomedesktop;
+      glib pango libglade libgtkhtml gtkhtml
+      libgnomecanvas libgnomeprint
+      libgnomeprintui gnomepanel gnomedesktop;
     gnomegtk = gnome.gtk;
     inherit librsvg fuse dbus dbus_glib git;
- 
- 	inherit automake autoconf libtool intltool python pyrex gettext;
-	inherit pygtk pycairo getopt libjpeg glxinfo;
-	inherit (xorg) xvinfo xdpyinfo;
+    inherit automake autoconf libtool intltool python pyrex gettext;
+    inherit pygtk pycairo getopt libjpeg glxinfo;
+    inherit (xorg) xvinfo xdpyinfo;
   };
   
   compizExtra = import ../applications/window-managers/compiz/extra.nix {
@@ -3727,7 +3726,7 @@ rec {
     xftSupport = true;
   };
 
-  fbpanelFun = lib.sumArgs (import ../applications/window-managers/fbpanel) {
+  fbpanelFun = lib.sumArgs (selectVersion ../applications/window-managers/fbpanel) {
     inherit fetchurl stdenv builderDefs pkgconfig libpng libjpeg libtiff librsvg;
     inherit (gtkLibs) gtk;
     inherit (xlibs) libX11 libXmu libXpm;
@@ -3829,13 +3828,11 @@ rec {
     inherit (xlibs) libX11 libXext libXi libXmu;
   };
 
-  gocrFun = lib.sumArgs (import ../applications/graphics/gocr) {
-  	inherit builderDefs fetchurl stdenv;
+  gocrFun = lib.sumArgs (selectVersion ../applications/graphics/gocr) {
+    inherit builderDefs fetchurl stdenv;
   };
 
-  gocr = gocrFun {
-  	version	= "0.44";
-  } null;
+  gocr = gocrFun {version = "0.44";} null;
 
   gphoto2 = import ../applications/misc/gphoto2 {
     inherit fetchurl stdenv pkgconfig libgphoto2 libexif popt readline gettext;
@@ -4340,17 +4337,17 @@ rec {
     base14Fonts = "${ghostscript}/share/ghostscript/fonts";
   };
 
-  xscreensaverFun = import ../applications/graphics/xscreensaver {
+  xscreensaverFun = lib.sumArgs (selectVersion ../applications/graphics/xscreensaver) {
     inherit stdenv fetchurl builderDefs lib pkgconfig bc perl intltool;
     inherit (xlibs) libX11 libXmu;
   };
 
   xscreensaver = xscreensaverFun {
-  	version = "5.04";
-	flags = ["GL" "gdkpixbuf" "DPMS" "gui" "jpeg"];
-	inherit mesa libxml2 libjpeg;
-	inherit (gtkLibs) gtk;
-	inherit (gnome) libglade;
+    version = "5.04";
+    flags = ["GL" "gdkpixbuf" "DPMS" "gui" "jpeg"];
+    inherit mesa libxml2 libjpeg;
+    inherit (gtkLibs) gtk;
+    inherit (gnome) libglade;
   } null;
 
   xterm = import ../applications/misc/xterm {