diff --git a/pkgs/applications/graphics/gocr/default.nix b/pkgs/applications/graphics/gocr/default.nix deleted file mode 100644 index c8e4bcf9545..00000000000 --- a/pkgs/applications/graphics/gocr/default.nix +++ /dev/null @@ -1,2 +0,0 @@ -args : -(import (__toPath ((toString ./JustNothing/.. )+"/"+args.version+".nix"))) args diff --git a/pkgs/applications/graphics/xscreensaver/default.nix b/pkgs/applications/graphics/xscreensaver/default.nix deleted file mode 100644 index 2fd30577441..00000000000 --- a/pkgs/applications/graphics/xscreensaver/default.nix +++ /dev/null @@ -1,9 +0,0 @@ -let - realPath=y: (__toPath ((toString ./JustNothing/.. )+"/"+y.version+".nix")); - dispatch=(x: ((import (realPath x)) x)); -in -args : -with args; -with builderDefs {src="";} null; -let eater=(lib.sumArgs dispatch args); in -eater diff --git a/pkgs/applications/window-managers/compiz-fusion/bcop/default.nix b/pkgs/applications/window-managers/compiz-fusion/bcop/default.nix deleted file mode 100644 index c8e4bcf9545..00000000000 --- a/pkgs/applications/window-managers/compiz-fusion/bcop/default.nix +++ /dev/null @@ -1,2 +0,0 @@ -args : -(import (__toPath ((toString ./JustNothing/.. )+"/"+args.version+".nix"))) args diff --git a/pkgs/applications/window-managers/compiz-fusion/ccsm/default.nix b/pkgs/applications/window-managers/compiz-fusion/ccsm/default.nix deleted file mode 100644 index c8e4bcf9545..00000000000 --- a/pkgs/applications/window-managers/compiz-fusion/ccsm/default.nix +++ /dev/null @@ -1,2 +0,0 @@ -args : -(import (__toPath ((toString ./JustNothing/.. )+"/"+args.version+".nix"))) args diff --git a/pkgs/applications/window-managers/compiz-fusion/compiz-manager/default.nix b/pkgs/applications/window-managers/compiz-fusion/compiz-manager/default.nix deleted file mode 100644 index c8e4bcf9545..00000000000 --- a/pkgs/applications/window-managers/compiz-fusion/compiz-manager/default.nix +++ /dev/null @@ -1,2 +0,0 @@ -args : -(import (__toPath ((toString ./JustNothing/.. )+"/"+args.version+".nix"))) args diff --git a/pkgs/applications/window-managers/compiz-fusion/compizconfig-python/default.nix b/pkgs/applications/window-managers/compiz-fusion/compizconfig-python/default.nix deleted file mode 100644 index c8e4bcf9545..00000000000 --- a/pkgs/applications/window-managers/compiz-fusion/compizconfig-python/default.nix +++ /dev/null @@ -1,2 +0,0 @@ -args : -(import (__toPath ((toString ./JustNothing/.. )+"/"+args.version+".nix"))) args diff --git a/pkgs/applications/window-managers/compiz-fusion/config-backend/default.nix b/pkgs/applications/window-managers/compiz-fusion/config-backend/default.nix deleted file mode 100644 index c8e4bcf9545..00000000000 --- a/pkgs/applications/window-managers/compiz-fusion/config-backend/default.nix +++ /dev/null @@ -1,2 +0,0 @@ -args : -(import (__toPath ((toString ./JustNothing/.. )+"/"+args.version+".nix"))) args diff --git a/pkgs/applications/window-managers/compiz-fusion/default.nix b/pkgs/applications/window-managers/compiz-fusion/default.nix index 156d3d281d7..589b77d0f23 100644 --- a/pkgs/applications/window-managers/compiz-fusion/default.nix +++ b/pkgs/applications/window-managers/compiz-fusion/default.nix @@ -1,13 +1,14 @@ args : with args; rec { - bcop = import ./bcop args; - libcompizconfig = import ./libcompizconfig (args // {inherit bcop;}); - configBackendGConf = import ./config-backend (args // {inherit bcop libcompizconfig;}); - compizConfigPython = import ./compizconfig-python (args // {inherit libcompizconfig + selectVersion = dir: import (dir + "/${args.version}.nix"); + bcop = selectVersion ./bcop args; + libcompizconfig = selectVersion ./libcompizconfig (args // {inherit bcop;}); + configBackendGConf = selectVersion ./config-backend (args // {inherit bcop libcompizconfig;}); + compizConfigPython = selectVersion ./compizconfig-python (args // {inherit libcompizconfig bcop pyrex configBackendGConf;}); - ccsm = import ./ccsm (args // {inherit libcompizconfig bcop compizConfigPython configBackendGConf;}); - pluginsMain = import ./main (args //{inherit bcop ;}); - pluginsExtra = import ./extra (args //{inherit bcop pluginsMain;}); - compizManager = import ./compiz-manager (args // {inherit bcop ccsm;}); + ccsm = selectVersion ./ccsm (args // {inherit libcompizconfig bcop compizConfigPython configBackendGConf;}); + pluginsMain = selectVersion ./main (args //{inherit bcop ;}); + pluginsExtra = selectVersion ./extra (args //{inherit bcop pluginsMain;}); + compizManager = selectVersion ./compiz-manager (args // {inherit bcop ccsm;}); } diff --git a/pkgs/applications/window-managers/compiz-fusion/extra/default.nix b/pkgs/applications/window-managers/compiz-fusion/extra/default.nix deleted file mode 100644 index c8e4bcf9545..00000000000 --- a/pkgs/applications/window-managers/compiz-fusion/extra/default.nix +++ /dev/null @@ -1,2 +0,0 @@ -args : -(import (__toPath ((toString ./JustNothing/.. )+"/"+args.version+".nix"))) args diff --git a/pkgs/applications/window-managers/compiz-fusion/libcompizconfig/default.nix b/pkgs/applications/window-managers/compiz-fusion/libcompizconfig/default.nix deleted file mode 100644 index c8e4bcf9545..00000000000 --- a/pkgs/applications/window-managers/compiz-fusion/libcompizconfig/default.nix +++ /dev/null @@ -1,2 +0,0 @@ -args : -(import (__toPath ((toString ./JustNothing/.. )+"/"+args.version+".nix"))) args diff --git a/pkgs/applications/window-managers/compiz-fusion/main/default.nix b/pkgs/applications/window-managers/compiz-fusion/main/default.nix deleted file mode 100644 index c8e4bcf9545..00000000000 --- a/pkgs/applications/window-managers/compiz-fusion/main/default.nix +++ /dev/null @@ -1,2 +0,0 @@ -args : -(import (__toPath ((toString ./JustNothing/.. )+"/"+args.version+".nix"))) args diff --git a/pkgs/applications/window-managers/compiz/default.nix b/pkgs/applications/window-managers/compiz/default.nix deleted file mode 100644 index c8e4bcf9545..00000000000 --- a/pkgs/applications/window-managers/compiz/default.nix +++ /dev/null @@ -1,2 +0,0 @@ -args : -(import (__toPath ((toString ./JustNothing/.. )+"/"+args.version+".nix"))) args diff --git a/pkgs/applications/window-managers/fbpanel/default.nix b/pkgs/applications/window-managers/fbpanel/default.nix deleted file mode 100644 index c8e4bcf9545..00000000000 --- a/pkgs/applications/window-managers/fbpanel/default.nix +++ /dev/null @@ -1,2 +0,0 @@ -args : -(import (__toPath ((toString ./JustNothing/.. )+"/"+args.version+".nix"))) args diff --git a/pkgs/development/compilers/qi/default.nix b/pkgs/development/compilers/qi/default.nix deleted file mode 100644 index c8e4bcf9545..00000000000 --- a/pkgs/development/compilers/qi/default.nix +++ /dev/null @@ -1,2 +0,0 @@ -args : -(import (__toPath ((toString ./JustNothing/.. )+"/"+args.version+".nix"))) args diff --git a/pkgs/development/interpreters/pyrex/default.nix b/pkgs/development/interpreters/pyrex/default.nix deleted file mode 100644 index c8e4bcf9545..00000000000 --- a/pkgs/development/interpreters/pyrex/default.nix +++ /dev/null @@ -1,2 +0,0 @@ -args : -(import (__toPath ((toString ./JustNothing/.. )+"/"+args.version+".nix"))) args diff --git a/pkgs/development/tools/misc/indent/default.nix b/pkgs/development/tools/misc/indent/default.nix deleted file mode 100644 index 2fd30577441..00000000000 --- a/pkgs/development/tools/misc/indent/default.nix +++ /dev/null @@ -1,9 +0,0 @@ -let - realPath=y: (__toPath ((toString ./JustNothing/.. )+"/"+y.version+".nix")); - dispatch=(x: ((import (realPath x)) x)); -in -args : -with args; -with builderDefs {src="";} null; -let eater=(lib.sumArgs dispatch args); in -eater diff --git a/pkgs/development/tools/misc/intltool/default.nix b/pkgs/development/tools/misc/intltool/default.nix deleted file mode 100644 index c8e4bcf9545..00000000000 --- a/pkgs/development/tools/misc/intltool/default.nix +++ /dev/null @@ -1,2 +0,0 @@ -args : -(import (__toPath ((toString ./JustNothing/.. )+"/"+args.version+".nix"))) args 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 { diff --git a/pkgs/top-level/version-stub.nix b/pkgs/top-level/version-stub.nix deleted file mode 100644 index 2fd30577441..00000000000 --- a/pkgs/top-level/version-stub.nix +++ /dev/null @@ -1,9 +0,0 @@ -let - realPath=y: (__toPath ((toString ./JustNothing/.. )+"/"+y.version+".nix")); - dispatch=(x: ((import (realPath x)) x)); -in -args : -with args; -with builderDefs {src="";} null; -let eater=(lib.sumArgs dispatch args); in -eater