Add HOL Light and its dependencies.
[nixpkgs-libre.git] / pkgs / top-level / all-packages.nix
blobd9f00ae81b4b22c5092818d470c162137a4f86d0
1 /* This file composes the Nix Packages collection.  That is, it
2    imports the functions that build the various packages, and calls
3    them with appropriate arguments.  The result is a set of all the
4    packages in the Nix Packages collection for some particular
5    platform.
7    You want to get to know where to add a new package ?
8    Have a look at nixpkgs/maintainers/docs/classification.txt */
11 { # The system (e.g., `i686-linux') for which to build the packages.
12   system ? builtins.currentSystem
14   # Usually, the system type uniquely determines the stdenv and thus
15   # how to build the packages.  But on some platforms we have
16   # different stdenvs, leading to different ways to build the
17   # packages.  For instance, on Windows we support both Cygwin and
18   # Mingw builds.  In both cases, `system' is `i686-cygwin'.  The
19   # attribute `stdenvType' is used to select the specific kind of
20   # stdenv to use, e.g., `i686-mingw'.
21 , stdenvType ? system
23 , # The standard environment to use.  Only used for bootstrapping.  If
24   # null, the default standard environment is used.
25   bootStdenv ? null
27   # More flags for the bootstrapping of stdenv.
28 , noSysDirs ? true
29 , gccWithCC ? true
30 , gccWithProfiling ? true
32 , # Allow a configuration attribute set to be passed in as an
33   # argument.  Otherwise, it's read from $NIXPKGS_CONFIG or
34   # ~/.nixpkgs/config.nix.
35   config ? null
37 , crossSystem ? null
41 let config_ = config; in # rename the function argument
43 let
45   lib = import ../lib; # see also libTests below
47   # The contents of the configuration file found at $NIXPKGS_CONFIG or
48   # $HOME/.nixpkgs/config.nix.
49   # for NIXOS (nixos-rebuild): use nixpkgs.config option
50   config =
51     let
52       toPath = builtins.toPath;
53       getEnv = x: if builtins ? getEnv then builtins.getEnv x else "";
54       pathExists = name:
55         builtins ? pathExists && builtins.pathExists (toPath name);
57       configFile = getEnv "NIXPKGS_CONFIG";
58       homeDir = getEnv "HOME";
59       configFile2 = homeDir + "/.nixpkgs/config.nix";
61       configExpr =
62         if config_ != null then config_
63         else if configFile != "" && pathExists configFile then import (toPath configFile)
64         else if homeDir != "" && pathExists configFile2 then import (toPath configFile2)
65         else {};
67     in
68       # allow both:
69       # { /* the config */ } and
70       # { pkgsOrig, pkgs, ... } : { /* the config */ }
71       if builtins.isFunction configExpr
72         then configExpr { inherit pkgs pkgsOrig; }
73         else configExpr;
75   # Return an attribute from the Nixpkgs configuration file, or
76   # a default value if the attribute doesn't exist.
77   getConfig = attrPath: default: lib.attrByPath attrPath default config;
80   # Helper functions that are exported through `pkgs'.
81   helperFunctions =
82     stdenvAdapters //
83     (import ../build-support/trivial-builders.nix { inherit (pkgs) stdenv; inherit (pkgs.xorg) lndir; });
85   stdenvAdapters =
86     import ../stdenv/adapters.nix { inherit (pkgs) dietlibc fetchurl runCommand; };
89   # Allow packages to be overriden globally via the `packageOverrides'
90   # configuration option, which must be a function that takes `pkgs'
91   # as an argument and returns a set of new or overriden packages.
92   # `__overrides' is a magic attribute that causes the attributes in
93   # its value to be added to the surrounding `rec'.  The
94   # `packageOverrides' function is called with the *original*
95   # (un-overriden) set of packages, allowing packageOverrides
96   # attributes to refer to the original attributes (e.g. "foo =
97   # ... pkgs.foo ...").
98   __overrides = (getConfig ["packageOverrides"] (pkgs: {})) pkgsOrig;
100   pkgsOrig = pkgsFun {}; # the un-overriden packages, passed to packageOverrides
101   pkgsOverriden = pkgsFun __overrides; # the overriden, final packages
102   pkgs = pkgsOverriden // helperFunctions;
105   # The package compositions.  Yes, this isn't properly indented.
106   pkgsFun = __overrides: with helperFunctions; rec {
108   # override system. This is useful to build i686 packages on x86_64-linux
109   forceSystem = system: (import ./all-packages.nix) {
110     inherit system;
111     inherit bootStdenv noSysDirs gccWithCC gccWithProfiling config;
112   };
114   # used by wine, firefox with debugging version of Flash, ..
115   pkgsi686Linux = forceSystem "i686-linux";
117   inherit __overrides;
120   # For convenience, allow callers to get the path to Nixpkgs.
121   path = ../..;
124   ### Symbolic names.
127   x11 = xlibsWrapper;
129   # `xlibs' is the set of X library components.  This used to be the
130   # old modular X libraries project (called `xlibs') but now it's just
131   # the set of packages in the modular X.org tree (which also includes
132   # non-library components like the server, drivers, fonts, etc.).
133   xlibs = xorg // {xlibs = xlibsWrapper;};
136   ### Helper functions.
139   inherit lib config getConfig stdenvAdapters;
141   inherit (lib) lowPrio appendToName makeOverridable;
143   # Applying this to an attribute set will cause nix-env to look
144   # inside the set for derivations.
145   recurseIntoAttrs = attrs: attrs // {recurseForDerivations = true;};
147   useFromStdenv = it : alternative : if ((bootStdenv != null ||
148     crossSystem == null) && builtins.hasAttr it stdenv) then
149     (builtins.getAttr it stdenv) else alternative;
151   # Return the first available value in the order: pkg.val, val, or default.
152   getPkgConfig = pkg : val : default : (getConfig [ pkg val ] (getConfig [ val ] default));
154   # Check absence of non-used options
155   checker = x: flag: opts: config:
156     (if flag then let result=(
157       (import ../build-support/checker)
158       opts config); in
159       (if (result=="") then x else
160       abort ("Unknown option specified: " + result))
161     else x);
163   builderDefs = composedArgsAndFun (import ../build-support/builder-defs/builder-defs.nix) {
164     inherit stringsWithDeps lib stdenv writeScript
165       fetchurl fetchmtn fetchgit;
166   };
168   composedArgsAndFun = lib.composedArgsAndFun;
170   builderDefsPackage = builderDefs.builderDefsPackage builderDefs;
172   stringsWithDeps = lib.stringsWithDeps;
175   ### STANDARD ENVIRONMENT
178   allStdenvs = import ../stdenv {
179     inherit system stdenvType;
180     allPackages = args: import ./all-packages.nix ({ inherit config; } // args);
181   };
183   defaultStdenv = allStdenvs.stdenv;
185   stdenvCross = makeStdenvCross defaultStdenv crossSystem (binutilsCross crossSystem)
186     (gccCrossStageFinal crossSystem);
188   stdenv =
189     if bootStdenv != null then bootStdenv else
190       let changer = getConfig ["replaceStdenv"] null;
191       in if changer != null then
192         changer {
193           stdenv = stdenvCross;
194           overrideSetup = overrideSetup;
195         }
196       else if crossSystem != null then
197         stdenvCross
198       else
199         defaultStdenv;
201   forceBuildDrv = drv : if (crossSystem == null) then drv else
202     (drv // { hostDrv = drv.buildDrv; });
204   # A stdenv capable of building 32-bit binaries.  On x86_64-linux,
205   # it uses GCC compiled with multilib support; on i686-linux, it's
206   # just the plain stdenv.
207   stdenv_32bit =
208     if system == "x86_64-linux" then
209       overrideGCC stdenv gcc43_multi
210     else
211       stdenv;
213   ### BUILD SUPPORT
215   attrSetToDir = arg : import ../build-support/upstream-updater/attrset-to-dir.nix {
216     inherit writeTextFile stdenv lib;
217     theAttrSet = arg;
218   };
220   buildEnv = import ../build-support/buildenv {
221     inherit stdenv perl;
222   };
224   debPackage = {
225     debBuild = lib.sumTwoArgs(import ../build-support/deb-package) {
226       inherit builderDefs;
227     };
228     inherit fetchurl stdenv;
229   };
231   fetchbzr = import ../build-support/fetchbzr {
232     inherit stdenv bazaar;
233   };
235   fetchcvs = import ../build-support/fetchcvs {
236     inherit stdenv cvs;
237   };
239   fetchdarcs = import ../build-support/fetchdarcs {
240     inherit stdenv darcs nix;
241   };
243   fetchgit = import ../build-support/fetchgit {
244     inherit stdenv git;
245   };
247   fetchmtn = import ../build-support/fetchmtn {
248     inherit monotone stdenv;
249     cacheDB = getConfig ["fetchmtn" "cacheDB"] "";
250     defaultDBMirrors = getConfig ["fetchmtn" "defaultDBMirrors"] [];
251   };
253   fetchsvn = import ../build-support/fetchsvn {
254     inherit stdenv subversion openssh;
255     sshSupport = true;
256   };
258   fetchsvnssh = import ../build-support/fetchsvnssh {
259     inherit stdenv subversion openssh expect;
260     sshSupport = true;
261   };
263   fetchhg = import ../build-support/fetchhg {
264     inherit stdenv mercurial nix;
265   };
267   # `fetchurl' downloads a file from the network.  The `useFromStdenv'
268   # is there to allow stdenv to determine fetchurl.  Used during the
269   # stdenv-linux bootstrap phases to prevent lots of different curls
270   # from being built.
271   fetchurl = useFromStdenv "fetchurl"
272     (import ../build-support/fetchurl {
273       curl = curl;
274       stdenv = stdenv;
275     });
277   # fetchurlBoot is used for curl and its dependencies in order to
278   # prevent a cyclic dependency (curl depends on curl.tar.bz2,
279   # curl.tar.bz2 depends on fetchurl, fetchurl depends on curl).  It
280   # uses the curl from the previous bootstrap phase (e.g. a statically
281   # linked curl in the case of stdenv-linux).
282   fetchurlBoot = stdenv.fetchurlBoot;
284   resolveMirrorURLs = {url}: fetchurl {
285     showURLs = true;
286     inherit url;
287   };
289   makeDesktopItem = import ../build-support/make-desktopitem {
290     inherit stdenv;
291   };
293   makeInitrd = {contents}: import ../build-support/kernel/make-initrd.nix {
294     inherit stdenv perl cpio contents platform;
295   };
297   makeWrapper = makeSetupHook ../build-support/make-wrapper/make-wrapper.sh;
299   makeModulesClosure = {kernel, rootModules, allowMissing ? false}:
300     import ../build-support/kernel/modules-closure.nix {
301       inherit stdenv module_init_tools kernel nukeReferences
302         rootModules allowMissing;
303     };
305   pathsFromGraph = ../build-support/kernel/paths-from-graph.pl;
307   srcOnly = args: (import ../build-support/src-only) ({inherit stdenv; } // args);
309   substituteAll = import ../build-support/substitute/substitute-all.nix {
310     inherit stdenv;
311   };
313   nukeReferences = import ../build-support/nuke-references/default.nix {
314     inherit stdenv;
315   };
317   vmTools = import ../build-support/vm/default.nix {
318     inherit pkgs;
319   };
321   releaseTools = import ../build-support/release/default.nix {
322     inherit pkgs;
323   };
325   composableDerivation = (import ../lib/composable-derivation.nix) {
326     inherit pkgs lib;
327   };
329   platforms = import ./platforms.nix {
330     inherit system pkgs;
331   };
333   platform = platforms.pc;
335   ### TOOLS
337   acct = import ../tools/system/acct {
338     inherit fetchurl stdenv;
339   };
341   aefs = import ../tools/filesystems/aefs {
342     inherit fetchurl stdenv fuse;
343   };
345   aircrackng = import ../tools/networking/aircrack-ng {
346     inherit fetchurl stdenv libpcap openssl zlib wirelesstools;
347   };
349   ec2apitools = import ../tools/virtualization/amazon-ec2-api-tools {
350     inherit stdenv fetchurl unzip makeWrapper jre;
351   };
353   ec2amitools = import ../tools/virtualization/amazon-ec2-ami-tools {
354     inherit stdenv fetchurl unzip makeWrapper ruby openssl;
355   };
357   amule = import ../tools/networking/p2p/amule {
358     inherit fetchurl stdenv zlib perl cryptopp gettext libupnp makeWrapper;
359     inherit wxGTK;
360   };
362   aria = builderDefsPackage (import ../tools/networking/aria) {
363   };
365   at = import ../tools/system/at {
366     inherit fetchurl stdenv bison flex pam ssmtp;
367   };
369   autogen = import ../development/tools/misc/autogen {
370     inherit fetchurl stdenv guile which;
371   };
373   autojump = import ../tools/misc/autojump {
374     inherit fetchurl stdenv python;
375   };
377   avahi =
378     let qt4Support = getConfig [ "avahi" "qt4Support" ] false;
379     in
380       makeOverridable (import ../development/libraries/avahi) {
381         inherit stdenv fetchurl pkgconfig libdaemon dbus perl perlXMLParser
382           expat gettext intltool lib;
383         inherit (gtkLibs) glib gtk;
384         inherit qt4Support;
385         qt4 = if qt4Support then qt4 else null;
386       };
388   axel = import ../tools/networking/axel {
389     inherit fetchurl stdenv;
390   };
392   azureus = import ../tools/networking/p2p/azureus {
393     inherit fetchurl stdenv jdk swt;
394   };
396   bc = import ../tools/misc/bc {
397     inherit fetchurl stdenv flex readline;
398   };
400   bfr = import ../tools/misc/bfr {
401     inherit fetchurl stdenv perl;
402   };
404   bootchart = import ../tools/system/bootchart {
405     inherit fetchurl stdenv gnutar gzip coreutils utillinux gnugrep gnused psmisc nettools;
406   };
408   btrfsProgs = builderDefsPackage (import ../tools/filesystems/btrfsprogs) {
409     inherit libuuid zlib acl;
410   };
412   eggdrop = import ../tools/networking/eggdrop {
413     inherit fetchurl stdenv tcl;
414   };
416   mcrl = import ../tools/misc/mcrl {
417     inherit fetchurl stdenv coreutils;
418   };
420   mcrl2 = import ../tools/misc/mcrl2 {
421     inherit fetchurl stdenv mesa ;
422     inherit (xorg) libX11;
423     inherit wxGTK;
424   };
426   syslogng = import ../tools/misc/syslog-ng {
427     inherit fetchurl stdenv eventlog pkgconfig glib;
428   };
430   asciidoc = import ../tools/typesetting/asciidoc {
431     inherit fetchurl stdenv python;
432   };
434   bibtextools = import ../tools/typesetting/bibtex-tools {
435     inherit fetchurl stdenv aterm tetex hevea;
436     inherit (strategoPackages016) strategoxt sdf;
437   };
439   bittorrent = import ../tools/networking/p2p/bittorrent {
440     inherit fetchurl stdenv makeWrapper python pycrypto twisted;
441     wxPython = wxPython26;
442     gui = true;
443   };
445   bittornado = import ../tools/networking/p2p/bit-tornado {
446     inherit fetchurl stdenv python wxPython26;
447   };
449   bmrsa = builderDefsPackage (import ../tools/security/bmrsa/11.nix) {
450     inherit unzip;
451   };
453   bogofilter = import ../tools/misc/bogofilter {
454     inherit fetchurl stdenv flex;
455     bdb = db4;
456   };
458   bsdiff = import ../tools/compression/bsdiff {
459     inherit fetchurl stdenv;
460   };
462   bzip2 = useFromStdenv "bzip2"
463     (import ../tools/compression/bzip2 {
464       inherit fetchurl stdenv;
465     });
467   cabextract = import ../tools/archivers/cabextract {
468     inherit fetchurl stdenv;
469   };
471   ccid = import ../tools/security/ccid {
472     inherit fetchurl stdenv pcsclite libusb pkgconfig perl;
473   };
475   ccrypt = import ../tools/security/ccrypt {
476     inherit fetchurl stdenv;
477   };
479   cdecl = import ../development/tools/cdecl {
480     inherit fetchurl stdenv yacc flex readline ncurses;
481   };
483   cdrdao = import ../tools/cd-dvd/cdrdao {
484     inherit fetchurl stdenv lame libvorbis libmad pkgconfig libao;
485   };
487   cdrkit = import ../tools/cd-dvd/cdrkit {
488     inherit fetchurl stdenv cmake libcap zlib bzip2;
489   };
491   checkinstall = import ../tools/package-management/checkinstall {
492     inherit fetchurl stdenv gettext;
493   };
495   cheetahTemplate = builderDefsPackage (import ../tools/text/cheetah-template/2.0.1.nix) {
496     inherit makeWrapper python;
497   };
499   chkrootkit = import ../tools/security/chkrootkit {
500     inherit fetchurl stdenv;
501   };
503   cksfv = import ../tools/networking/cksfv {
504     inherit fetchurl stdenv;
505   };
507   convertlit = import ../tools/text/convertlit {
508     inherit fetchurl stdenv unzip libtommath;
509   };
511   unifdef = import ../development/tools/misc/unifdef {
512     inherit fetchurl stdenv;
513   };
515   cloogppl = import ../development/libraries/cloog-ppl {
516     inherit fetchurl stdenv ppl;
517   };
519   coreutils_real = makeOverridable (if stdenv ? isDietLibC
520       then import ../tools/misc/coreutils-5
521       else import ../tools/misc/coreutils)
522     {
523       inherit fetchurl stdenv acl perl gmp;
524       aclSupport = stdenv.isLinux;
525     };
527   coreutils = useFromStdenv "coreutils" coreutils_real;
529   cpio = import ../tools/archivers/cpio {
530     inherit fetchurl stdenv;
531   };
533   cromfs = import ../tools/archivers/cromfs {
534     inherit fetchurl stdenv pkgconfig fuse perl;
535   };
537   cron = import ../tools/system/cron { # see also fcron
538     inherit fetchurl stdenv;
539   };
541   curl = makeOverridable (import ../tools/networking/curl) {
542     fetchurl = fetchurlBoot;
543     inherit stdenv zlib openssl;
544     zlibSupport = ! ((stdenv ? isDietLibC) || (stdenv ? isStatic));
545     sslSupport = ! ((stdenv ? isDietLibC) || (stdenv ? isStatic));
546   };
548   curlftpfs = import ../tools/filesystems/curlftpfs {
549     inherit fetchurl stdenv fuse curl pkgconfig zlib glib;
550   };
552   dadadodo = builderDefsPackage (import ../tools/text/dadadodo) {
553   };
555   dar = import ../tools/archivers/dar {
556     inherit fetchurl stdenv zlib bzip2 openssl;
557   };
559   davfs2 = import ../tools/filesystems/davfs2 {
560     inherit fetchurl stdenv zlib;
561     neon = neon028;
562   };
564   dcraw = import ../tools/graphics/dcraw {
565     inherit fetchurl stdenv gettext libjpeg lcms;
566   };
568   debootstrap = import ../tools/misc/debootstrap {
569     inherit fetchurl stdenv lib dpkg gettext gawk wget perl;
570   };
572   ddclient = import ../tools/networking/ddclient {
573     inherit fetchurl buildPerlPackage perl;
574   };
576   ddrescue = import ../tools/system/ddrescue {
577     inherit fetchurl stdenv;
578   };
580   desktop_file_utils = import ../tools/misc/desktop-file-utils {
581     inherit stdenv fetchurl pkgconfig glib;
582   };
584   dev86 = import ../development/compilers/dev86 {
585     inherit fetchurl stdenv;
586   };
588   dnsmasq = import ../tools/networking/dnsmasq {
589     # TODO i18n can be installed as well, implement it?
590     inherit fetchurl stdenv;
591   };
593   dhcp = import ../tools/networking/dhcp {
594     inherit fetchurl stdenv nettools iputils iproute makeWrapper;
595   };
597   dhcpcd = import ../tools/networking/dhcpcd {
598     inherit fetchurl stdenv;
599   };
601   diffstat = import ../tools/text/diffstat {
602     inherit fetchurl stdenv;
603   };
605   diffutils = useFromStdenv "diffutils"
606     (import ../tools/text/diffutils {
607       inherit fetchurl stdenv coreutils;
608     });
610   docbook2x = import ../tools/typesetting/docbook2x {
611     inherit fetchurl stdenv texinfo perl
612             gnused groff libxml2 libxslt makeWrapper;
613     inherit (perlPackages) XMLSAX XMLParser XMLNamespaceSupport;
614     libiconv = if stdenv.isDarwin then libiconv else null;
615   };
617   dosfstools = composedArgsAndFun (import ../tools/filesystems/dosfstools) {
618     inherit builderDefs;
619   };
621   duplicity = import ../tools/backup/duplicity {
622     inherit fetchurl stdenv librsync gnupg makeWrapper python;
623     inherit (pythonPackages) boto;
624   };
626   dvdplusrwtools = import ../tools/cd-dvd/dvd+rw-tools {
627     inherit fetchurl stdenv cdrkit m4;
628   };
630   e2fsprogs = import ../tools/filesystems/e2fsprogs {
631     inherit fetchurl stdenv pkgconfig libuuid;
632   };
634   ecryptfs = import ../tools/security/ecryptfs {
635     inherit fetchurl stdenv fuse python perl keyutils pam nss nspr;
636   };
638   enblendenfuse = import ../tools/graphics/enblend-enfuse {
639     inherit fetchurl stdenv libtiff libpng lcms libxmi boost;
640   };
642   enscript = import ../tools/text/enscript {
643     inherit fetchurl stdenv gettext;
644   };
646   eprover = composedArgsAndFun (import ../tools/misc/eProver) {
647     inherit fetchurl stdenv which;
648     texLive = texLiveAggregationFun {
649       paths = [
650         texLive texLiveExtra
651       ];
652     };
653   };
655   ethtool = import ../tools/misc/ethtool {
656     inherit fetchurl stdenv;
657   };
659   exif = import ../tools/graphics/exif {
660     inherit fetchurl stdenv pkgconfig libexif popt;
661   };
663   exiftags = import ../tools/graphics/exiftags {
664     inherit stdenv fetchurl;
665   };
667   expect = import ../tools/misc/expect {
668     inherit fetchurl stdenv tcl tk autoconf;
669     inherit (xorg) xproto libX11;
670   };
672   fcron = import ../tools/system/fcron { # see also cron
673     inherit fetchurl stdenv perl;
674   };
676   fdisk = import ../tools/system/fdisk {
677     inherit fetchurl stdenv parted libuuid gettext;
678   };
680   figlet = import ../tools/misc/figlet {
681     inherit fetchurl stdenv;
682   };
684   file = import ../tools/misc/file {
685     inherit fetchurl stdenv;
686   };
688   filelight = import ../tools/system/filelight {
689     inherit fetchurl stdenv kdelibs x11 zlib perl libpng;
690     qt = qt3;
691   };
693   findutils = useFromStdenv "findutils"
694     (if stdenv.isDarwin then findutils4227 else
695       import ../tools/misc/findutils {
696         inherit fetchurl stdenv coreutils;
697       }
698     );
700   findutils4227 = import ../tools/misc/findutils/4.2.27.nix {
701     inherit fetchurl stdenv coreutils;
702   };
704   findutilsWrapper = lowPrio (appendToName "wrapper" (import ../tools/misc/findutils-wrapper {
705     inherit stdenv findutils;
706   }));
708   finger_bsd = import ../tools/networking/bsd-finger {
709     inherit fetchurl stdenv;
710   };
712   fontforge = import ../tools/misc/fontforge {
713     inherit fetchurl stdenv gettext freetype zlib
714       libungif libpng libjpeg libtiff libxml2 lib;
715   };
717   fontforgeX = import ../tools/misc/fontforge {
718     inherit fetchurl stdenv gettext freetype zlib
719       libungif libpng libjpeg libtiff libxml2 lib;
720     inherit (xlibs) libX11 xproto libXt;
721   };
723   dos2unix = import ../tools/text/dos2unix {
724       inherit fetchurl stdenv;
725   };
727   unix2dos = import ../tools/text/unix2dos {
728       inherit fetchurl stdenv;
729   };
731   gawk = useFromStdenv "gawk"
732     (import ../tools/text/gawk {
733       inherit fetchurl stdenv;
734     });
736   gdmap = composedArgsAndFun (import ../tools/system/gdmap/0.8.1.nix) {
737     inherit stdenv fetchurl builderDefs pkgconfig libxml2 intltool
738       gettext;
739     inherit (gtkLibs) gtk;
740   };
742   genext2fs = import ../tools/filesystems/genext2fs {
743     inherit fetchurl stdenv;
744   };
746   gengetopt = import ../development/tools/misc/gengetopt {
747     inherit fetchurl stdenv;
748   };
750   getopt = import ../tools/misc/getopt {
751     inherit fetchurl stdenv;
752   };
754   gftp = import ../tools/networking/gftp {
755     inherit lib fetchurl stdenv;
756     inherit readline ncurses gettext openssl pkgconfig;
757     inherit (gtkLibs) glib gtk;
758   };
760   gifsicle = import ../tools/graphics/gifscile {
761     inherit fetchurl stdenv;
762     inherit (xlibs) xproto libXt libX11;
763   };
765   glusterfs = builderDefsPackage ../tools/filesystems/glusterfs {
766     inherit fuse;
767     bison = bison24;
768     flex = flex2535;
769   };
771   glxinfo = import ../tools/graphics/glxinfo {
772     inherit fetchurl stdenv x11 mesa;
773   };
775   gnokii = builderDefsPackage (import ../tools/misc/gnokii) {
776     inherit intltool perl gettext libusb;
777   };
779   gnugrep = useFromStdenv "gnugrep"
780     (import ../tools/text/gnugrep {
781       inherit fetchurl stdenv pcre;
782     });
784   gnupatch = useFromStdenv "patch" (import ../tools/text/gnupatch {
785     inherit fetchurl stdenv ed;
786   });
788   gnupg = import ../tools/security/gnupg {
789     inherit fetchurl stdenv readline bzip2;
790     ideaSupport = getPkgConfig "gnupg" "idea" false; # enable for IDEA crypto support
791   };
793   gnupg2 = import ../tools/security/gnupg2 {
794     inherit fetchurl stdenv readline libgpgerror libgcrypt libassuan pth libksba zlib;
795     openldap = if getPkgConfig "gnupg" "ldap" true then openldap else null;
796     bzip2 = if getPkgConfig "gnupg" "bzip2" true then bzip2 else null;
797     libusb = if getPkgConfig "gnupg" "usb" true then libusb else null;
798     curl = if getPkgConfig "gnupg" "curl" true then curl else null;
799   };
801   gnuplot = import ../tools/graphics/gnuplot {
802     inherit fetchurl stdenv zlib gd texinfo readline emacs;
803     inherit (xlibs) libX11 libXt libXaw libXpm;
804     x11Support = getPkgConfig "gnuplot" "x11" false;
805     wxGTK = if getPkgConfig "gnuplot" "wxGtk" false then wxGTK else null;
806     inherit (gtkLibs) pango;
807     inherit cairo pkgconfig;
808   };
810   gnused = useFromStdenv "gnused"
811     (import ../tools/text/gnused {
812       inherit fetchurl stdenv;
813     });
815   gnused_4_2 = import ../tools/text/gnused/4.2.nix {
816     inherit fetchurl stdenv;
817   };
819   gnutar = useFromStdenv "gnutar"
820     (import ../tools/archivers/gnutar {
821       inherit fetchurl stdenv;
822     });
824   gnuvd = import ../tools/misc/gnuvd {
825     inherit fetchurl stdenv;
826   };
828   graphviz = import ../tools/graphics/graphviz {
829     inherit fetchurl stdenv pkgconfig libpng libjpeg expat x11 yacc
830       libtool fontconfig gd;
831     inherit (xlibs) libXaw;
832     inherit (gtkLibs) pango;
833   };
835   groff = import ../tools/text/groff {
836     inherit fetchurl stdenv perl;
837     ghostscript = null;
838   };
840   grub = import ../tools/misc/grub {
841     inherit fetchurl autoconf automake;
842     stdenv = stdenv_32bit;
843     buggyBiosCDSupport = (getConfig ["grub" "buggyBiosCDSupport"] true);
844   };
846   grub2 = import ../tools/misc/grub/1.9x.nix {
847     inherit stdenv fetchurl bison ncurses libusb freetype;
848   };
850   gssdp = import ../development/libraries/gssdp {
851     inherit fetchurl stdenv pkgconfig libxml2 glib;
852     inherit (gnome) libsoup;
853   };
855   gtkgnutella = import ../tools/networking/p2p/gtk-gnutella {
856     inherit fetchurl stdenv pkgconfig libxml2;
857     inherit (gtkLibs) glib gtk;
858   };
860   gupnp = import ../development/libraries/gupnp {
861     inherit fetchurl stdenv pkgconfig libxml2 gssdp e2fsprogs glib;
862     inherit (gnome) libsoup;
863   };
865   gupnptools = import ../tools/networking/gupnp-tools {
866     inherit fetchurl stdenv gssdp gupnp pkgconfig libxml2 e2fsprogs;
867     inherit (gtkLibs) gtk glib;
868     inherit (gnome) libsoup libglade gnomeicontheme;
869   };
871   gvpe = builderDefsPackage ../tools/networking/gvpe {
872     inherit openssl gmp nettools iproute;
873   };
875   gzip = useFromStdenv "gzip"
876     (import ../tools/compression/gzip {
877       inherit fetchurl stdenv;
878     });
880   pigz = import ../tools/compression/pigz {
881     inherit fetchurl stdenv zlib;
882   };
884   halibut = import ../tools/typesetting/halibut {
885     inherit fetchurl stdenv perl;
886   };
888   hddtemp = import ../tools/misc/hddtemp {
889     inherit fetchurl stdenv;
890   };
892   hevea = import ../tools/typesetting/hevea {
893     inherit fetchurl stdenv ocaml;
894   };
896   highlight = import ../tools/text/highlight {
897     inherit fetchurl stdenv getopt;
898   };
900   host = import ../tools/networking/host {
901     inherit fetchurl stdenv;
902   };
904   iasl = import ../development/compilers/iasl {
905     inherit fetchurl stdenv bison flex;
906   };
908   idutils = import ../tools/misc/idutils {
909     inherit fetchurl stdenv emacs;
910   };
912   iftop = import ../tools/networking/iftop {
913     inherit fetchurl stdenv ncurses libpcap;
914   };
916   imapsync = import ../tools/networking/imapsync {
917     inherit fetchurl stdenv perl openssl;
918     inherit (perlPackages) MailIMAPClient;
919   };
921   inetutils = import ../tools/networking/inetutils {
922     inherit fetchurl stdenv ncurses;
923   };
925   iodine = import ../tools/networking/iodine {
926     inherit stdenv fetchurl zlib nettools;
927   };
929   iperf = import ../tools/networking/iperf {
930     inherit fetchurl stdenv;
931   };
933   ipmitool = import ../tools/system/ipmitool {
934     inherit fetchurl stdenv openssl;
935     static = !stdenv.isDarwin && getPkgConfig "ipmitool" "static" false;
936   };
938   jdiskreport = import ../tools/misc/jdiskreport {
939     inherit fetchurl stdenv unzip jdk;
940   };
942   jfsrec = import ../tools/filesystems/jfsrec {
943     inherit fetchurl stdenv boost;
944   };
946   jfsutils = import ../tools/filesystems/jfsutils {
947     inherit fetchurl stdenv libuuid;
948   };
950   jhead = import ../tools/graphics/jhead {
951     inherit stdenv fetchurl;
952   };
954   jing = import ../tools/text/xml/jing {
955     inherit fetchurl stdenv unzip;
956   };
958   jing_tools = import ../tools/text/xml/jing/jing-script.nix {
959     inherit fetchurl stdenv unzip jre;
960   };
962   jnettop = import ../tools/networking/jnettop {
963     inherit fetchurl stdenv autoconf libpcap ncurses pkgconfig;
964     inherit (gnome) glib;
965   };
967   jwhois = import ../tools/networking/jwhois {
968     inherit fetchurl stdenv;
969   };
971   keychain = import ../tools/misc/keychain {
972     inherit fetchurl stdenv;
973   };
975   kismet = import ../applications/networking/sniffers/kismet {
976     inherit fetchurl stdenv libpcap ncurses expat;
977   };
979   ktorrent = import ../tools/networking/p2p/ktorrent {
980     inherit fetchurl stdenv pkgconfig boost
981       xlibs zlib libpng libjpeg perl gmp cmake gettext;
982     kde = kde43;
983   };
985   less = import ../tools/misc/less {
986     inherit fetchurl stdenv ncurses;
987   };
989   lftp = import ../tools/networking/lftp {
990     inherit fetchurl stdenv readline;
991   };
993   libtorrent = import ../tools/networking/p2p/libtorrent {
994     inherit fetchurl stdenv pkgconfig openssl libsigcxx;
995   };
997   lout = import ../tools/typesetting/lout {
998     inherit fetchurl stdenv ghostscript;
999   };
1001   lrzip = import ../tools/compression/lrzip {
1002     inherit fetchurl stdenv zlib lzo bzip2 nasm;
1003   };
1005   lsh = import ../tools/networking/lsh {
1006     inherit stdenv fetchurl gperf guile gmp zlib liboop gnum4 pam
1007       readline nettools lsof procps;
1008   };
1010   lzma = xz;
1012   xz = import ../tools/compression/xz {
1013     inherit fetchurl stdenv lib;
1014   };
1016   lzop = import ../tools/compression/lzop {
1017     inherit fetchurl stdenv lzo;
1018   };
1020   mailutils = import ../tools/networking/mailutils {
1021     inherit fetchurl stdenv gettext gdbm libtool pam readline ncurses
1022       gnutls mysql guile texinfo gnum4;
1023   };
1025   man = import ../tools/misc/man {
1026     inherit fetchurl stdenv groff less;
1027   };
1029   man_db = import ../tools/misc/man-db {
1030     inherit fetchurl stdenv db4 groff;
1031   };
1033   memtest86 = import ../tools/misc/memtest86 {
1034     inherit fetchurl stdenv;
1035   };
1037   mc = import ../tools/misc/mc {
1038     inherit fetchurl stdenv lib pkgconfig ncurses shebangfix perl zip unzip slang
1039       gettext e2fsprogs gpm glib;
1040     inherit (xlibs) libX11 libXt;
1041   };
1043   mcabber = import ../applications/networking/instant-messengers/mcabber {
1044     inherit fetchurl stdenv openssl ncurses pkgconfig glib;
1045   };
1047   mcron = import ../tools/system/mcron {
1048     inherit fetchurl stdenv guile which ed;
1049   };
1051   mdbtools = import ../tools/misc/mdbtools {
1052     inherit fetchurl stdenv readline pkgconfig bison glib;
1053     flex = flex2535;
1054   };
1056   mjpegtools = import ../tools/video/mjpegtools {
1057     inherit fetchurl stdenv libjpeg;
1058     inherit (xlibs) libX11;
1059   };
1061   mkisofs = import ../tools/cd-dvd/mkisofs {
1062     inherit fetchurl stdenv gettext;
1063   };
1065   mktemp = import ../tools/security/mktemp {
1066     inherit fetchurl stdenv;
1067   };
1069   mldonkey = import ../applications/networking/p2p/mldonkey {
1070     inherit fetchurl stdenv ocaml zlib bzip2 ncurses file gd libpng;
1071   };
1073   monit = builderDefsPackage ../tools/system/monit {
1074     flex = flex2535;
1075     bison = bison24;
1076     inherit openssl;
1077   };
1079   mpage = import ../tools/text/mpage {
1080     inherit fetchurl stdenv;
1081   };
1083   msf = builderDefsPackage (import ../tools/security/metasploit/3.1.nix) {
1084     inherit ruby makeWrapper;
1085   };
1087   mssys = import ../tools/misc/mssys {
1088     inherit fetchurl stdenv gettext;
1089   };
1091   multitran = recurseIntoAttrs (let
1092       inherit fetchurl stdenv help2man;
1093     in rec {
1094       multitrandata = import ../tools/text/multitran/data {
1095         inherit fetchurl stdenv;
1096       };
1098       libbtree = import ../tools/text/multitran/libbtree {
1099         inherit fetchurl stdenv;
1100       };
1102       libmtsupport = import ../tools/text/multitran/libmtsupport {
1103         inherit fetchurl stdenv;
1104       };
1106       libfacet = import ../tools/text/multitran/libfacet {
1107         inherit fetchurl stdenv libmtsupport;
1108       };
1110       libmtquery = import ../tools/text/multitran/libmtquery {
1111         inherit fetchurl stdenv libmtsupport libfacet libbtree multitrandata;
1112       };
1114       mtutils = import ../tools/text/multitran/mtutils {
1115         inherit fetchurl stdenv libmtsupport libfacet libbtree libmtquery help2man;
1116       };
1117     });
1119   muscleframework = import ../tools/security/muscleframework {
1120     inherit fetchurl stdenv libmusclecard pkgconfig pcsclite;
1121   };
1123   muscletool = import ../tools/security/muscletool {
1124     inherit fetchurl stdenv pkgconfig libmusclecard pcsclite;
1125   };
1127   mysql2pgsql = import ../tools/misc/mysql2pgsql {
1128     inherit fetchurl stdenv perl shebangfix;
1129   };
1131   namazu = import ../tools/text/namazu {
1132     inherit fetchurl stdenv perl;
1133   };
1135   nbd = import ../tools/networking/nbd {
1136     inherit fetchurl stdenv pkgconfig glib;
1137   };
1139   nc6 = composedArgsAndFun (import ../tools/networking/nc6/1.0.nix) {
1140     inherit builderDefs;
1141   };
1143   ncat = import ../tools/networking/ncat {
1144     inherit fetchurl stdenv openssl;
1145   };
1147   ncftp = import ../tools/networking/ncftp {
1148     inherit fetchurl stdenv ncurses coreutils;
1149   };
1151   ncompress = import ../tools/compression/ncompress {
1152     inherit fetchurl stdenv;
1153   };
1155   netcat = import ../tools/networking/netcat {
1156     inherit fetchurl stdenv;
1157   };
1159   netkittftp = import ../tools/networking/netkit/tftp {
1160     inherit fetchurl stdenv;
1161   };
1163   netpbm = import ../tools/graphics/netpbm {
1164     inherit stdenv fetchsvn libjpeg libpng zlib flex perl libxml2 makeWrapper;
1165   };
1167   netselect = import ../tools/networking/netselect {
1168     inherit fetchurl stdenv;
1169   };
1171   nmap = import ../tools/security/nmap {
1172     inherit fetchurl stdenv libpcap pkgconfig openssl
1173       python pygtk makeWrapper pygobject pycairo;
1174     inherit (pythonPackages) pysqlite;
1175     inherit (xlibs) libX11;
1176     inherit (gtkLibs) gtk;
1177   };
1179   ntfs3g = import ../tools/filesystems/ntfs-3g {
1180     inherit fetchurl stdenv utillinux;
1181   };
1183   ntfsprogs = import ../tools/filesystems/ntfsprogs {
1184     inherit fetchurl stdenv libuuid;
1185   };
1187   ntp = import ../tools/networking/ntp {
1188     inherit fetchurl stdenv libcap;
1189   };
1191   nssmdns = import ../tools/networking/nss-mdns {
1192     inherit fetchurl stdenv avahi;
1193   };
1195   nylon = import ../tools/networking/nylon {
1196     inherit fetchurl stdenv libevent;
1197   };
1199   obexd = import ../tools/bluetooth/obexd {
1200     inherit fetchurl stdenv pkgconfig dbus openobex bluez glib;
1201   };
1203   obexfs = import ../tools/bluetooth/obexfs {
1204     inherit fetchurl stdenv pkgconfig fuse obexftp;
1205   };
1207   obexftp = import ../tools/bluetooth/obexftp {
1208     inherit fetchurl stdenv pkgconfig openobex bluez;
1209   };
1211   opendbx = import ../development/libraries/opendbx {
1212     inherit fetchurl stdenv readline mysql postgresql sqlite;
1213   };
1215   opendkim = import ../development/libraries/opendkim {
1216     inherit fetchurl stdenv openssl libmilter;
1217   };
1219   openjade = import ../tools/text/sgml/openjade {
1220     inherit fetchurl opensp perl;
1221     stdenv = overrideGCC stdenv gcc33;
1222   };
1224   openobex = import ../tools/bluetooth/openobex {
1225     inherit fetchurl stdenv pkgconfig bluez libusb;
1226   };
1228   opensc_0_11_7 = import ../tools/security/opensc/0.11.7.nix {
1229     inherit fetchurl stdenv libtool readline zlib openssl libiconv pcsclite
1230       libassuan pkgconfig pinentry;
1231     inherit (xlibs) libXt;
1232   };
1234   opensc = opensc_0_11_7;
1236   opensc_dnie_wrapper = import ../tools/security/opensc-dnie-wrapper {
1237     inherit stdenv makeWrapper ed libopensc_dnie;
1238   };
1240   openssh = import ../tools/networking/openssh {
1241     inherit fetchurl stdenv zlib openssl pam perl;
1242     pamSupport = getPkgConfig "openssh" "pam" true;
1243     hpnSupport = getPkgConfig "openssh" "hpn" false;
1244     etcDir = getPkgConfig "openssh" "etcDir" "/etc/ssh";
1245   };
1247   opensp = import ../tools/text/sgml/opensp {
1248     inherit fetchurl xmlto docbook_xml_dtd_412 libxslt docbook_xsl;
1249     inherit stdenv;
1250   };
1252   openvpn = import ../tools/networking/openvpn {
1253     inherit fetchurl stdenv iproute lzo openssl nettools;
1254   };
1256   p7zip = import ../tools/archivers/p7zip {
1257     inherit fetchurl stdenv;
1258   };
1260   panomatic = import ../tools/graphics/panomatic {
1261     inherit fetchurl stdenv boost zlib;
1262   };
1264   par2cmdline = import ../tools/networking/par2cmdline {
1265     inherit fetchurl stdenv;
1266   };
1268   patchutils = import ../tools/text/patchutils {
1269     inherit fetchurl stdenv;
1270   };
1272   parted = import ../tools/misc/parted {
1273     inherit fetchurl stdenv devicemapper libuuid gettext readline
1274       utillinuxng;
1275   };
1277   patch = gnupatch;
1279   pbzip2 = import ../tools/compression/pbzip2 {
1280     inherit fetchurl stdenv bzip2;
1281   };
1283   pciutils = import ../tools/system/pciutils {
1284     inherit fetchurl stdenv zlib;
1285   };
1287   pcsclite = import ../tools/security/pcsclite {
1288     inherit fetchurl stdenv hal pkgconfig dbus;
1289   };
1291   pdf2djvu = import ../tools/typesetting/pdf2djvu {
1292     inherit fetchurl stdenv pkgconfig djvulibre poppler fontconfig libjpeg;
1293   };
1295   pdfjam = import ../tools/typesetting/pdfjam {
1296     inherit fetchurl stdenv;
1297   };
1299   pg_top = import ../tools/misc/pg_top {
1300     inherit fetchurl stdenv ncurses postgresql;
1301   };
1303   pdsh = import ../tools/networking/pdsh {
1304     inherit fetchurl stdenv perl;
1305     readline = if getPkgConfig "pdsh" "readline" true then readline else null;
1306     rsh = getPkgConfig "pdsh" "rsh" true;
1307     ssh = if getPkgConfig "pdsh" "ssh" true then openssh else null;
1308     pam = if getPkgConfig "pdsh" "pam" true then pam else null;
1309   };
1311   pfstools = import ../tools/graphics/pfstools {
1312     inherit fetchurl stdenv imagemagick libjpeg libtiff mesa freeglut bzip2 libpng expat;
1313     openexr = openexr_1_6_1;
1314     qt = qt3;
1315     inherit (xlibs) libX11;
1316   };
1318   pinentry = import ../tools/misc/pinentry {
1319     inherit fetchurl stdenv pkgconfig ncurses;
1320     inherit (gnome) glib gtk;
1321   };
1323   plan9port = import ../tools/system/plan9port {
1324     inherit fetchurl stdenv;
1325     inherit (xlibs) libX11 xproto libXt xextproto;
1326   };
1328   ploticus = import ../tools/graphics/ploticus {
1329     inherit fetchurl stdenv zlib libpng;
1330     inherit (xlibs) libX11;
1331   };
1333   plotutils = import ../tools/graphics/plotutils {
1334     inherit fetchurl stdenv libpng;
1335   };
1337   povray = import ../tools/graphics/povray {
1338     inherit fetchurl stdenv;
1339   };
1341   ppl = import ../development/libraries/ppl {
1342     inherit fetchurl stdenv gmpxx perl gnum4;
1343   };
1345   /* WARNING: this version is unsuitable for using with a setuid wrapper */
1346   ppp = builderDefsPackage (import ../tools/networking/ppp) {
1347   };
1349   proxychains = import ../tools/networking/proxychains {
1350     inherit fetchurl stdenv;
1351   };
1353   proxytunnel = import ../tools/misc/proxytunnel {
1354     inherit fetchurl stdenv openssl;
1355   };
1357   psmisc = import ../tools/misc/psmisc {
1358     inherit stdenv fetchurl ncurses;
1359   };
1361   pstoedit = import ../tools/graphics/pstoedit {
1362     inherit fetchurl stdenv lib pkgconfig ghostscript gd zlib plotutils;
1363   };
1365   pv = import ../tools/misc/pv {
1366     inherit fetchurl stdenv;
1367   };
1369   pwgen = import ../tools/security/pwgen {
1370     inherit stdenv fetchurl;
1371   };
1373   pydb = import ../tools/pydb {
1374     inherit fetchurl stdenv python emacs;
1375   };
1377   pystringtemplate = import ../development/python-modules/stringtemplate {
1378     inherit stdenv fetchurl python antlr;
1379   };
1381   pythonDBus = builderDefsPackage (import ../development/python-modules/dbus) {
1382     inherit python pkgconfig dbus_glib;
1383     dbus = dbus.libs;
1384   };
1386   pythonIRClib = builderDefsPackage (import ../development/python-modules/irclib) {
1387     inherit python;
1388   };
1390   pythonSexy = builderDefsPackage (import ../development/python-modules/libsexy) {
1391     inherit python libsexy pkgconfig libxml2 pygtk;
1392     inherit (gtkLibs) pango gtk glib;
1393   };
1395   openmpi = import ../development/libraries/openmpi {
1396     inherit fetchurl stdenv;
1397   };
1399   qhull = import ../development/libraries/qhull {
1400     inherit stdenv fetchurl;
1401   };
1403   reiser4progs = import ../tools/filesystems/reiser4progs {
1404     inherit fetchurl stdenv libaal;
1405   };
1407   reiserfsprogs = import ../tools/filesystems/reiserfsprogs {
1408     inherit fetchurl stdenv;
1409   };
1411   relfs = composedArgsAndFun (import ../tools/filesystems/relfs) {
1412     inherit fetchcvs stdenv ocaml postgresql fuse pcre
1413       builderDefs pkgconfig libuuid;
1414     inherit (gnome) gnomevfs GConf;
1415   };
1417   remind = import ../tools/misc/remind {
1418     inherit fetchurl stdenv;
1419   };
1421   replace = import ../tools/text/replace {
1422     inherit fetchurl stdenv;
1423   };
1425   /*
1426   rdiff_backup = import ../tools/backup/rdiff-backup {
1427     inherit fetchurl stdenv librsync gnused;
1428     python=python;
1429   };
1430   */
1432   rsnapshot = import ../tools/backup/rsnapshot {
1433     inherit fetchurl stdenv perl openssh rsync;
1435     # For the `logger' command, we can use either `utillinux' or
1436     # GNU Inetutils.  The latter is more portable.
1437     logger = inetutils;
1438   };
1440   rlwrap = composedArgsAndFun (import ../tools/misc/rlwrap/0.28.nix) {
1441     inherit builderDefs readline;
1442   };
1444   rpPPPoE = builderDefsPackage (import ../tools/networking/rp-pppoe) {
1445     inherit ppp;
1446   };
1448   rpm = import ../tools/package-management/rpm {
1449     inherit fetchurl stdenv cpio zlib bzip2 xz file elfutils nspr nss popt;
1450     db4 = db45;
1451   };
1453   rrdtool = import ../tools/misc/rrdtool {
1454     inherit stdenv fetchurl gettext perl pkgconfig libxml2 cairo;
1455     inherit (gtkLibs) pango;
1456   };
1458   rtorrent = import ../tools/networking/p2p/rtorrent {
1459     inherit fetchurl stdenv libtorrent ncurses pkgconfig libsigcxx curl zlib openssl;
1460   };
1462   rubber = import ../tools/typesetting/rubber {
1463     inherit fetchurl stdenv python texinfo;
1464   };
1466   rxp = import ../tools/text/xml/rxp {
1467     inherit fetchurl stdenv;
1468   };
1470   rzip = import ../tools/compression/rzip {
1471     inherit fetchurl stdenv bzip2;
1472   };
1474   s3backer = import ../tools/filesystems/s3backer {
1475     inherit fetchurl stdenv pkgconfig fuse curl expat;
1476   };
1478   sablotron = import ../tools/text/xml/sablotron {
1479     inherit fetchurl stdenv expat;
1480   };
1482   screen = import ../tools/misc/screen {
1483     inherit fetchurl stdenv ncurses;
1484   };
1486   scrot = import ../tools/graphics/scrot {
1487     inherit fetchurl stdenv giblib x11;
1488   };
1490   seccure = import ../tools/security/seccure/0.4.nix {
1491     inherit fetchurl stdenv libgcrypt;
1492   };
1494   setserial = builderDefsPackage (import ../tools/system/setserial) {
1495     inherit groff;
1496   };
1498   sharutils = import ../tools/archivers/sharutils/4.6.3.nix {
1499     inherit fetchurl stdenv;
1500   };
1502   shebangfix = import ../tools/misc/shebangfix {
1503     inherit stdenv perl;
1504   };
1506   slsnif = import ../tools/misc/slsnif {
1507     inherit fetchurl stdenv;
1508   };
1510   smartmontools = import ../tools/system/smartmontools {
1511     inherit fetchurl stdenv;
1512   };
1514   smbfsFuse = composedArgsAndFun (import ../tools/filesystems/smbfs-fuse) {
1515     inherit builderDefs samba fuse;
1516   };
1518   socat = import ../tools/networking/socat {
1519     inherit fetchurl stdenv openssl;
1520   };
1522   socat2pre = builderDefsPackage ../tools/networking/socat/2.0.0-b3.nix {
1523     inherit fetchurl stdenv openssl;
1524   };
1526   squashfsTools = import ../tools/filesystems/squashfs {
1527     inherit fetchurl stdenv zlib;
1528   };
1530   sshfsFuse = import ../tools/filesystems/sshfs-fuse {
1531     inherit fetchurl stdenv pkgconfig fuse glib;
1532   };
1534   sudo = import ../tools/security/sudo {
1535     inherit fetchurl stdenv coreutils pam groff;
1536   };
1538   suidChroot = builderDefsPackage (import ../tools/system/suid-chroot) {
1539   };
1541   superkaramba = import ../desktops/superkaramba {
1542     inherit stdenv fetchurl kdebase kdelibs zlib libjpeg
1543       perl qt3 python libpng freetype expat;
1544     inherit (xlibs) libX11 libXext libXt libXaw libXpm;
1545   };
1547   ssmtp = import ../tools/networking/ssmtp {
1548     inherit fetchurl stdenv openssl;
1549     tlsSupport = true;
1550   };
1552   ssss = composedArgsAndFun (import ../tools/security/ssss/0.5.nix) {
1553     inherit builderDefs gmp;
1554   };
1556   stun = import ../tools/networking/stun {
1557     inherit fetchurl stdenv lib;
1558   };
1560   stunnel = import ../tools/networking/stunnel {
1561     inherit fetchurl stdenv openssl;
1562   };
1564   su = import ../tools/misc/su {
1565     inherit fetchurl stdenv pam;
1566   };
1568   swec = import ../tools/networking/swec {
1569     inherit fetchurl stdenv makeWrapper perl;
1570     inherit (perlPackages) LWP URI HTMLParser HTTPServerSimple Parent;
1571   };
1573   system_config_printer = import ../tools/misc/system-config-printer {
1574     inherit stdenv fetchurl perl perlXMLParser desktop_file_utils;
1575   };
1577   sitecopy = import ../tools/networking/sitecopy {
1578     inherit fetchurl stdenv neon openssl;
1579   };
1581   privoxy = import ../tools/networking/privoxy {
1582     inherit fetchurl stdenv autoconf automake ;
1583   };
1585   tcpdump = import ../tools/networking/tcpdump {
1586     inherit fetchurl stdenv libpcap;
1587   };
1589   tcng = import ../tools/networking/tcng {
1590     inherit fetchurl stdenv iproute bison flex db4 perl;
1591     kernel = linux_2_6_28;
1592   };
1594   telnet = import ../tools/networking/telnet {
1595     inherit fetchurl stdenv ncurses;
1596   };
1598   texmacs = import ../applications/office/texmacs {
1599     inherit fetchurl stdenv texLive guile;
1600     inherit (xlibs) libX11 libXext;
1601   };
1603   ttf2pt1 = import ../tools/misc/ttf2pt1 {
1604     inherit fetchurl stdenv perl freetype;
1605   };
1607   ucl = import ../development/libraries/ucl {
1608     inherit fetchurl stdenv;
1609   };
1611   ufraw = import ../applications/graphics/ufraw {
1612     inherit fetchurl stdenv pkgconfig gettext bzip2 zlib
1613       libjpeg libtiff cfitsio exiv2 lcms gtkimageview;
1614     inherit (gnome) gtk;
1615   };
1617   upx = import ../tools/compression/upx {
1618     inherit fetchurl stdenv ucl zlib;
1619   };
1621   vbetool = builderDefsPackage ../tools/system/vbetool {
1622     inherit pciutils libx86 zlib;
1623   };
1625   viking = import ../applications/misc/viking {
1626     inherit fetchurl stdenv pkgconfig intltool gettext expat curl
1627       gpsd bc file;
1628     inherit (gtkLibs) gtk;
1629   };
1631   vncrec = builderDefsPackage ../tools/video/vncrec {
1632     inherit (xlibs) imake libX11 xproto gccmakedep libXt
1633       libXmu libXaw libXext xextproto libSM libICE libXpm
1634       libXp;
1635   };
1637   vpnc = import ../tools/networking/vpnc {
1638     inherit fetchurl stdenv libgcrypt perl gawk
1639       nettools makeWrapper;
1640   };
1642   vtun = import ../tools/networking/vtun {
1643     inherit fetchurl stdenv lzo openssl zlib yacc flex;
1644   };
1646   testdisk = import ../tools/misc/testdisk {
1647     inherit fetchurl stdenv ncurses libjpeg e2fsprogs zlib openssl;
1648   };
1650   htmlTidy = import ../tools/text/html-tidy {
1651     inherit fetchcvs stdenv autoconf automake libtool;
1652   };
1654   tightvnc = import ../tools/admin/tightvnc {
1655     inherit fetchurl stdenv x11 zlib libjpeg perl;
1656     inherit (xlibs) imake gccmakedep libXmu libXaw libXpm libXp xauth;
1657     fontDirectories = [ xorg.fontadobe75dpi xorg.fontmiscmisc xorg.fontcursormisc
1658       xorg.fontbhlucidatypewriter75dpi ];
1659   };
1661   time = import ../tools/misc/time {
1662     inherit fetchurl stdenv;
1663   };
1665   tm = import ../tools/system/tm {
1666     inherit fetchurl stdenv;
1667   };
1669   trang = import ../tools/text/xml/trang {
1670     inherit fetchurl stdenv unzip jre;
1671   };
1673   tre = import ../development/libraries/tre {
1674     inherit fetchurl stdenv;
1675   };
1677   ts = import ../tools/system/ts {
1678     inherit fetchurl stdenv;
1679   };
1681   transfig = import ../tools/graphics/transfig {
1682     inherit fetchurl stdenv libpng libjpeg zlib;
1683     inherit (xlibs) imake;
1684   };
1686   truecrypt = import ../applications/misc/truecrypt {
1687     inherit fetchurl stdenv pkgconfig fuse devicemapper;
1688     inherit wxGTK;
1689     wxGUI = getConfig [ "truecrypt" "wxGUI" ] true;
1690   };
1692   ttmkfdir = import ../tools/misc/ttmkfdir {
1693     inherit stdenv fetchurl freetype fontconfig libunwind libtool bison;
1694     flex = flex2534;
1695   };
1697   unbound = import ../tools/networking/unbound {
1698     inherit fetchurl stdenv openssl;
1699   };
1701   units = import ../tools/misc/units {
1702     inherit fetchurl stdenv;
1703   };
1705   unrar = import ../tools/archivers/unrar {
1706     inherit fetchurl stdenv;
1707   };
1709   unshield = import ../tools/archivers/unshield {
1710     inherit fetchurl stdenv zlib;
1711   };
1713   unzip = unzip552;
1715   # TODO: remove in the next stdenv update.
1716   unzip552 = import ../tools/archivers/unzip/5.52.nix {
1717     inherit fetchurl stdenv;
1718   };
1720   unzip60 = import ../tools/archivers/unzip/6.0.nix {
1721     inherit fetchurl stdenv bzip2;
1722   };
1724   uptimed = import ../tools/system/uptimed {
1725     inherit fetchurl stdenv automake autoconf libtool;
1726   };
1728   w3cCSSValidator = import ../tools/misc/w3c-css-validator {
1729     inherit fetchurl stdenv apacheAnt jre sourceFromHead lib;
1730     tomcat = tomcat6;
1731   };
1733   wdfs = import ../tools/filesystems/wdfs {
1734     inherit stdenv fetchurl neon fuse pkgconfig glib;
1735   };
1737   webdruid = builderDefsPackage ../tools/admin/webdruid {
1738     inherit zlib libpng freetype gd which
1739       libxml2 geoip;
1740   };
1742   wget = import ../tools/networking/wget {
1743     inherit fetchurl stdenv gettext gnutls perl;
1744   };
1746   which = import ../tools/system/which {
1747     inherit fetchurl stdenv readline;
1748   };
1750   wicd = import ../tools/networking/wicd {
1751     inherit stdenv fetchurl python pygobject pycairo pyGtkGlade pythonDBus
1752             wpa_supplicant dhcp wirelesstools nettools iproute;
1753   };
1755   wv = import ../tools/misc/wv {
1756     inherit fetchurl stdenv libpng zlib imagemagick
1757       pkgconfig libgsf libxml2 bzip2 glib;
1758   };
1760   wv2 = import ../tools/misc/wv2 {
1761     inherit stdenv fetchurl pkgconfig libgsf libxml2 glib;
1762   };
1764   x11_ssh_askpass = import ../tools/networking/x11-ssh-askpass {
1765     inherit fetchurl stdenv x11;
1766     inherit (xorg) imake;
1767   };
1769   xclip = import ../tools/misc/xclip {
1770     inherit fetchurl stdenv x11;
1771     inherit (xlibs) libXmu;
1772   };
1774   xfsprogs = import ../tools/filesystems/xfsprogs {
1775     inherit fetchurl stdenv libtool gettext libuuid;
1776   };
1778   xmlroff = import ../tools/typesetting/xmlroff {
1779     inherit fetchurl stdenv pkgconfig libxml2 libxslt popt;
1780     inherit (gtkLibs) glib pango gtk;
1781     inherit (gnome) libgnomeprint;
1782     inherit pangoxsl;
1783   };
1785   xmlto = import ../tools/typesetting/xmlto {
1786     inherit fetchurl stdenv flex libxml2 libxslt
1787             docbook_xml_dtd_42 docbook_xsl w3m
1788             bash getopt mktemp findutils makeWrapper;
1789   };
1791   xmltv = import ../tools/misc/xmltv {
1792     inherit fetchurl perl perlPackages;
1793   };
1795   xmpppy = builderDefsPackage (import ../development/python-modules/xmpppy) {
1796     inherit python setuptools;
1797   };
1799   xpf = import ../tools/text/xml/xpf {
1800     inherit fetchurl stdenv python;
1801     libxml2 = libxml2Python;
1802   };
1804   xsel = import ../tools/misc/xsel {
1805     inherit fetchurl stdenv x11;
1806   };
1808   zdelta = import ../tools/compression/zdelta {
1809     inherit fetchurl stdenv;
1810   };
1812   zile = import ../applications/editors/zile {
1813     inherit fetchurl stdenv ncurses help2man;
1814   };
1816   zip = import ../tools/archivers/zip {
1817     inherit fetchurl stdenv;
1818   };
1821   ### SHELLS
1824   bash = lowPrio (useFromStdenv "bash" bashReal);
1826   bashReal = makeOverridable (import ../shells/bash) {
1827     inherit fetchurl stdenv bison;
1828   };
1830   bashInteractive = appendToName "interactive" (bashReal.override {
1831     inherit readline texinfo;
1832     interactive = true;
1833   });
1835   tcsh = import ../shells/tcsh {
1836     inherit fetchurl stdenv ncurses;
1837   };
1839   zsh = import ../shells/zsh {
1840     inherit fetchurl stdenv ncurses coreutils;
1841   };
1844   ### DEVELOPMENT / COMPILERS
1847   abc =
1848     abcPatchable [];
1850   abcPatchable = patches :
1851     import ../development/compilers/abc/default.nix {
1852       inherit stdenv fetchurl patches jre apacheAnt;
1853       javaCup = import ../development/libraries/java/cup {
1854         inherit stdenv fetchurl jdk;
1855       };
1856     };
1858   aspectj =
1859     import ../development/compilers/aspectj {
1860       inherit stdenv fetchurl jre;
1861     };
1863   bigloo = import ../development/compilers/bigloo {
1864     inherit fetchurl stdenv;
1865   };
1867   dylan = import ../development/compilers/gwydion-dylan {
1868     inherit fetchurl stdenv perl boehmgc yacc flex readline;
1869     dylan =
1870       import ../development/compilers/gwydion-dylan/binary.nix {
1871         inherit fetchurl stdenv;
1872       };
1873   };
1875   ecl = builderDefsPackage ../development/compilers/ecl {
1876     inherit gmp mpfr;
1877   };
1879   adobeFlexSDK33 = import ../development/compilers/adobe-flex-sdk {
1880     inherit fetchurl stdenv unzip jre;
1881   };
1883   fpc = import ../development/compilers/fpc {
1884     inherit fetchurl stdenv gawk system;
1885   };
1887   gcc = gcc44;
1889   gcc295 = wrapGCC (import ../development/compilers/gcc-2.95 {
1890     inherit fetchurl stdenv noSysDirs;
1891   });
1893   gcc33 = wrapGCC (import ../development/compilers/gcc-3.3 {
1894     inherit fetchurl stdenv noSysDirs;
1895   });
1897   gcc34 = wrapGCC (import ../development/compilers/gcc-3.4 {
1898     inherit fetchurl stdenv noSysDirs;
1899   });
1901   # XXX: GCC 4.2 (and possibly others) misdetects `makeinfo' when
1902   # using Texinfo >= 4.10, just because it uses a stupid regexp that
1903   # expects a single digit after the dot.  As a workaround, we feed
1904   # GCC with Texinfo 4.9.  Stupid bug, hackish workaround.
1906   gcc40 = wrapGCC (makeOverridable (import ../development/compilers/gcc-4.0) {
1907     inherit fetchurl stdenv noSysDirs;
1908     texinfo = texinfo49;
1909     profiledCompiler = true;
1910   });
1912   gcc41 = wrapGCC (makeOverridable (import ../development/compilers/gcc-4.1) {
1913     inherit fetchurl stdenv noSysDirs;
1914     texinfo = texinfo49;
1915     profiledCompiler = false;
1916   });
1918   gcc42 = wrapGCC (makeOverridable (import ../development/compilers/gcc-4.2) {
1919     inherit fetchurl stdenv noSysDirs;
1920     profiledCompiler = false;
1921   });
1923   gcc44 = useFromStdenv "gcc" gcc44_real;
1925   gcc43 = lowPrio (wrapGCC (makeOverridable (import ../development/compilers/gcc-4.3) {
1926     inherit stdenv fetchurl texinfo gmp mpfr noSysDirs;
1927     profiledCompiler = true;
1928   }));
1930   gcc43_realCross = cross : makeOverridable (import ../development/compilers/gcc-4.3) {
1931     inherit stdenv fetchurl texinfo gmp mpfr noSysDirs cross;
1932     binutilsCross = binutilsCross cross;
1933     libcCross = libcCross cross;
1934     profiledCompiler = false;
1935     enableMultilib = true;
1936     crossStageStatic = false;
1937   };
1939   gcc44_realCross = cross : makeOverridable (import ../development/compilers/gcc-4.4) {
1940     inherit stdenv fetchurl texinfo gmp mpfr ppl cloogppl noSysDirs cross
1941         gettext which;
1942     binutilsCross = binutilsCross cross;
1943     libcCross = libcCross cross;
1944     profiledCompiler = false;
1945     enableMultilib = true;
1946     crossStageStatic = false;
1947   };
1949   gccCrossStageStatic = cross: wrapGCCCross {
1950     gcc = forceBuildDrv ((gcc44_realCross cross).override {
1951         crossStageStatic = true;
1952         langCC = false;
1953         libcCross = null;
1954     });
1955     libc = null;
1956     binutils = binutilsCross cross;
1957     inherit cross;
1958   };
1960   gccCrossStageFinal = cross: wrapGCCCross {
1961     gcc = forceBuildDrv (gcc44_realCross cross);
1962     libc = libcCross cross;
1963     binutils = binutilsCross cross;
1964     inherit cross;
1965   };
1967   gcc43_multi = lowPrio (wrapGCCWith (import ../build-support/gcc-wrapper) glibc_multi (gcc43.gcc.override {
1968     stdenv = overrideGCC stdenv (wrapGCCWith (import ../build-support/gcc-wrapper) glibc_multi gcc);
1969     profiledCompiler = false;
1970     enableMultilib = true;
1971   }));
1973   gcc44_real = lowPrio (wrapGCC (makeOverridable (import ../development/compilers/gcc-4.4) {
1974     inherit fetchurl stdenv texinfo gmp mpfr /* ppl cloogppl */
1975       gettext which noSysDirs;
1976     profiledCompiler = true;
1977   }));
1979   gccApple =
1980     wrapGCC ( (if stdenv.system == "i686-darwin" then import ../development/compilers/gcc-apple else import ../development/compilers/gcc-apple64) {
1981       inherit fetchurl stdenv noSysDirs;
1982       profiledCompiler = true;
1983     }) ;
1985   gccupc40 = wrapGCCUPC (import ../development/compilers/gcc-upc-4.0 {
1986     inherit fetchurl stdenv bison autoconf gnum4 noSysDirs;
1987     texinfo = texinfo49;
1988   });
1990   gfortran = gfortran43;
1992   gfortran40 = wrapGCC (gcc40.gcc.override {
1993     langFortran = true;
1994     langCC = false;
1995     inherit gmp mpfr;
1996   });
1998   gfortran41 = wrapGCC (gcc41.gcc.override {
1999     name = "gfortran";
2000     langFortran = true;
2001     langCC = false;
2002     langC = false;
2003     inherit gmp mpfr;
2004   });
2006   gfortran42 = wrapGCC (gcc42.gcc.override {
2007     name = "gfortran";
2008     langFortran = true;
2009     langCC = false;
2010     langC = false;
2011     inherit gmp mpfr;
2012   });
2014   gfortran43 = wrapGCC (gcc43.gcc.override {
2015     name = "gfortran";
2016     langFortran = true;
2017     langCC = false;
2018     langC = false;
2019     profiledCompiler = false;
2020   });
2022   gfortran44 = wrapGCC (gcc44.gcc.override {
2023     name = "gfortran";
2024     langFortran = true;
2025     langCC = false;
2026     langC = false;
2027     profiledCompiler = false;
2028   });
2030   gcj = gcj44;
2032   gcj44 = wrapGCC (gcc44.gcc.override {
2033     name = "gcj";
2034     langJava = true;
2035     langFortran = false;
2036     langCC = true;
2037     langC = false;
2038     profiledCompiler = false;
2039     inherit zip unzip zlib boehmgc gettext pkgconfig;
2040     inherit (gtkLibs) gtk;
2041     inherit (gnome) libart_lgpl;
2042     inherit (xlibs) libX11 libXt libSM libICE libXtst libXi libXrender
2043       libXrandr xproto renderproto xextproto inputproto randrproto;
2044   });
2046   gnat = gnat44;
2048   gnat44 = wrapGCC (gcc44_real.gcc.override {
2049     name = "gnat";
2050     langCC = false;
2051     langC = true;
2052     langAda = true;
2053     profiledCompiler = false;
2054     inherit gnatboot;
2055     # We can't use the ppl stuff, because we would have
2056     # libstdc++ problems.
2057     cloogppl = null;
2058     ppl = null;
2059   });
2061   gnatboot = wrapGCC (import ../development/compilers/gnatboot {
2062     inherit fetchurl stdenv;
2063   });
2065   ghdl = wrapGCC (import ../development/compilers/gcc-4.3 {
2066     inherit stdenv fetchurl texinfo gmp mpfr noSysDirs gnat;
2067     name = "ghdl";
2068     langVhdl = true;
2069     langCC = false;
2070     langC = false;
2071     profiledCompiler = false;
2072     enableMultilib = false;
2073   });
2075   # Not officially supported version for ghdl
2076   ghdl_gcc44 = lowPrio (wrapGCC (import ../development/compilers/gcc-4.4 {
2077     inherit stdenv fetchurl texinfo gmp mpfr noSysDirs gnat gettext which
2078       ppl cloogppl;
2079     name = "ghdl";
2080     langVhdl = true;
2081     langCC = false;
2082     langC = false;
2083     profiledCompiler = false;
2084     enableMultilib = false;
2085   }));
2087   /*
2088   Broken; fails because of unability to find its own symbols during linking
2090   gcl = builderDefsPackage ../development/compilers/gcl {
2091     inherit mpfr m4 binutils fetchcvs emacs;
2092     inherit (xlibs) libX11 xproto inputproto libXi
2093       libXext xextproto libXt libXaw libXmu;
2094     stdenv = (overrideGCC stdenv gcc34) // {gcc = gcc33;};
2095   };
2096   */
2098   # GHC
2100   # GHC binaries are around for bootstrapping purposes
2102   #ghc = haskellPackages.ghc;
2104   /*
2105   ghc642Binary = lowPrio (import ../development/compilers/ghc/6.4.2-binary.nix {
2106     inherit fetchurl stdenv ncurses gmp;
2107     readline = if stdenv.system == "i686-linux" then readline4 else readline5;
2108     perl = perl58;
2109   });
2110   */
2112   ghc6101Binary = lowPrio (import ../development/compilers/ghc/6.10.1-binary.nix {
2113     inherit fetchurl stdenv perl ncurses gmp libedit;
2114   });
2116   ghc6102Binary = lowPrio (import ../development/compilers/ghc/6.10.2-binary.nix {
2117     inherit fetchurl stdenv perl ncurses gmp libedit;
2118   });
2120   # For several compiler versions, we export a large set of Haskell-related
2121   # packages.
2123   haskellPackages = haskellPackages_ghc6104;
2125   /*
2126   haskellPackages_ghc642 = import ./haskell-packages.nix {
2127     inherit pkgs;
2128     ghc = import ../development/compilers/ghc/6.4.2.nix {
2129       inherit fetchurl stdenv perl ncurses readline m4 gmp;
2130       ghc = ghc642Binary;
2131     };
2132   };
2134   haskellPackages_ghc661 = import ./haskell-packages.nix {
2135     inherit pkgs;
2136     ghc = import ../development/compilers/ghc/6.6.1.nix {
2137       inherit fetchurl stdenv readline perl58 gmp ncurses m4;
2138       ghc = ghc642Binary;
2139     };
2140   };
2142   haskellPackages_ghc682 = import ./haskell-packages.nix {
2143     inherit pkgs;
2144     ghc = import ../development/compilers/ghc/6.8.2.nix {
2145       inherit fetchurl stdenv perl gmp ncurses m4;
2146       readline = readline5;
2147       ghc = ghc642Binary;
2148     };
2149   };
2151   haskellPackages_ghc683 = recurseIntoAttrs (import ./haskell-packages.nix {
2152     inherit pkgs;
2153     ghc = import ../development/compilers/ghc/6.8.3.nix {
2154       inherit fetchurl stdenv readline perl gmp ncurses m4;
2155       ghc = ghc642Binary;
2156       haddock = import ../development/tools/documentation/haddock/boot.nix {
2157         inherit gmp;
2158         cabal = import ../development/libraries/haskell/cabal/cabal.nix {
2159           inherit stdenv fetchurl lib;
2160           ghc = ghc642Binary;
2161         };
2162       };
2163     };
2164   });
2165   */
2167   haskellPackages_ghc6101 = import ./haskell-packages.nix {
2168     inherit pkgs;
2169     ghc = import ../development/compilers/ghc/6.10.1.nix {
2170       inherit fetchurl stdenv perl ncurses gmp libedit;
2171       ghc = ghc6101Binary;
2172     };
2173   };
2175   haskellPackages_ghc6102 = import ./haskell-packages.nix {
2176     inherit pkgs;
2177     ghc = import ../development/compilers/ghc/6.10.2.nix {
2178       inherit fetchurl stdenv perl ncurses gmp libedit;
2179       ghc = ghc6101Binary;
2180     };
2181   };
2183   haskellPackages_ghc6103 = recurseIntoAttrs (import ./haskell-packages.nix {
2184     inherit pkgs;
2185     ghc = import ../development/compilers/ghc/6.10.3.nix {
2186       inherit fetchurl stdenv perl ncurses gmp libedit;
2187       ghc = ghc6101Binary;
2188     };
2189   });
2191   haskellPackages_ghc6104 = recurseIntoAttrs (import ./haskell-packages.nix {
2192     inherit pkgs;
2193     ghc = import ../development/compilers/ghc/6.10.4.nix {
2194       inherit fetchurl stdenv perl ncurses gmp libedit;
2195       ghc = ghc6101Binary;
2196     };
2197   });
2199   # make this ghc default when it's supported by the Haskell Platform
2200   haskellPackages_ghc6121 = lowPrio (import ./haskell-packages.nix {
2201     inherit pkgs;
2202     ghc = import ../development/compilers/ghc/6.12.1.nix {
2203       inherit fetchurl stdenv perl ncurses gmp;
2204       ghc = ghc6101Binary;
2205     };
2206   });
2208   haskellPackages_ghcHEAD = import ./haskell-packages.nix {
2209     inherit pkgs;
2210     ghc = import ../development/compilers/ghc/6.11.nix {
2211       inherit fetchurl stdenv perl ncurses gmp libedit;
2212       inherit (haskellPackages) happy alex; # hope these aren't required for the final version
2213       ghc = ghc6101Binary;
2214     };
2215   };
2217   haxe = import ../development/compilers/haxe {
2218     inherit fetchurl sourceFromHead stdenv lib ocaml zlib makeWrapper;
2219   };
2221   falcon = builderDefsPackage (import ../development/interpreters/falcon) {
2222     inherit cmake;
2223   };
2225   go = import ../development/compilers/go {
2226     inherit stdenv fetchhg glibc bison ed which bash makeWrapper;
2227   };
2229   gprolog = import ../development/compilers/gprolog {
2230     inherit fetchurl stdenv;
2231   };
2233   gwt = import ../development/compilers/gwt {
2234     inherit stdenv fetchurl jdk;
2235     inherit (gtkLibs) glib gtk pango atk;
2236     inherit (xlibs) libX11 libXt;
2237     libstdcpp5 = gcc33.gcc;
2238   };
2240   ikarus = import ../development/compilers/ikarus {
2241     inherit stdenv fetchurl gmp;
2242   };
2244   #TODO add packages http://cvs.haskell.org/Hugs/downloads/2006-09/packages/ and test
2245   # commented out because it's using the new configuration style proposal which is unstable
2246   hugs = import ../development/compilers/hugs {
2247     inherit lib fetchurl stdenv composableDerivation;
2248   };
2250   openjdkDarwin = import ../development/compilers/openjdk-darwin {
2251     inherit fetchurl stdenv;
2252   };
2254   j2sdk14x = (
2255     assert system == "i686-linux";
2256     import ../development/compilers/jdk/default-1.4.nix {
2257       inherit fetchurl stdenv;
2258     });
2260   jdk5 = (
2261     assert system == "i686-linux" || system == "x86_64-linux";
2262     import ../development/compilers/jdk/default-5.nix {
2263       inherit fetchurl stdenv unzip;
2264     });
2266   jdk       = jdkdistro true  false;
2267   jre       = jdkdistro false false;
2269   jdkPlugin = jdkdistro true true;
2270   jrePlugin = jdkdistro false true;
2272   supportsJDK =
2273     system == "i686-linux" ||
2274     system == "x86_64-linux" ||
2275     system == "powerpc-linux";
2277   jdkdistro = installjdk: pluginSupport:
2278        (assert supportsJDK;
2279     (if pluginSupport then appendToName "plugin" else x: x) (import ../development/compilers/jdk {
2280       inherit fetchurl stdenv unzip installjdk xlibs pluginSupport makeWrapper;
2281     }));
2283   jikes = import ../development/compilers/jikes {
2284     inherit fetchurl stdenv;
2285   };
2287   lazarus = builderDefsPackage (import ../development/compilers/fpc/lazarus.nix) {
2288     inherit fpc makeWrapper;
2289     inherit (gtkLibs) gtk glib pango atk;
2290     inherit (xlibs) libXi inputproto libX11 xproto libXext xextproto;
2291   };
2293   llvm = import ../development/compilers/llvm {
2294     inherit fetchurl stdenv gcc flex perl libtool;
2295   };
2297   llvmGCC = builderDefsPackage (import ../development/compilers/llvm/llvm-gcc.nix) {
2298     flex=flex2535;
2299     inherit llvm perl libtool bison;
2300   };
2302   mono = import ../development/compilers/mono {
2303     inherit fetchurl stdenv bison pkgconfig gettext perl glib;
2304   };
2306   monoDLLFixer = import ../build-support/mono-dll-fixer {
2307     inherit stdenv perl;
2308   };
2310   mozart = import ../development/compilers/mozart {
2311     inherit fetchurl stdenv flex bison perl gmp zlib tcl tk gdbm m4 x11 emacs;
2312   };
2314   neko = import ../development/compilers/neko {
2315     inherit sourceFromHead fetchurl stdenv lib pkgconfig composableDerivation
2316       boehmgc apacheHttpd mysql zlib sqlite pcre apr makeWrapper;
2317     inherit (gtkLibs) gtk;
2318   };
2320   nasm = import ../development/compilers/nasm {
2321     inherit fetchurl stdenv;
2322   };
2324   ocaml = ocaml_3_11_1;
2326   ocaml_3_08_0 = import ../development/compilers/ocaml/3.08.0.nix {
2327     inherit fetchurl stdenv fetchcvs x11 ncurses;
2328   };
2330   ocaml_3_09_1 = import ../development/compilers/ocaml/3.09.1.nix {
2331     inherit fetchurl stdenv x11 ncurses;
2332   };
2334   ocaml_3_10_0 = import ../development/compilers/ocaml/3.10.0.nix {
2335     inherit fetchurl stdenv x11 ncurses;
2336   };
2338   ocaml_3_11_1 = import ../development/compilers/ocaml/3.11.1.nix {
2339     inherit fetchurl stdenv x11 ncurses;
2340   };
2342   opencxx = import ../development/compilers/opencxx {
2343     inherit fetchurl stdenv libtool;
2344     gcc = gcc33;
2345   };
2347   qcmm = import ../development/compilers/qcmm {
2348     lua   = lua4;
2349     ocaml = ocaml_3_08_0;
2350     inherit fetchurl stdenv mk noweb groff;
2351   };
2353   roadsend = import ../development/compilers/roadsend {
2354     inherit fetchurl stdenv flex bison bigloo lib curl composableDerivation;
2355     # optional features
2356     # all features pcre, fcgi xml mysql, sqlite3, (not implemented: odbc gtk gtk2)
2357     flags = ["pcre" "xml" "mysql"];
2358     inherit mysql libxml2 fcgi;
2359   };
2361   sbcl = builderDefsPackage (import ../development/compilers/sbcl) {
2362     inherit makeWrapper;
2363     clisp = clisp_2_44_1;
2364   };
2366   scala = import ../development/compilers/scala {
2367     inherit stdenv fetchurl;
2368   };
2370   stalin = import ../development/compilers/stalin {
2371     inherit stdenv fetchurl;
2372     inherit (xlibs) libX11;
2373   };
2375   strategoPackages = strategoPackages017;
2377   strategoPackages016 = import ../development/compilers/strategoxt/0.16.nix {
2378     inherit fetchurl pkgconfig aterm getopt;
2379     stdenv = overrideInStdenv stdenv [gnumake380];
2380   };
2382   strategoPackages017 = import ../development/compilers/strategoxt/0.17.nix {
2383     inherit fetchurl stdenv pkgconfig aterm getopt jdk ncurses;
2384     readline = readline5;
2385   };
2387   strategoPackages018 = import ../development/compilers/strategoxt/0.18.nix {
2388     inherit fetchurl stdenv pkgconfig aterm getopt jdk makeStaticBinaries ncurses;
2389     readline = readline5;
2390   };
2392   metaBuildEnv = import ../development/compilers/meta-environment/meta-build-env {
2393     inherit fetchurl stdenv;
2394   };
2396   swiProlog = import ../development/compilers/swi-prolog {
2397     inherit fetchurl stdenv gmp readline openssl libjpeg unixODBC zlib;
2398     inherit (xlibs) libXinerama libXft libXpm libSM libXt;
2399   };
2401   tinycc = import ../development/compilers/tinycc {
2402     inherit fetchurl stdenv perl texinfo;
2403   };
2405   visualcpp = (import ../development/compilers/visual-c++ {
2406     inherit fetchurl stdenv cabextract;
2407   });
2409   webdsl = import ../development/compilers/webdsl {
2410     inherit stdenv fetchurl pkgconfig strategoPackages;
2411   };
2413   win32hello = import ../development/compilers/visual-c++/test {
2414     inherit fetchurl stdenv visualcpp windowssdk;
2415   };
2417   wrapGCCWith = gccWrapper: glibc: baseGCC: gccWrapper {
2418     nativeTools = stdenv ? gcc && stdenv.gcc.nativeTools;
2419     nativeLibc = stdenv ? gcc && stdenv.gcc.nativeLibc;
2420     nativePrefix = if stdenv ? gcc then stdenv.gcc.nativePrefix else "";
2421     gcc = baseGCC;
2422     libc = glibc;
2423     inherit stdenv binutils coreutils zlib;
2424   };
2426   wrapGCC = wrapGCCWith (import ../build-support/gcc-wrapper) glibc;
2428   wrapGCCCross =
2429     {gcc, libc, binutils, cross, shell ? "", name ? "gcc-cross-wrapper"}:
2431     forceBuildDrv (import ../build-support/gcc-cross-wrapper {
2432       nativeTools = false;
2433       nativeLibc = false;
2434       noLibc = (libc == null);
2435       inherit stdenv gcc binutils libc shell name cross;
2436     });
2438   # FIXME: This is a specific hack for GCC-UPC.  Eventually, we may
2439   # want to merge `gcc-upc-wrapper' and `gcc-wrapper'.
2440   wrapGCCUPC = baseGCC: import ../build-support/gcc-upc-wrapper {
2441     nativeTools = stdenv ? gcc && stdenv.gcc.nativeTools;
2442     nativeLibc = stdenv ? gcc && stdenv.gcc.nativeLibc;
2443     gcc = baseGCC;
2444     libc = glibc;
2445     inherit stdenv binutils;
2446   };
2448   # prolog
2449   yap = import ../development/compilers/yap {
2450     inherit fetchurl stdenv;
2451   };
2454   ### DEVELOPMENT / INTERPRETERS
2456   acl2 = builderDefsPackage ../development/interpreters/acl2 {
2457     inherit sbcl;
2458   };
2460   clisp = import ../development/interpreters/clisp {
2461     inherit fetchurl stdenv libsigsegv gettext
2462       readline ncurses coreutils pcre zlib libffi libffcall;
2463     inherit (xlibs) libX11 libXau libXt xproto
2464       libXpm libXext xextproto;
2465   };
2467   # compatibility issues in 2.47 - at list 2.44.1 is known good
2468   # for sbcl bootstrap
2469   clisp_2_44_1 = import ../development/interpreters/clisp/2.44.1.nix {
2470     inherit fetchurl stdenv gettext
2471       readline ncurses coreutils pcre zlib libffi libffcall;
2472     inherit (xlibs) libX11 libXau libXt xproto
2473       libXpm libXext xextproto;
2474     libsigsegv = libsigsegv_25;
2475   };
2477   erlang = import ../development/interpreters/erlang {
2478     inherit fetchurl stdenv perl gnum4 ncurses openssl;
2479   };
2481   guile = import ../development/interpreters/guile {
2482     inherit fetchurl stdenv readline libtool gmp gawk makeWrapper;
2483   };
2485   guile_1_9 = import ../development/interpreters/guile/1.9.nix {
2486     inherit fetchurl stdenv readline libtool gmp gawk makeWrapper
2487       libunistring pkgconfig boehmgc;
2488   };
2490   guile_1_9_coverage = import ../development/interpreters/guile/1.9.nix {
2491     inherit fetchurl stdenv readline libtool gmp gawk makeWrapper
2492       libunistring pkgconfig boehmgc;
2493     inherit (releaseTools) coverageAnalysis;
2494   };
2496   io = builderDefsPackage (import ../development/interpreters/io) {
2497     inherit sqlite zlib gmp libffi cairo ncurses freetype mesa
2498       libpng libtiff libjpeg readline libsndfile libxml2
2499       freeglut e2fsprogs libsamplerate pcre libevent libedit;
2500   };
2502   kaffe =  import ../development/interpreters/kaffe {
2503     inherit fetchurl stdenv jikes alsaLib xlibs;
2504   };
2506   lua4 = import ../development/interpreters/lua-4 {
2507     inherit fetchurl stdenv;
2508   };
2510   lua5 = import ../development/interpreters/lua-5 {
2511     inherit fetchurl stdenv ncurses readline;
2512   };
2514   maude = import ../development/interpreters/maude {
2515     inherit fetchurl stdenv flex bison ncurses buddy tecla gmpxx libsigsegv makeWrapper;
2516   };
2518   octave = import ../development/interpreters/octave {
2519     inherit stdenv fetchurl gfortran readline ncurses perl flex qhull texinfo;
2520   };
2522   # mercurial (hg) bleeding edge version
2523   octaveHG = import ../development/interpreters/octave/hg.nix {
2524     inherit fetchurl sourceFromHead readline ncurses perl flex atlas getConfig glibc qhull gfortran;
2525     inherit automake autoconf bison gperf lib python gnuplot texinfo texLive; # for dev Version
2526     inherit stdenv;
2527     inherit (xlibs) libX11;
2528     #stdenv = overrideGCC stdenv gcc40;
2529   };
2531   perl58 = import ../development/interpreters/perl-5.8 {
2532     inherit fetchurl stdenv;
2533     impureLibcPath = if stdenv.isLinux then null else "/usr";
2534   };
2536   perl510 = makeOverridable (import ../development/interpreters/perl-5.10) {
2537     inherit stdenv;
2538     fetchurl = fetchurlBoot;
2539   };
2541   perl = useFromStdenv "perl"
2542     (if system != "i686-cygwin" then perl510 else sysPerl);
2544   # FIXME: unixODBC needs patching on Darwin (see darwinports)
2545   phpOld = import ../development/interpreters/php {
2546     inherit stdenv fetchurl flex bison libxml2 apacheHttpd;
2547     unixODBC =
2548       if stdenv.isDarwin then null else unixODBC;
2549   };
2551   php = makeOverridable (import ../development/interpreters/php_configurable) {
2552     inherit
2553       stdenv fetchurl lib composableDerivation autoconf automake
2554       flex bison apacheHttpd mysql libxml2 # gettext
2555       zlib curl gd postgresql openssl pkgconfig sqlite getConfig;
2556   };
2558   phpXdebug = import ../development/interpreters/php-xdebug {
2559     inherit stdenv fetchurl php autoconf automake;
2560   };
2562   phpIniBuilder = makeOverridable (import ../development/interpreters/php/ini-bulider.nix) {
2563     inherit php runCommand;
2564   };
2566   pltScheme = builderDefsPackage (import ../development/interpreters/plt-scheme) {
2567     inherit cairo fontconfig freetype libjpeg libpng openssl
2568       perl mesa zlib which;
2569     inherit (xorg) libX11 libXaw libXft libXrender libICE xproto
2570       renderproto pixman libSM libxcb libXext xextproto libXmu
2571       libXt;
2572   };
2574   polyml = import ../development/compilers/polyml {
2575     inherit stdenv fetchurl;
2576   };
2578   python = if getConfig ["python" "full"] false then pythonFull else pythonBase;
2579   python25 = if getConfig ["python" "full"] false then python25Full else python25Base;
2580   python26 = if getConfig ["python" "full"] false then python26Full else python26Base;
2581   pythonBase = if stdenv.isDarwin then python25Base else python26Base;
2582   pythonFull = if stdenv.isDarwin then python25Full else python26Full;
2584   python24 = import ../development/interpreters/python/2.4 {
2585     inherit fetchurl stdenv zlib bzip2;
2586   };
2588   python25Base = composedArgsAndFun (import ../development/interpreters/python/2.5) {
2589     inherit fetchurl stdenv zlib bzip2 gdbm;
2590   };
2592   python25Full = python25Base.passthru.function {
2593     # FIXME: We lack ncurses support, needed, e.g., for `gpsd'.
2594     db4 = if getConfig ["python" "db4Support"] true then db4 else null;
2595     sqlite = if getConfig ["python" "sqliteSupport"] true then sqlite else null;
2596     readline = if getConfig ["python" "readlineSupport"] true then readline else null;
2597     openssl = if getConfig ["python" "opensslSupport"] true then openssl else null;
2598     tk = if getConfig ["python" "tkSupport"] true then tk else null;
2599     tcl = if getConfig ["python" "tkSupport"] true then tcl else null;
2600     libX11 = if getConfig ["python" "tkSupport"] true then xlibs.libX11 else null;
2601     xproto = if getConfig ["python" "tkSupport"] true then xlibs.xproto else null;
2602   };
2604   python26Base = composedArgsAndFun (import ../development/interpreters/python/2.6) {
2605     inherit fetchurl stdenv zlib bzip2 gdbm;
2606     arch = if stdenv.isDarwin then darwinArchUtility else null;
2607     sw_vers = if stdenv.isDarwin then darwinSwVersUtility else null;
2608   };
2610   python26Full = python26Base.passthru.function {
2611     # FIXME: We lack ncurses support, needed, e.g., for `gpsd'.
2612     db4 = if getConfig ["python" "db4Support"] true then db4 else null;
2613     sqlite = if getConfig ["python" "sqliteSupport"] true then sqlite else null;
2614     readline = if getConfig ["python" "readlineSupport"] true then readline else null;
2615     openssl = if getConfig ["python" "opensslSupport"] true then openssl else null;
2616     tk = if getConfig ["python" "tkSupport"] true then tk else null;
2617     tcl = if getConfig ["python" "tkSupport"] true then tcl else null;
2618     libX11 = if getConfig ["python" "tkSupport"] true then xlibs.libX11 else null;
2619     xproto = if getConfig ["python" "tkSupport"] true then xlibs.xproto else null;
2620   };
2622   # new python and lib proposal
2623   # - adding a python lib to buildinputs should be enough
2624   #   (handles .pth files by patching site.py
2625   #    while introducing NIX_PYTHON_SITES describing list of modules)
2626   # - adding pyCheck = "import foo" test scripts to ensure libraries can be imported
2627   # - providing pythonWrapper so that you can run python and import the selected libraries
2628   # feel free to comment on this (experimental)
2629   python25New = recurseIntoAttrs ((import ../development/interpreters/python-new/2.5) pkgs);
2630   pythonNew = python25New; # the default python
2632   pyrex = pyrex095;
2634   pyrex095 = import ../development/interpreters/pyrex/0.9.5.nix {
2635     inherit fetchurl stdenv stringsWithDeps lib builderDefs python;
2636   };
2638   pyrex096 = import ../development/interpreters/pyrex/0.9.6.nix {
2639     inherit fetchurl stdenv stringsWithDeps lib builderDefs python;
2640   };
2642   Qi = composedArgsAndFun (import ../development/compilers/qi/9.1.nix) {
2643     inherit clisp stdenv fetchurl builderDefs unzip;
2644   };
2646   ruby18 = import ../development/interpreters/ruby {
2647     inherit fetchurl stdenv readline ncurses zlib openssl gdbm;
2648   };
2649   #ruby19 = import ../development/interpreters/ruby/ruby-19.nix { inherit ruby18 fetchurl; };
2650   ruby = ruby18;
2652   rubyLibs = recurseIntoAttrs (import ../development/interpreters/ruby/libs.nix {
2653     inherit pkgs stdenv;
2654   });
2656   rake = import ../development/ruby-modules/rake {
2657     inherit fetchurl stdenv ruby ;
2658   };
2660   rubySqlite3 = import ../development/ruby-modules/sqlite3 {
2661     inherit fetchurl stdenv ruby sqlite;
2662   };
2664   rLang = import ../development/interpreters/r-lang {
2665     inherit fetchurl stdenv readline perl gfortran libpng zlib;
2666     inherit (xorg) libX11 libXt;
2667     withBioconductor = getConfig ["rLang" "withBioconductor"] false;
2668   };
2670   rubygemsFun = ruby: builderDefsPackage (import ../development/interpreters/ruby/gems.nix) {
2671     inherit ruby makeWrapper;
2672   };
2673   rubygems = rubygemsFun ruby;
2675   rq = import ../applications/networking/cluster/rq {
2676     inherit fetchurl stdenv sqlite ruby ;
2677   };
2679   scsh = import ../development/interpreters/scsh {
2680     inherit stdenv fetchurl;
2681   };
2683   spidermonkey = import ../development/interpreters/spidermonkey {
2684     inherit fetchurl stdenv readline;
2685   };
2687   sysPerl = import ../development/interpreters/sys-perl {
2688     inherit stdenv;
2689   };
2691   tcl = import ../development/interpreters/tcl {
2692     inherit fetchurl stdenv;
2693   };
2695   xulrunnerWrapper = {application, launcher}:
2696     import ../development/interpreters/xulrunner/wrapper {
2697       inherit stdenv application launcher;
2698       xulrunner = xulrunner35;
2699     };
2702   ### DEVELOPMENT / MISC
2704   avrgcclibc = import ../development/misc/avr-gcc-with-avr-libc {
2705     inherit fetchurl stdenv writeTextFile gnumake coreutils gnutar bzip2
2706       gnugrep gnused gawk;
2707     gcc = gcc40;
2708   };
2710   avr8burnomat = import ../development/misc/avr8-burn-omat {
2711     inherit fetchurl stdenv unzip;
2712   };
2714   /*
2715   toolbus = import ../development/interpreters/toolbus {
2716     inherit stdenv fetchurl atermjava toolbuslib aterm yacc flex;
2717   };
2718   */
2720   sourceFromHead = import ../build-support/source-from-head-fun.nix {
2721     inherit getConfig;
2722   };
2724   ecj = import ../development/eclipse/ecj {
2725     inherit fetchurl stdenv unzip ant gcj;
2726   };
2728   jdtsdk = import ../development/eclipse/jdt-sdk {
2729     inherit fetchurl stdenv unzip;
2730   };
2732   jruby116 = import ../development/interpreters/jruby {
2733     inherit fetchurl stdenv;
2734   };
2736   guileCairo = import ../development/guile-modules/guile-cairo {
2737     inherit fetchurl stdenv guile pkgconfig cairo guileLib;
2738   };
2740   guileGnome = import ../development/guile-modules/guile-gnome {
2741     inherit fetchurl stdenv guile guileLib gwrap pkgconfig guileCairo;
2742     gconf = gnome.GConf;
2743     inherit (gnome) glib gnomevfs gtk libglade libgnome libgnomecanvas
2744       libgnomeui pango;
2745   };
2747   guileLib = import ../development/guile-modules/guile-lib {
2748     inherit fetchurl stdenv guile texinfo;
2749   };
2751   windowssdk = (
2752     import ../development/misc/windows-sdk {
2753       inherit fetchurl stdenv cabextract;
2754     });
2757   ### DEVELOPMENT / TOOLS
2760   antlr = import ../development/tools/parsing/antlr/2.7.7.nix {
2761     inherit fetchurl stdenv jdk python;
2762   };
2764   antlr3 = import ../development/tools/parsing/antlr {
2765     inherit fetchurl stdenv jre;
2766   };
2768   antDarwin = apacheAnt.override rec { jdk = openjdkDarwin ; name = "ant-" + jdk.name ; } ;
2770   ant = apacheAnt;
2771   apacheAnt = makeOverridable (import ../development/tools/build-managers/apache-ant) {
2772     inherit fetchurl stdenv jdk;
2773     name = "ant-" + jdk.name;
2774   };
2776   apacheAnt14 = import ../development/tools/build-managers/apache-ant {
2777     inherit fetchurl stdenv;
2778     jdk = j2sdk14x;
2779     name = "ant-" + j2sdk14x.name;
2780   };
2782   apacheAntGcj = import ../development/tools/build-managers/apache-ant/from-source.nix {
2783     inherit fetchurl stdenv;
2784     inherit junit; # must be either pre-built or built with GCJ *alone*
2785     javac = gcj;
2786     jvm = gcj;
2787   };
2789   autobuild = import ../development/tools/misc/autobuild {
2790     inherit fetchurl stdenv makeWrapper perl openssh rsync;
2791   };
2793   autoconf = import ../development/tools/misc/autoconf {
2794     inherit fetchurl stdenv perl m4;
2795   };
2797   autoconf213 = import ../development/tools/misc/autoconf/2.13.nix {
2798     inherit fetchurl stdenv perl m4 lzma;
2799   };
2801   automake = automake110x;
2803   automake17x = import ../development/tools/misc/automake/automake-1.7.x.nix {
2804     inherit fetchurl stdenv perl autoconf makeWrapper;
2805   };
2807   automake19x = import ../development/tools/misc/automake/automake-1.9.x.nix {
2808     inherit fetchurl stdenv perl autoconf makeWrapper;
2809   };
2811   automake110x = import ../development/tools/misc/automake/automake-1.10.x.nix {
2812     inherit fetchurl stdenv perl autoconf makeWrapper;
2813   };
2815   automake111x = import ../development/tools/misc/automake/automake-1.11.x.nix {
2816     inherit fetchurl stdenv perl autoconf makeWrapper;
2817   };
2819   avrdude = import ../development/tools/misc/avrdude {
2820     inherit lib fetchurl stdenv flex yacc composableDerivation texLive;
2821   };
2823   binutils = useFromStdenv "binutils"
2824     (import ../development/tools/misc/binutils {
2825       inherit fetchurl stdenv noSysDirs;
2826     });
2828   binutilsCross = cross : forceBuildDrv (import ../development/tools/misc/binutils {
2829       inherit stdenv fetchurl cross;
2830       noSysDirs = true;
2831   });
2833   bison = bison23;
2835   bison1875 = import ../development/tools/parsing/bison/bison-1.875.nix {
2836     inherit fetchurl stdenv m4;
2837   };
2839   bison23 = import ../development/tools/parsing/bison/bison-2.3.nix {
2840     inherit fetchurl stdenv m4;
2841   };
2843   bison24 = import ../development/tools/parsing/bison/bison-2.4.nix {
2844     inherit fetchurl stdenv m4;
2845   };
2847   buildbot = import ../development/tools/build-managers/buildbot {
2848     inherit fetchurl stdenv buildPythonPackage texinfo;
2849     inherit (pythonPackages) twisted;
2850   };
2852   byacc = import ../development/tools/parsing/byacc {
2853     inherit fetchurl stdenv;
2854   };
2856   camlp5_strict = import ../development/tools/ocaml/camlp5 {
2857     inherit stdenv fetchurl ocaml;
2858   };
2860   camlp5_transitional = import ../development/tools/ocaml/camlp5 {
2861     inherit stdenv fetchurl ocaml;
2862     transitional = true;
2863   };
2865   ccache = import ../development/tools/misc/ccache {
2866     inherit fetchurl stdenv;
2867   };
2869   ctags = import ../development/tools/misc/ctags {
2870     inherit fetchurl sourceFromHead stdenv automake autoconf;
2871   };
2873   ctagsWrapped = import ../development/tools/misc/ctags/wrapped.nix {
2874     inherit pkgs ctags writeScriptBin;
2875   };
2877   cmake = import ../development/tools/build-managers/cmake {
2878     inherit fetchurl stdenv replace ncurses;
2879   };
2881   coccinelle = import ../development/tools/misc/coccinelle {
2882     inherit fetchurl stdenv perl python ocaml ncurses makeWrapper;
2883   };
2885   cproto = import ../development/tools/misc/cproto {
2886     inherit fetchurl stdenv flex bison;
2887   };
2889   cflow = import ../development/tools/misc/cflow {
2890     inherit fetchurl stdenv gettext emacs;
2891   };
2893   cscope = import ../development/tools/misc/cscope {
2894     inherit fetchurl stdenv ncurses pkgconfig emacs;
2895   };
2897   dejagnu = import ../development/tools/misc/dejagnu {
2898     inherit fetchurl stdenv expect makeWrapper;
2899   };
2901   ddd = import ../development/tools/misc/ddd {
2902     inherit fetchurl stdenv lesstif ncurses;
2903     inherit (xlibs) libX11 libXt;
2904   };
2906   distcc = import ../development/tools/misc/distcc {
2907     inherit fetchurl stdenv popt;
2908     python = if getPkgConfig "distcc" "python" true then python else null;
2909     avahi = if getPkgConfig "distcc" "avahi" false then avahi else null;
2910     pkgconfig = if getPkgConfig "distcc" "gtk" false then pkgconfig else null;
2911     gtk = if getPkgConfig "distcc" "gtk" false then gtkLibs.gtk else null;
2912     static = getPkgConfig "distcc" "static" false;
2913   };
2915   docutils = builderDefsPackage (import ../development/tools/documentation/docutils) {
2916     inherit python pil makeWrapper;
2917   };
2919   doxygen = import ../development/tools/documentation/doxygen {
2920     inherit fetchurl stdenv graphviz perl flex bison gnumake;
2921     inherit (xlibs) libX11 libXext;
2922     qt = if getPkgConfig "doxygen" "qt4" true then qt4 else null;
2923   };
2925   eggdbus = import ../development/tools/misc/eggdbus {
2926     inherit stdenv fetchurl pkgconfig dbus dbus_glib glib;
2927   };
2929   elfutils = import ../development/tools/misc/elfutils {
2930     inherit fetchurl stdenv m4;
2931   };
2933   epm = import ../development/tools/misc/epm {
2934     inherit fetchurl stdenv rpm;
2935   };
2937   emma = import ../development/tools/analysis/emma {
2938     inherit fetchurl stdenv unzip;
2939   };
2941   findbugs = import ../development/tools/analysis/findbugs {
2942     inherit fetchurl stdenv;
2943   };
2945   pmd = import ../development/tools/analysis/pmd {
2946     inherit fetchurl stdenv unzip;
2947   };
2949   jdepend = import ../development/tools/analysis/jdepend {
2950     inherit fetchurl stdenv unzip;
2951   };
2953   checkstyle = import ../development/tools/analysis/checkstyle {
2954     inherit fetchurl stdenv unzip;
2955   };
2957   flex = flex254a;
2959   flex2535 = import ../development/tools/parsing/flex/flex-2.5.35.nix {
2960     inherit fetchurl stdenv yacc m4;
2961   };
2963   flex2534 = import ../development/tools/parsing/flex/flex-2.5.34.nix {
2964     inherit fetchurl stdenv yacc m4;
2965   };
2967   flex2533 = import ../development/tools/parsing/flex/flex-2.5.33.nix {
2968     inherit fetchurl stdenv yacc m4;
2969   };
2971   # Note: 2.5.4a is much older than 2.5.35 but happens first when sorting
2972   # alphabetically, hence the low priority.
2973   flex254a = lowPrio (import ../development/tools/parsing/flex/flex-2.5.4a.nix {
2974     inherit fetchurl stdenv yacc;
2975   });
2977   m4 = gnum4;
2979   global = import ../development/tools/misc/global {
2980     inherit fetchurl stdenv;
2981   };
2983   gnum4 = makeOverridable (import ../development/tools/misc/gnum4) {
2984     inherit fetchurl stdenv;
2985   };
2987   gnumake = useFromStdenv "gnumake"
2988     (import ../development/tools/build-managers/gnumake {
2989       inherit fetchurl stdenv;
2990     });
2992   gnumake380 = import ../development/tools/build-managers/gnumake-3.80 {
2993     inherit fetchurl stdenv;
2994   };
2996   gperf = import ../development/tools/misc/gperf {
2997     inherit fetchurl stdenv;
2998   };
3000   gtkdialog = import ../development/tools/misc/gtkdialog {
3001     inherit fetchurl stdenv pkgconfig;
3002     inherit (gtkLibs) gtk;
3003   };
3005   guileLint = import ../development/tools/guile/guile-lint {
3006     inherit fetchurl stdenv guile;
3007   };
3009   gwrap = import ../development/tools/guile/g-wrap {
3010     inherit fetchurl stdenv guile libffi pkgconfig guileLib glib;
3011   };
3013   help2man = import ../development/tools/misc/help2man {
3014     inherit fetchurl stdenv perl gettext;
3015     inherit (perlPackages) LocaleGettext;
3016   };
3018   iconnamingutils = import ../development/tools/misc/icon-naming-utils {
3019     inherit fetchurl stdenv perl;
3020     inherit (perlPackages) XMLSimple;
3021   };
3023   indent = import ../development/tools/misc/indent {
3024     inherit fetchurl stdenv;
3025   };
3027   inotifyTools = import ../development/tools/misc/inotify-tools {
3028     inherit fetchurl stdenv lib;
3029   };
3031   jikespg = import ../development/tools/parsing/jikespg {
3032     inherit fetchurl stdenv;
3033   };
3035   kcachegrind = import ../development/tools/misc/kcachegrind {
3036     inherit fetchurl stdenv kdelibs zlib perl expat libpng libjpeg;
3037     inherit (xlibs) libX11 libXext libSM;
3038     qt = qt3;
3039   };
3041   lcov = import ../development/tools/analysis/lcov {
3042     inherit fetchurl stdenv perl;
3043   };
3045   libtool = libtool_2;
3047   libtool_1_5 = import ../development/tools/misc/libtool {
3048     inherit fetchurl stdenv perl m4;
3049   };
3051   libtool_2 = import ../development/tools/misc/libtool/libtool2.nix {
3052     inherit fetchurl stdenv lzma perl m4;
3053   };
3055   lsof = import ../development/tools/misc/lsof {
3056     inherit fetchurl stdenv;
3057   };
3059   ltrace = composedArgsAndFun (import ../development/tools/misc/ltrace/0.5-3deb.nix) {
3060     inherit fetchurl stdenv builderDefs stringsWithDeps lib elfutils;
3061   };
3063   mk = import ../development/tools/build-managers/mk {
3064     inherit fetchurl stdenv;
3065   };
3067   noweb = import ../development/tools/literate-programming/noweb {
3068     inherit fetchurl stdenv;
3069   };
3071   openocd = import ../development/tools/misc/openocd {
3072     inherit fetchurl stdenv libftdi;
3073   };
3075   oprofile = import ../development/tools/profiling/oprofile {
3076     inherit fetchurl stdenv binutils popt;
3077     inherit makeWrapper gawk which gnugrep;
3078   };
3080   patchelf = useFromStdenv "patchelf"
3081     (import ../development/tools/misc/patchelf {
3082       inherit fetchurl stdenv;
3083     });
3085   pmccabe = import ../development/tools/misc/pmccabe {
3086     inherit fetchurl stdenv;
3087   };
3089   /**
3090    * pkgconfig is optionally taken from the stdenv to allow bootstrapping
3091    * of glib and pkgconfig itself on MinGW.
3092    */
3093   pkgconfigReal = useFromStdenv "pkgconfig"
3094     (import ../development/tools/misc/pkgconfig {
3095       inherit fetchurl stdenv;
3096     });
3098   /* Make pkgconfig always return a buildDrv, never a proper hostDrv,
3099      because most usage of pkgconfig as buildInput (inheritance of
3100      pre-cross nixpkgs) means using it using as buildNativeInput
3101      cross_renaming: we should make all programs use pkgconfig as
3102      buildNativeInput after the renaming.
3103      */
3104   pkgconfig = forceBuildDrv pkgconfigReal;
3106   radare = import ../development/tools/analysis/radare {
3107     inherit stdenv fetchurl pkgconfig libusb readline gtkdialog python
3108       ruby libewf perl;
3109     inherit (gtkLibs) gtk;
3110     inherit (gnome) vte;
3111     lua = lua5;
3112     useX11 = getConfig ["radare" "useX11"] false;
3113     pythonBindings = getConfig ["radare" "pythonBindings"] false;
3114     rubyBindings = getConfig ["radare" "rubyBindings"] false;
3115     luaBindings = getConfig ["radare" "luaBindings"] false;
3116   };
3118   ragel = import ../development/tools/parsing/ragel {
3119     inherit composableDerivation fetchurl transfig texLive;
3120   };
3122   remake = import ../development/tools/build-managers/remake {
3123       inherit fetchurl stdenv;
3124     };
3126   # couldn't find the source yet
3127   seleniumRCBin = import ../development/tools/selenium/remote-control {
3128     inherit fetchurl stdenv unzip;
3129     jre = jdk;
3130   };
3132   scons = import ../development/tools/build-managers/scons {
3133     inherit fetchurl stdenv python makeWrapper;
3134   };
3136   sloccount = import ../development/tools/misc/sloccount {
3137     inherit fetchurl stdenv perl;
3138   };
3140   sparse = import ../development/tools/analysis/sparse {
3141     inherit fetchurl stdenv pkgconfig;
3142   };
3144   spin = import ../development/tools/analysis/spin {
3145     inherit fetchurl stdenv flex yacc tk;
3146   };
3148   splint = import ../development/tools/analysis/splint {
3149     inherit fetchurl stdenv flex;
3150   };
3152   strace = import ../development/tools/misc/strace {
3153     inherit fetchurl stdenv;
3154   };
3156   swig = import ../development/tools/misc/swig {
3157     inherit fetchurl stdenv boost;
3158   };
3160   swigWithJava = swig;
3162   swftools = import ../tools/video/swftools {
3163     inherit fetchurl stdenv x264 zlib libjpeg freetype giflib;
3164   };
3166   texinfo49 = import ../development/tools/misc/texinfo/4.9.nix {
3167     inherit fetchurl stdenv ncurses;
3168   };
3170   texinfo = makeOverridable (import ../development/tools/misc/texinfo) {
3171     inherit fetchurl stdenv ncurses lzma;
3172   };
3174   texi2html = import ../development/tools/misc/texi2html {
3175     inherit fetchurl stdenv perl;
3176   };
3178   uisp = import ../development/tools/misc/uisp {
3179     inherit fetchurl stdenv;
3180   };
3182   gdb = import ../development/tools/misc/gdb {
3183     inherit fetchurl stdenv ncurses gmp mpfr expat texinfo;
3184     readline = readline5;
3185   };
3187   gdbCross = import ../development/tools/misc/gdb {
3188     inherit fetchurl stdenv ncurses gmp mpfr expat texinfo;
3189     readline = readline5;
3190     target = crossSystem;
3191   };
3193   valgrind = import ../development/tools/analysis/valgrind {
3194     inherit fetchurl stdenv perl gdb autoconf automake;
3195   };
3197   xxdiff = builderDefsPackage (import ../development/tools/misc/xxdiff/3.2.nix) {
3198     flex = flex2535;
3199     qt = qt3;
3200     inherit pkgconfig makeWrapper bison python;
3201     inherit (xlibs) libXext libX11;
3202   };
3204   yacc = bison;
3206   yodl = import ../development/tools/misc/yodl {
3207     inherit stdenv fetchurl perl;
3208   };
3211   ### DEVELOPMENT / LIBRARIES
3214   a52dec = import ../development/libraries/a52dec {
3215     inherit fetchurl stdenv;
3216   };
3218   aalib = import ../development/libraries/aalib {
3219     inherit fetchurl stdenv ncurses;
3220   };
3222   acl = useFromStdenv "acl"
3223     (import ../development/libraries/acl {
3224       inherit stdenv fetchurl gettext attr libtool;
3225     });
3227   adns = import ../development/libraries/adns/1.4.nix {
3228     inherit stdenv fetchurl;
3229     static = getPkgConfig "adns" "static" (stdenv ? isStatic || stdenv ? isDietLibC);
3230   };
3232   agg = import ../development/libraries/agg {
3233     inherit fetchurl stdenv autoconf automake libtool pkgconfig
3234       freetype SDL;
3235     inherit (xlibs) libX11;
3236   };
3238   amrnb = import ../development/libraries/amrnb {
3239     inherit fetchurl stdenv unzip;
3240   };
3242   amrwb = import ../development/libraries/amrwb {
3243     inherit fetchurl stdenv unzip;
3244   };
3246   apr = makeOverridable (import ../development/libraries/apr) {
3247     inherit (pkgsOverriden) fetchurl stdenv;
3248   };
3250   aprutil = makeOverridable (import ../development/libraries/apr-util) {
3251     inherit (pkgsOverriden) fetchurl stdenv apr expat db4;
3252     bdbSupport = true;
3253   };
3255   arts = import ../development/libraries/arts {
3256     inherit fetchurl stdenv pkgconfig;
3257     inherit (xlibs) libX11 libXext;
3258     inherit kdelibs zlib libjpeg libpng perl;
3259     qt = qt3;
3260     inherit (gnome) glib;
3261   };
3263   aspell = import ../development/libraries/aspell {
3264     inherit fetchurl stdenv perl;
3265   };
3267   aspellDicts = recurseIntoAttrs (import ../development/libraries/aspell/dictionaries.nix {
3268     inherit fetchurl stdenv aspell which;
3269   });
3271   aterm = aterm25;
3273   aterm242fixes = lowPrio (import ../development/libraries/aterm/2.4.2-fixes.nix {
3274     inherit fetchurl stdenv;
3275   });
3277   aterm25 = makeOverridable (import ../development/libraries/aterm/2.5.nix) {
3278     inherit fetchurl stdenv;
3279   };
3281   aterm28 = lowPrio (import ../development/libraries/aterm/2.8.nix {
3282     inherit fetchurl stdenv;
3283   });
3285   attr = useFromStdenv "attr"
3286     (import ../development/libraries/attr {
3287       inherit stdenv fetchurl gettext libtool;
3288     });
3290   aubio = import ../development/libraries/aubio {
3291     inherit fetchurl stdenv pkgconfig fftw libsndfile libsamplerate python
3292       alsaLib jackaudio;
3293   };
3295   axis = import ../development/libraries/axis {
3296     inherit fetchurl stdenv;
3297   };
3299   babl = import ../development/libraries/babl {
3300     inherit fetchurl stdenv;
3301   };
3303   beecrypt = import ../development/libraries/beecrypt {
3304     inherit fetchurl stdenv m4;
3305   };
3307   boehmgc = import ../development/libraries/boehm-gc {
3308     inherit fetchurl stdenv;
3309   };
3311   boolstuff = import ../development/libraries/boolstuff {
3312     inherit fetchurl stdenv lib pkgconfig;
3313   };
3315   boost_1_36_0 = import ../development/libraries/boost/1.36.0.nix {
3316     inherit fetchurl stdenv icu expat zlib bzip2 python;
3317   };
3319   boost = makeOverridable (import ../development/libraries/boost/1.41.0.nix) {
3320     inherit fetchurl stdenv icu expat zlib bzip2 python;
3321   };
3323   # A Boost build with all library variants enabled.  Very large (about 250 MB).
3324   boostFull = appendToName "full" (boost.override {
3325     enableDebug = true;
3326     enableSingleThreaded = true;
3327     enableStatic = true;
3328   });
3330   botan = builderDefsPackage (import ../development/libraries/botan) {
3331     inherit perl;
3332   };
3334   buddy = import ../development/libraries/buddy {
3335     inherit fetchurl stdenv bison;
3336   };
3338   cairo = import ../development/libraries/cairo {
3339     inherit fetchurl stdenv pkgconfig x11 fontconfig freetype zlib libpng;
3340     inherit (xlibs) pixman libxcb xcbutil;
3341   };
3343   cairomm = import ../development/libraries/cairomm {
3344     inherit fetchurl stdenv pkgconfig cairo x11 fontconfig freetype libsigcxx;
3345   };
3347   scmccid = import ../development/libraries/scmccid {
3348     inherit fetchurl stdenv libusb patchelf;
3349   };
3351   ccrtp = import ../development/libraries/ccrtp {
3352     inherit fetchurl stdenv lib pkgconfig openssl libgcrypt commoncpp2;
3353   };
3355   chipmunk = builderDefsPackage (import ../development/libraries/chipmunk) {
3356     inherit cmake freeglut mesa;
3357     inherit (xlibs) libX11 xproto inputproto libXi libXmu;
3358   };
3360   chmlib = import ../development/libraries/chmlib {
3361     inherit fetchurl stdenv;
3362   };
3364   cil = import ../development/libraries/cil {
3365     inherit stdenv fetchurl ocaml perl;
3366   };
3368   cilaterm = import ../development/libraries/cil-aterm {
3369     stdenv = overrideInStdenv stdenv [gnumake380];
3370     inherit fetchurl perl ocaml;
3371   };
3373   clanlib = import ../development/libraries/clanlib {
3374     inherit fetchurl stdenv zlib libpng libjpeg libvorbis libogg mesa;
3375     inherit (xlibs) libX11 xf86vidmodeproto libXmu libXxf86vm;
3376   };
3378   classads = import ../development/libraries/classads {
3379     inherit fetchurl stdenv;
3380   };
3382   classpath = import ../development/libraries/java/classpath {
3383     javac = gcj;
3384     jvm = gcj;
3385     inherit fetchurl stdenv pkgconfig antlr;
3386     inherit (gtkLibs) gtk;
3387     gconf = gnome.GConf;
3388   };
3390   clearsilver = import ../development/libraries/clearsilver {
3391     inherit fetchurl stdenv python;
3392   };
3394   clppcre = builderDefsPackage (import ../development/libraries/cl-ppcre) {
3395   };
3397   cluceneCore = (import ../development/libraries/clucene-core) {
3398     inherit fetchurl stdenv;
3399   };
3401   commoncpp2 = import ../development/libraries/commoncpp2 {
3402     inherit stdenv fetchurl lib;
3403   };
3405   consolekit = makeOverridable (import ../development/libraries/consolekit) {
3406     inherit stdenv fetchurl pkgconfig dbus_glib zlib pam policykit expat glib;
3407     inherit (xlibs) libX11;
3408   };
3410   coredumper = import ../development/libraries/coredumper {
3411     inherit fetchurl stdenv;
3412   };
3414   ctl = import ../development/libraries/ctl {
3415     inherit fetchurl stdenv ilmbase;
3416   };
3418   cppunit = import ../development/libraries/cppunit {
3419     inherit fetchurl stdenv;
3420   };
3422   cracklib = import ../development/libraries/cracklib {
3423     inherit fetchurl stdenv;
3424   };
3426   cryptopp = import ../development/libraries/crypto++ {
3427     inherit fetchurl stdenv unzip libtool;
3428   };
3430   cyrus_sasl = import ../development/libraries/cyrus-sasl {
3431     inherit stdenv fetchurl openssl db4 gettext;
3432   };
3434   db4 = db45;
3436   db44 = import ../development/libraries/db4/db4-4.4.nix {
3437     inherit fetchurl stdenv;
3438   };
3440   db45 = import ../development/libraries/db4/db4-4.5.nix {
3441     inherit fetchurl stdenv;
3442   };
3444   dbus = import ../development/libraries/dbus {
3445     inherit fetchurl stdenv pkgconfig expat;
3446     inherit (xlibs) libX11 libICE libSM;
3447     useX11 = true; # !!! `false' doesn't build
3448   };
3450   dbus_glib = makeOverridable (import ../development/libraries/dbus-glib) {
3451     inherit fetchurl stdenv pkgconfig gettext dbus expat glib;
3452     libiconv = if (stdenv.system == "i686-freebsd") then libiconv else null;
3453   };
3455   dbus_java = import ../development/libraries/java/dbus-java {
3456     inherit stdenv fetchurl gettext jdk libmatthew_java;
3457   };
3459   dclib = import ../development/libraries/dclib {
3460     inherit fetchurl stdenv libxml2 openssl bzip2;
3461   };
3463   directfb = import ../development/libraries/directfb {
3464     inherit fetchurl stdenv perl zlib libjpeg freetype
3465       SDL libpng giflib;
3466     inherit (xlibs) libX11 libXext xproto xextproto renderproto
3467       libXrender;
3468   };
3470   enchant = makeOverridable (import ../development/libraries/enchant) {
3471     inherit fetchurl stdenv aspell pkgconfig;
3472     inherit (gnome) glib;
3473   };
3475   enginepkcs11 = import ../development/libraries/enginepkcs11 {
3476     inherit fetchurl stdenv libp11 pkgconfig openssl;
3477   };
3479   exiv2 = import ../development/libraries/exiv2 {
3480     inherit fetchurl stdenv zlib;
3481   };
3483   expat = import ../development/libraries/expat {
3484     inherit fetchurl stdenv;
3485   };
3487   extremetuxracer = builderDefsPackage (import ../games/extremetuxracer) {
3488     inherit mesa tcl freeglut SDL SDL_mixer pkgconfig
3489         libpng gettext intltool;
3490     inherit (xlibs) libX11 xproto libXi inputproto
3491         libXmu libXext xextproto libXt libSM libICE;
3492   };
3494   eventlog = import ../development/libraries/eventlog {
3495     inherit fetchurl stdenv;
3496   };
3498   facile = import ../development/libraries/facile {
3499     inherit fetchurl stdenv;
3500     # Actually, we don't need this version but we need native-code compilation
3501     ocaml = ocaml_3_10_0;
3502   };
3504   faac = import ../development/libraries/faac {
3505     inherit fetchurl stdenv autoconf automake libtool;
3506   };
3508   faad2 = import ../development/libraries/faad2 {
3509     inherit fetchurl stdenv;
3510   };
3512   farsight2 = import ../development/libraries/farsight2 {
3513     inherit fetchurl stdenv libnice pkgconfig python;
3514     inherit (gnome) glib;
3515     inherit (gst_all) gstreamer gstPluginsBase;
3516   };
3518   fcgi = import ../development/libraries/fcgi {
3519       inherit fetchurl stdenv;
3520   };
3522   ffmpeg = import ../development/libraries/ffmpeg {
3523     inherit fetchurl stdenv faad2;
3524   };
3526   fftw = import ../development/libraries/fftw {
3527     inherit fetchurl stdenv builderDefs stringsWithDeps;
3528     singlePrecision = false;
3529   };
3531   fftwSinglePrec = import ../development/libraries/fftw {
3532     inherit fetchurl stdenv builderDefs stringsWithDeps;
3533     singlePrecision = true;
3534   };
3536   fltk11 = (import ../development/libraries/fltk/fltk11.nix) {
3537     inherit composableDerivation x11 lib pkgconfig freeglut;
3538     inherit fetchurl stdenv mesa libpng libjpeg zlib ;
3539     inherit (xlibs) inputproto libXi libXinerama libXft;
3540     flags = [ "useNixLibs" "threads" "shared" "gl" ];
3541   };
3543   fltk20 = (import ../development/libraries/fltk) {
3544     inherit composableDerivation x11 lib pkgconfig freeglut;
3545     inherit fetchurl stdenv mesa libpng libjpeg zlib ;
3546     inherit (xlibs) inputproto libXi libXinerama libXft;
3547     flags = [ "useNixLibs" "threads" "shared" "gl" ];
3548   };
3550   fmod = import ../development/libraries/fmod {
3551     inherit stdenv fetchurl;
3552   };
3554   freeimage = import ../development/libraries/freeimage {
3555     inherit fetchurl stdenv unzip;
3556   };
3558   freetts = import ../development/libraries/freetts {
3559     inherit stdenv fetchurl apacheAnt unzip sharutils lib;
3560   };
3562   cfitsio = import ../development/libraries/cfitsio {
3563     inherit fetchurl stdenv;
3564   };
3566   fontconfig = import ../development/libraries/fontconfig {
3567     inherit fetchurl stdenv freetype expat;
3568   };
3570   makeFontsConf = let fontconfig_ = fontconfig; in {fontconfig ? fontconfig_, fontDirectories}:
3571     import ../development/libraries/fontconfig/make-fonts-conf.nix {
3572       inherit runCommand libxslt fontconfig fontDirectories;
3573     };
3575   freealut = import ../development/libraries/freealut {
3576     inherit fetchurl stdenv openal;
3577   };
3579   freeglut = import ../development/libraries/freeglut {
3580     inherit fetchurl stdenv x11 mesa;
3581   };
3583   freetype = import ../development/libraries/freetype {
3584     inherit fetchurl stdenv;
3585   };
3587   fribidi = import ../development/libraries/fribidi {
3588     inherit fetchurl stdenv;
3589   };
3591   fam = gamin;
3593   gamin = import ../development/libraries/gamin {
3594     inherit fetchurl stdenv python pkgconfig glib;
3595   };
3597   gav = import ../games/gav {
3598     inherit fetchurl SDL SDL_image SDL_mixer SDL_net;
3599     stdenv = overrideGCC stdenv gcc41;
3600   };
3602   gdbm = import ../development/libraries/gdbm {
3603     inherit fetchurl stdenv;
3604   };
3606   gdk_pixbuf = import ../development/libraries/gdk-pixbuf {
3607     inherit fetchurl stdenv libtiff libjpeg libpng;
3608     inherit (gtkLibs1x) gtk;
3609   };
3611   gegl = import ../development/libraries/gegl {
3612     inherit fetchurl stdenv libpng pkgconfig babl;
3613     openexr = openexr_1_6_1;
3614     #  avocodec avformat librsvg
3615     inherit cairo libjpeg librsvg;
3616     inherit (gtkLibs) pango glib gtk;
3617   };
3619   geoip = builderDefsPackage ../development/libraries/geoip {
3620     inherit zlib;
3621   };
3623   geos = import ../development/libraries/geos {
3624     inherit fetchurl fetchsvn stdenv autoconf
3625       automake libtool swig which lib composableDerivation python ruby;
3626     use_svn = stdenv.system == "x86_64-linux";
3627   };
3629   gettext = import ../development/libraries/gettext {
3630     inherit fetchurl stdenv libiconv;
3631   };
3633   gd = import ../development/libraries/gd {
3634     inherit fetchurl stdenv zlib libpng freetype libjpeg fontconfig;
3635   };
3637   gdal = stdenv.mkDerivation {
3638     name = "gdal-1.6.1-rc1";
3639     src = fetchurl {
3640       url = ftp://ftp.remotesensing.org/gdal/gdal-1.6.1-RC1.tar.gz;
3641       sha256 = "0f7da588yvb1d3l3gk5m0hrqlhg8m4gw93aip3dwkmnawz9r0qcw";
3642     };
3643   };
3645   giblib = import ../development/libraries/giblib {
3646     inherit fetchurl stdenv x11 imlib2;
3647   };
3649   glew = import ../development/libraries/glew {
3650     inherit fetchurl stdenv mesa x11 libtool;
3651     inherit (xlibs) libXmu libXi;
3652   };
3654   glefw = import ../development/libraries/glefw {
3655     inherit fetchurl stdenv lib mesa;
3656     inherit (xlibs) libX11 libXext xextproto;
3657   };
3659   glibc =
3660     let haveRedHatKernel       = system == "i686-linux" || system == "x86_64-linux";
3661         haveBrokenRedHatKernel = haveRedHatKernel && getConfig ["brokenRedHatKernel"] false;
3662     in
3663     useFromStdenv "glibc" (if haveBrokenRedHatKernel then glibc25 else
3664         glibc211);
3666   glibc25 = import ../development/libraries/glibc-2.5 {
3667     inherit fetchurl stdenv;
3668     kernelHeaders = linuxHeaders;
3669     installLocales = getPkgConfig "glibc" "locales" false;
3670   };
3672   glibc27 = import ../development/libraries/glibc-2.7 {
3673     inherit fetchurl stdenv;
3674     kernelHeaders = linuxHeaders;
3675     #installLocales = false;
3676   };
3678   glibc29 = makeOverridable (import ../development/libraries/glibc-2.9) {
3679     inherit fetchurl stdenv;
3680     kernelHeaders = linuxHeaders;
3681     installLocales = getPkgConfig "glibc" "locales" false;
3682   };
3684   glibc29Cross = cross: forceBuildDrv (makeOverridable (import ../development/libraries/glibc-2.9) {
3685     inherit stdenv fetchurl;
3686     gccCross = gccCrossStageStatic cross;
3687     kernelHeaders = linuxHeadersCross cross;
3688     installLocales = getPkgConfig "glibc" "locales" false;
3689   });
3691   glibc210 = makeOverridable (import ../development/libraries/glibc-2.10) {
3692     inherit fetchurl stdenv;
3693     kernelHeaders = linuxHeaders;
3694     installLocales = getPkgConfig "glibc" "locales" false;
3695   };
3697   glibc210Cross = cross: forceBuildDrv (makeOverridable (import ../development/libraries/glibc-2.10) {
3698     inherit stdenv fetchurl;
3699     gccCross = gccCrossStageStatic cross;
3700     kernelHeaders = linuxHeadersCross cross;
3701     installLocales = getPkgConfig "glibc" "locales" false;
3702   });
3704   glibc211 = makeOverridable (import ../development/libraries/glibc-2.11) {
3705     inherit fetchurl stdenv;
3706     kernelHeaders = linuxHeaders;
3707     installLocales = getPkgConfig "glibc" "locales" false;
3708   };
3710   glibc211Cross = cross : forceBuildDrv (makeOverridable (import ../development/libraries/glibc-2.11) {
3711     inherit stdenv fetchurl;
3712     gccCross = gccCrossStageStatic cross;
3713     kernelHeaders = linuxHeadersCross cross;
3714     installLocales = getPkgConfig "glibc" "locales" false;
3715   });
3717   # We can choose:
3718   libcCross = cross: glibc211Cross cross;
3719   # libcCross = cross: uclibcCross cross;
3721   eglibc = import ../development/libraries/eglibc {
3722     inherit fetchsvn stdenv;
3723     kernelHeaders = linuxHeaders;
3724     installLocales = getPkgConfig "glibc" "locales" false;
3725   };
3727   glibcLocales = makeOverridable (import ../development/libraries/glibc-2.11/locales.nix) {
3728     inherit fetchurl stdenv;
3729   };
3731   glibcInfo = import ../development/libraries/glibc-2.11/info.nix {
3732     inherit fetchurl stdenv texinfo perl;
3733   };
3735   glibc_multi =
3736       runCommand "${glibc.name}-multi"
3737         { glibc64 = glibc;
3738           glibc32 = (import ./all-packages.nix {system = "i686-linux";}).glibc;
3739         }
3740         ''
3741           ensureDir $out
3742           ln -s $glibc64/* $out/
3744           rm $out/lib $out/lib64
3745           ensureDir $out/lib
3746           ln -s $glibc64/lib/* $out/lib
3747           ln -s $glibc32/lib $out/lib/32
3748           ln -s lib $out/lib64
3750           rm $out/include
3751           cp -rs $glibc32/include $out
3752           chmod -R u+w $out/include
3753           cp -rsf $glibc64/include $out
3754         '' # */
3755         ;
3757   gmime = import ../development/libraries/gmime {
3758     inherit fetchurl stdenv pkgconfig zlib glib;
3759   };
3761   gmm = import ../development/libraries/gmm {
3762     inherit fetchurl stdenv;
3763   };
3765   gmp = 
3766     if stdenv.system == "i686-darwin" then
3767       # GMP 4.3.2 is broken on Darwin, so use 4.3.1.
3768       makeOverridable (import ../development/libraries/gmp/4.3.1.nix) {
3769         inherit stdenv fetchurl m4;
3770         cxx = false;
3771       }
3772     else 
3773       makeOverridable (import ../development/libraries/gmp) {
3774         inherit stdenv fetchurl m4;
3775         cxx = false;
3776       };
3778   gmpxx = gmp.override { cxx = true; };
3780   goffice = import ../development/libraries/goffice {
3781     inherit fetchurl stdenv pkgconfig libgsf libxml2 cairo
3782       intltool gettext bzip2;
3783     inherit (gnome) glib gtk libglade libgnomeui pango;
3784     gconf = gnome.GConf;
3785     libart = gnome.libart_lgpl;
3786   };
3788   goocanvas = import ../development/libraries/goocanvas {
3789     inherit fetchurl stdenv pkgconfig cairo;
3790     inherit (gnome) gtk glib;
3791   };
3793   #GMP ex-satellite, so better keep it near gmp
3794   mpfr = import ../development/libraries/mpfr {
3795     inherit stdenv fetchurl gmp;
3796   };
3798   gst_all = recurseIntoAttrs (import ../development/libraries/gstreamer {
3799     inherit lib stdenv fetchurl perl bison pkgconfig libxml2
3800       python alsaLib cdparanoia libogg libvorbis libtheora freetype liboil
3801       libjpeg zlib speex libpng libdv aalib cairo libcaca flac hal libiec61883
3802       dbus libavc1394 ladspaH taglib pulseaudio gdbm bzip2 which makeOverridable
3803       libcap libtasn1;
3804     flex = flex2535;
3805     inherit (xorg) libX11 libXv libXext;
3806     inherit (gtkLibs) glib pango gtk;
3807     inherit (gnome) gnomevfs /* <- only passed for the no longer used older versions
3808              it is deprecated and didn't build on amd64 due to samba dependency */ gtkdoc
3809              libsoup;
3810   });
3812   gnet = import ../development/libraries/gnet {
3813     inherit fetchurl stdenv pkgconfig glib;
3814   };
3816   gnutls = import ../development/libraries/gnutls {
3817     inherit fetchurl stdenv libgcrypt zlib lzo libtasn1 guile;
3818     guileBindings = getConfig ["gnutls" "guile"] true;
3819   };
3821   gpgme = import ../development/libraries/gpgme {
3822     inherit fetchurl stdenv libgpgerror pkgconfig pth gnupg gnupg2 glib;
3823   };
3825   gsl = import ../development/libraries/gsl {
3826     inherit fetchurl stdenv;
3827   };
3829   gsoap = import ../development/libraries/gsoap {
3830     inherit fetchurl stdenv m4 bison flex openssl zlib;
3831   };
3833   gtkimageview = import ../development/libraries/gtkimageview {
3834     inherit fetchurl stdenv pkgconfig;
3835     inherit (gnome) gtk;
3836   };
3838   gtkLibs = recurseIntoAttrs gtkLibs218;
3840   glib = gtkLibs.glib;
3842   gtkLibs1x = rec {
3844     glib = import ../development/libraries/glib/1.2.x.nix {
3845       inherit fetchurl stdenv;
3846     };
3848     gtk = import ../development/libraries/gtk+/1.2.x.nix {
3849       inherit fetchurl stdenv x11 glib;
3850     };
3852   };
3854   gtkLibs216 = rec {
3856     glib = import ../development/libraries/glib/2.20.x.nix {
3857       inherit fetchurl stdenv pkgconfig gettext perl;
3858     };
3860     glibmm = import ../development/libraries/glibmm/2.18.x.nix {
3861       inherit fetchurl stdenv pkgconfig glib libsigcxx;
3862     };
3864     atk = import ../development/libraries/atk/1.24.x.nix {
3865       inherit fetchurl stdenv pkgconfig perl glib;
3866     };
3868     pango = import ../development/libraries/pango/1.24.x.nix {
3869       inherit fetchurl stdenv pkgconfig gettext x11 glib cairo libpng;
3870     };
3872     pangomm = import ../development/libraries/pangomm/2.14.x.nix {
3873       inherit fetchurl stdenv pkgconfig pango glibmm cairomm libpng;
3874     };
3876     gtk = import ../development/libraries/gtk+/2.16.x.nix {
3877       inherit fetchurl stdenv pkgconfig perl jasper x11 glib atk pango
3878         libtiff libjpeg libpng cairo xlibs;
3879     };
3881     gtkmm = import ../development/libraries/gtkmm/2.14.x.nix {
3882       inherit fetchurl stdenv pkgconfig gtk atk glibmm cairomm pangomm;
3883     };
3885   };
3887   gtkLibs218 = rec {
3889     glib = import ../development/libraries/glib/2.22.x.nix {
3890       inherit fetchurl stdenv pkgconfig gettext perl;
3891       libiconv = if (stdenv.system == "i686-freebsd") then libiconv else null;
3892     };
3894     glibmm = import ../development/libraries/glibmm/2.22.x.nix {
3895       inherit fetchurl stdenv pkgconfig glib libsigcxx;
3896     };
3898     atk = import ../development/libraries/atk/1.28.x.nix {
3899       inherit fetchurl stdenv pkgconfig perl glib;
3900     };
3902     pango = import ../development/libraries/pango/1.26.x.nix {
3903       inherit fetchurl stdenv pkgconfig gettext x11 glib cairo libpng;
3904     };
3906     pangomm = import ../development/libraries/pangomm/2.26.x.nix {
3907       inherit fetchurl stdenv pkgconfig pango glibmm cairomm libpng;
3908     };
3910     gtk = import ../development/libraries/gtk+/2.18.x.nix {
3911       inherit fetchurl stdenv pkgconfig perl jasper glib atk pango
3912         libtiff libjpeg libpng cairo xlibs cups;
3913     };
3915     gtkmm = import ../development/libraries/gtkmm/2.18.x.nix {
3916       inherit fetchurl stdenv pkgconfig gtk atk glibmm cairomm pangomm;
3917     };
3919   };
3921   gtkmozembedsharp = import ../development/libraries/gtkmozembed-sharp {
3922     inherit fetchurl stdenv mono pkgconfig monoDLLFixer;
3923     inherit (gnome) gtk;
3924     gtksharp = gtksharp2;
3925   };
3927   gtksharp1 = import ../development/libraries/gtk-sharp-1 {
3928     inherit fetchurl stdenv mono pkgconfig libxml2 monoDLLFixer;
3929     inherit (gnome) gtk glib pango libglade libgtkhtml gtkhtml
3930               libgnomecanvas libgnomeui libgnomeprint
3931               libgnomeprintui GConf;
3932   };
3934   gtksharp2 = import ../development/libraries/gtk-sharp-2 {
3935     inherit fetchurl stdenv mono pkgconfig libxml2 monoDLLFixer;
3936     inherit (gnome) gtk glib pango libglade libgtkhtml gtkhtml
3937               libgnomecanvas libgnomeui libgnomeprint
3938               libgnomeprintui GConf gnomepanel;
3939   };
3941   gtksourceviewsharp = import ../development/libraries/gtksourceview-sharp {
3942     inherit fetchurl stdenv mono pkgconfig monoDLLFixer;
3943     inherit (gnome) gtksourceview;
3944     gtksharp = gtksharp2;
3945   };
3947   gtkspell = import ../development/libraries/gtkspell {
3948     inherit fetchurl stdenv pkgconfig;
3949     inherit (gtkLibs) gtk;
3950     inherit aspell;
3951   };
3953   # TODO : Add MIT Kerberos and let admin choose.
3954   kerberos = heimdal;
3956   heimdal = import ../development/libraries/kerberos/heimdal.nix {
3957     inherit fetchurl stdenv readline db4 openssl openldap cyrus_sasl;
3958   };
3960   hsqldb = import ../development/libraries/java/hsqldb {
3961     inherit stdenv fetchurl unzip;
3962   };
3964   hwloc = import ../development/libraries/hwloc {
3965     inherit fetchurl stdenv pkgconfig cairo expat;
3966   };
3968   icu = import ../development/libraries/icu {
3969     inherit fetchurl stdenv;
3970   };
3972   id3lib = import ../development/libraries/id3lib {
3973     inherit fetchurl stdenv;
3974   };
3976   ilbc = import ../development/libraries/ilbc {
3977     inherit stdenv msilbc;
3978   };
3980   ilmbase = import ../development/libraries/ilmbase {
3981     inherit fetchurl stdenv;
3982   };
3984   imlib = import ../development/libraries/imlib {
3985     inherit fetchurl stdenv libjpeg libtiff libungif libpng;
3986     inherit (xlibs) libX11 libXext xextproto;
3987   };
3989   imlib2 = import ../development/libraries/imlib2 {
3990     inherit fetchurl stdenv x11 libjpeg libtiff libungif libpng bzip2;
3991   };
3993   indilib = import ../development/libraries/indilib {
3994     inherit fetchurl stdenv cfitsio libusb zlib;
3995   };
3997   iniparser = import ../development/libraries/iniparser {
3998     inherit fetchurl stdenv;
3999   };
4001   intltool = gnome.intltool;
4003   isocodes = import ../development/libraries/iso-codes {
4004     inherit stdenv fetchurl gettext python;
4005   };
4007   jamp = builderDefsPackage ../games/jamp {
4008     inherit mesa SDL SDL_image SDL_mixer;
4009   };
4011   jasper = import ../development/libraries/jasper {
4012     inherit fetchurl stdenv unzip xlibs libjpeg;
4013   };
4015   jetty_gwt = import ../development/libraries/java/jetty-gwt {
4016     inherit stdenv fetchurl;
4017   };
4019   jetty_util = import ../development/libraries/java/jetty-util {
4020     inherit stdenv fetchurl;
4021   };
4023   krb5 = import ../development/libraries/kerberos/krb5.nix {
4024     inherit stdenv fetchurl perl ncurses yacc;
4025   };
4027   lablgtk = import ../development/libraries/lablgtk {
4028     inherit fetchurl stdenv ocaml pkgconfig;
4029     inherit (gtkLibs) gtk;
4030     inherit (gnome) libgnomecanvas;
4031   };
4033   lcms = import ../development/libraries/lcms {
4034     inherit fetchurl stdenv;
4035   };
4037   lesstif = import ../development/libraries/lesstif {
4038     inherit fetchurl stdenv x11;
4039     inherit (xlibs) libXp libXau;
4040   };
4042   lesstif93 = import ../development/libraries/lesstif-0.93 {
4043     inherit fetchurl stdenv x11;
4044     inherit (xlibs) libXp libXau;
4045   };
4047   levmar = import ../development/libraries/levmar {
4048     inherit fetchurl stdenv;
4049   };
4051   lib3ds = import ../development/libraries/lib3ds {
4052     inherit fetchurl stdenv unzip;
4053   };
4055   libaal = import ../development/libraries/libaal {
4056     inherit fetchurl stdenv;
4057   };
4059   libao = import ../development/libraries/libao {
4060     inherit stdenv fetchurl pkgconfig pulseaudio;
4061   };
4063   libarchive = import ../development/libraries/libarchive {
4064     inherit fetchurl stdenv zlib bzip2 e2fsprogs sharutils;
4065   };
4067   libassuan = import ../development/libraries/libassuan {
4068     inherit fetchurl stdenv pth;
4069   };
4071   libavc1394 = import ../development/libraries/libavc1394 {
4072     inherit fetchurl stdenv pkgconfig libraw1394;
4073   };
4075   libcaca = import ../development/libraries/libcaca {
4076     inherit fetchurl stdenv ncurses;
4077   };
4079   libcanberra = import ../development/libraries/libcanberra {
4080     inherit fetchurl stdenv pkgconfig libtool alsaLib pulseaudio libvorbis;
4081     inherit (gtkLibs) gtk gthread;
4082     gstreamer = gst_all.gstreamer;
4083   };
4085   libcdaudio = import ../development/libraries/libcdaudio {
4086     inherit fetchurl stdenv;
4087   };
4089   libcddb = import ../development/libraries/libcddb {
4090     inherit fetchurl stdenv;
4091   };
4093   libcdio = import ../development/libraries/libcdio {
4094     inherit fetchurl stdenv libcddb pkgconfig ncurses help2man;
4095   };
4097   libcm = import ../development/libraries/libcm {
4098     inherit fetchurl stdenv pkgconfig xlibs mesa glib;
4099   };
4101   libcv = builderDefsPackage (import ../development/libraries/libcv) {
4102     inherit libtiff libjpeg libpng pkgconfig;
4103     inherit (gtkLibs) gtk glib;
4104   };
4106   libdaemon = import ../development/libraries/libdaemon {
4107     inherit fetchurl stdenv;
4108   };
4110   libdbi = composedArgsAndFun (import ../development/libraries/libdbi/0.8.2.nix) {
4111     inherit stdenv fetchurl builderDefs;
4112   };
4114   libdbiDriversBase = composedArgsAndFun (import ../development/libraries/libdbi-drivers/0.8.2-1.nix) {
4115     inherit stdenv fetchurl builderDefs libdbi;
4116   };
4118   libdbiDrivers = libdbiDriversBase.passthru.function {
4119     inherit sqlite mysql;
4120   };
4122   libdv = import ../development/libraries/libdv {
4123     inherit fetchurl stdenv lib composableDerivation;
4124   };
4126   libdrm = import ../development/libraries/libdrm {
4127     inherit fetchurl stdenv pkgconfig;
4128     inherit (xorg) libpthreadstubs;
4129   };
4131   libdvdcss = import ../development/libraries/libdvdcss {
4132     inherit fetchurl stdenv;
4133   };
4135   libdvdnav = import ../development/libraries/libdvdnav {
4136     inherit fetchurl stdenv libdvdread;
4137   };
4139   libdvdread = import ../development/libraries/libdvdread {
4140     inherit fetchurl stdenv libdvdcss;
4141   };
4143   libedit = import ../development/libraries/libedit {
4144     inherit fetchurl stdenv ncurses;
4145   };
4147   liblo = import ../development/libraries/liblo {
4148     inherit fetchurl stdenv;
4149   };
4151   libev = builderDefsPackage ../development/libraries/libev {
4152   };
4154   libevent = import ../development/libraries/libevent {
4155     inherit fetchurl stdenv;
4156   };
4158   libewf = import ../development/libraries/libewf {
4159     inherit fetchurl stdenv zlib openssl libuuid;
4160   };
4162   libexif = import ../development/libraries/libexif {
4163     inherit fetchurl stdenv gettext;
4164   };
4166   libextractor = import ../development/libraries/libextractor {
4167     inherit fetchurl stdenv libtool gettext zlib bzip2 flac libvorbis
4168      exiv2 ffmpeg libgsf glib rpm pkgconfig;
4169     inherit (gnome) gtk;
4170     libmpeg2 = mpeg2dec;
4171   };
4173   libffcall = builderDefsPackage (import ../development/libraries/libffcall) {
4174     inherit fetchcvs;
4175   };
4177   libffi = import ../development/libraries/libffi {
4178     inherit fetchurl stdenv;
4179   };
4181   libftdi = import ../development/libraries/libftdi {
4182     inherit fetchurl stdenv libusb;
4183   };
4185   libgcrypt = import ../development/libraries/libgcrypt {
4186     inherit fetchurl stdenv libgpgerror;
4187   };
4189   libgpgerror = import ../development/libraries/libgpg-error {
4190     inherit fetchurl stdenv;
4191   };
4193   libgphoto2 = import ../development/libraries/libgphoto2 {
4194     inherit fetchurl stdenv pkgconfig libusb libtool libexif libjpeg gettext;
4195   };
4197   libgpod = import ../development/libraries/libgpod {
4198     inherit fetchurl stdenv gettext perl perlXMLParser pkgconfig libxml2 glib;
4199   };
4201   libharu = import ../development/libraries/libharu {
4202     inherit fetchurl stdenv lib zlib libpng;
4203   };
4205   libical = import ../development/libraries/libical {
4206     inherit stdenv fetchurl perl;
4207   };
4209   libnice = import ../development/libraries/libnice {
4210     inherit stdenv fetchurl pkgconfig;
4211     inherit (gnome) glib;
4212   };
4214   libQGLViewer = import ../development/libraries/libqglviewer {
4215     inherit fetchurl stdenv;
4216     inherit qt4;
4217   };
4219   libsamplerate = import ../development/libraries/libsamplerate {
4220     inherit fetchurl stdenv pkgconfig lib;
4221   };
4223   libspectre = import ../development/libraries/libspectre {
4224     inherit fetchurl stdenv;
4225     ghostscript = ghostscriptX;
4226   };
4228   libgsf = import ../development/libraries/libgsf {
4229     inherit fetchurl stdenv perl perlXMLParser pkgconfig libxml2
4230       intltool gettext bzip2 python;
4231     inherit (gnome) glib gnomevfs libbonobo;
4232   };
4234   libiconv = import ../development/libraries/libiconv {
4235     inherit fetchurl stdenv;
4236   };
4238   libid3tag = import ../development/libraries/libid3tag {
4239     inherit fetchurl stdenv zlib;
4240   };
4242   libidn = import ../development/libraries/libidn {
4243     inherit fetchurl stdenv;
4244   };
4246   libiec61883 = import ../development/libraries/libiec61883 {
4247     inherit fetchurl stdenv pkgconfig libraw1394;
4248   };
4250   libiptcdata = import ../development/libraries/libiptcdata {
4251     inherit fetchurl stdenv;
4252   };
4254   libjingle = import ../development/libraries/libjingle/0.3.11.nix {
4255     inherit fetchurl stdenv mediastreamer;
4256   };
4258   libjpeg = makeOverridable (import ../development/libraries/libjpeg) {
4259     inherit fetchurl stdenv;
4260   };
4262   libjpeg62 = makeOverridable (import ../development/libraries/libjpeg/62.nix) {
4263     inherit fetchurl stdenv;
4264     libtool = libtool_1_5;
4265   };
4267   libjpegStatic = lowPrio (appendToName "static" (libjpeg.override {
4268     stdenv = enableStaticLibraries stdenv;
4269   }));
4271   libksba = import ../development/libraries/libksba {
4272     inherit fetchurl stdenv libgpgerror;
4273   };
4275   libmad = import ../development/libraries/libmad {
4276     inherit fetchurl stdenv;
4277   };
4279   libmatthew_java = import ../development/libraries/java/libmatthew-java {
4280     inherit stdenv fetchurl jdk;
4281   };
4283   libmcs = import ../development/libraries/libmcs {
4284     inherit fetchurl stdenv pkgconfig libmowgli;
4285   };
4287   libmicrohttpd = import ../development/libraries/libmicrohttpd {
4288     inherit fetchurl stdenv curl;
4289   };
4291   libmilter = import ../development/libraries/libmilter {
4292     inherit fetchurl stdenv m4;
4293   };
4295   libmowgli = import ../development/libraries/libmowgli {
4296     inherit fetchurl stdenv;
4297   };
4299   libmng = import ../development/libraries/libmng {
4300     inherit fetchurl stdenv lib zlib libpng libjpeg lcms automake autoconf libtool;
4301   };
4303   libmpcdec = import ../development/libraries/libmpcdec {
4304     inherit fetchurl stdenv;
4305   };
4307   libmsn = import ../development/libraries/libmsn {
4308     inherit stdenv fetchurl cmake openssl;
4309   };
4311   libmspack = import ../development/libraries/libmspack {
4312     inherit fetchurl stdenv;
4313   };
4315   libmusclecard = import ../development/libraries/libmusclecard {
4316     inherit fetchurl stdenv pkgconfig pcsclite;
4317   };
4319   libnova = import ../development/libraries/libnova {
4320     inherit fetchurl stdenv;
4321   };
4323   libofx = import ../development/libraries/libofx {
4324     inherit fetchurl stdenv opensp pkgconfig libxml2 curl;
4325   };
4327   libogg = import ../development/libraries/libogg {
4328     inherit fetchurl stdenv;
4329   };
4331   liboil = makeOverridable (import ../development/libraries/liboil) {
4332     inherit fetchurl stdenv pkgconfig glib;
4333   };
4335   liboop = import ../development/libraries/liboop {
4336     inherit fetchurl stdenv;
4337   };
4339   libotr = import ../development/libraries/libotr {
4340     inherit fetchurl stdenv libgcrypt;
4341   };
4343   libp11 = import ../development/libraries/libp11 {
4344     inherit fetchurl stdenv libtool openssl pkgconfig;
4345   };
4347   libpcap = import ../development/libraries/libpcap {
4348     inherit fetchurl stdenv flex bison;
4349   };
4351   libpng = import ../development/libraries/libpng {
4352     inherit fetchurl stdenv zlib;
4353   };
4355   libproxy = import ../development/libraries/libproxy {
4356     inherit stdenv fetchurl;
4357   };
4359   libpseudo = import ../development/libraries/libpseudo {
4360     inherit fetchurl stdenv pkgconfig ncurses glib;
4361   };
4363   librsync = import ../development/libraries/librsync {
4364     inherit stdenv fetchurl;
4365   };
4367   libsigcxx = import ../development/libraries/libsigcxx {
4368     inherit fetchurl stdenv pkgconfig;
4369   };
4371   libsigsegv = import ../development/libraries/libsigsegv {
4372     inherit fetchurl stdenv;
4373   };
4375   # To bootstrap SBCL, I need CLisp 2.44.1; it needs libsigsegv 2.5
4376   libsigsegv_25 =  import ../development/libraries/libsigsegv/2.5.nix {
4377     inherit fetchurl stdenv;
4378   };
4380   libsndfile = import ../development/libraries/libsndfile {
4381     inherit fetchurl stdenv;
4382   };
4384   libssh = import ../development/libraries/libssh {
4385     inherit stdenv fetchurl cmake zlib openssl;
4386   };
4387   
4388   libtasn1 = import ../development/libraries/libtasn1 {
4389     inherit fetchurl stdenv;
4390   };
4392   libtheora = import ../development/libraries/libtheora {
4393     inherit fetchurl stdenv libogg libvorbis;
4394   };
4396   libtiff = import ../development/libraries/libtiff {
4397     inherit fetchurl stdenv zlib libjpeg;
4398   };
4400   libtommath = import ../development/libraries/libtommath {
4401     inherit fetchurl stdenv libtool;
4402   };
4404   libunistring = import ../development/libraries/libunistring {
4405     inherit fetchurl stdenv libiconv;
4406   };
4408   libupnp = import ../development/libraries/pupnp {
4409     inherit fetchurl stdenv;
4410   };
4412   giflib = import ../development/libraries/giflib {
4413     inherit fetchurl stdenv;
4414   };
4416   libungif = import ../development/libraries/giflib/libungif.nix {
4417     inherit fetchurl stdenv;
4418   };
4420   libusb = import ../development/libraries/libusb {
4421     inherit fetchurl stdenv;
4422   };
4424   libunwind = import ../development/libraries/libunwind {
4425     inherit fetchurl stdenv;
4426   };
4428   libvirt = import ../development/libraries/libvirt {
4429     inherit stdenv fetchurl libxml2 gnutls devicemapper perl;
4430   };
4432   libvncserver = builderDefsPackage (import ../development/libraries/libvncserver) {
4433     inherit libtool libjpeg openssl zlib;
4434     inherit (xlibs) xproto libX11 damageproto libXdamage
4435       libXext xextproto fixesproto libXfixes xineramaproto
4436       libXinerama libXrandr randrproto libXtst;
4437   };
4439   libviper = import ../development/libraries/libviper {
4440     inherit fetchurl stdenv pkgconfig ncurses gpm glib;
4441   };
4443   libvterm = import ../development/libraries/libvterm {
4444     inherit fetchurl stdenv pkgconfig ncurses glib;
4445   };
4447   libvorbis = import ../development/libraries/libvorbis {
4448     inherit fetchurl stdenv libogg;
4449   };
4451   libwmf = import ../development/libraries/libwmf {
4452     inherit fetchurl stdenv pkgconfig imagemagick
4453       zlib libpng freetype libjpeg libxml2 glib;
4454   };
4456   libwpd = import ../development/libraries/libwpd {
4457     inherit fetchurl stdenv pkgconfig libgsf libxml2 bzip2;
4458     inherit (gnome) glib;
4459   };
4461   libx86 = builderDefsPackage ../development/libraries/libx86 {};
4463   libxcrypt = import ../development/libraries/libxcrypt {
4464     inherit fetchurl stdenv;
4465   };
4467   libxklavier = import ../development/libraries/libxklavier {
4468     inherit fetchurl stdenv xkeyboard_config pkgconfig libxml2 isocodes glib;
4469     inherit (xorg) libX11 libICE libXi libxkbfile;
4470   };
4472   libxmi = import ../development/libraries/libxmi {
4473     inherit fetchurl stdenv libtool;
4474   };
4476   libxml2 = makeOverridable (import ../development/libraries/libxml2) {
4477     inherit fetchurl stdenv zlib python;
4478     pythonSupport = false;
4479   };
4481   libxml2Python = libxml2.override {
4482     pythonSupport = true;
4483   };
4485   libxslt = makeOverridable (import ../development/libraries/libxslt) {
4486     inherit fetchurl stdenv libxml2;
4487   };
4489   libixp_for_wmii = lowPrio (import ../development/libraries/libixp_for_wmii {
4490     inherit fetchurl stdenv;
4491   });
4493   libyaml = import ../development/libraries/libyaml {
4494     inherit fetchurl stdenv;
4495   };
4497   libzip = import ../development/libraries/libzip {
4498     inherit fetchurl stdenv zlib;
4499   };
4501   libzrtpcpp = import ../development/libraries/libzrtpcpp {
4502     inherit fetchurl stdenv lib commoncpp2 openssl pkgconfig ccrtp;
4503   };
4505   lightning = import ../development/libraries/lightning {
4506     inherit fetchurl stdenv;
4507   };
4509   liquidwar = builderDefsPackage ../games/liquidwar {
4510     inherit (xlibs) xproto libX11 libXrender;
4511     inherit gmp guile mesa libjpeg libpng
4512       expat gettext perl
4513       SDL SDL_image SDL_mixer SDL_ttf
4514       curl sqlite
4515       libogg libvorbis
4516       ;
4517   };
4519   log4cxx = import ../development/libraries/log4cxx {
4520     inherit fetchurl stdenv automake autoconf libtool cppunit libxml2 boost;
4521     inherit apr aprutil db45 expat;
4522   };
4524   loudmouth = import ../development/libraries/loudmouth {
4525     inherit fetchurl stdenv libidn openssl pkgconfig zlib glib;
4526   };
4528   lzo = import ../development/libraries/lzo {
4529     inherit fetchurl stdenv;
4530   };
4532   # failed to build
4533   mediastreamer = composedArgsAndFun (import ../development/libraries/mediastreamer/2.2.0-cvs20080207.nix) {
4534     inherit fetchurl stdenv automake libtool autoconf alsaLib pkgconfig speex
4535       ortp ffmpeg;
4536   };
4538   mesaSupported =
4539     system == "i686-linux" ||
4540     system == "x86_64-linux" ||
4541     system == "x86_64-darwin" ||
4542     system == "i686-darwin";
4544   mesa = import ../development/libraries/mesa {
4545     inherit fetchurl stdenv pkgconfig expat x11 xlibs libdrm;
4546   };
4548   ming = import ../development/libraries/ming {
4549     inherit fetchurl stdenv flex bison freetype zlib libpng perl;
4550   };
4552   mpeg2dec = import ../development/libraries/mpeg2dec {
4553     inherit fetchurl stdenv;
4554   };
4556   msilbc = import ../development/libraries/msilbc {
4557     inherit fetchurl stdenv ilbc mediastreamer pkgconfig;
4558   };
4560   mpich2 = import ../development/libraries/mpich2 {
4561     inherit fetchurl stdenv python perl;
4562   };
4564   muparser = import ../development/libraries/muparser {
4565     inherit fetchurl stdenv;
4566   };
4568   ncurses = makeOverridable (composedArgsAndFun (import ../development/libraries/ncurses)) {
4569     inherit fetchurl stdenv;
4570     # The "! (stdenv ? cross)" is for the cross-built arm ncurses, which
4571     # don't build for me in unicode.
4572     unicode = (system != "i686-cygwin" && crossSystem == null);
4573   };
4575   neon = neon026;
4577   neon026 = import ../development/libraries/neon/0.26.nix {
4578     inherit fetchurl stdenv libxml2 zlib openssl;
4579     compressionSupport = true;
4580     sslSupport = true;
4581   };
4583   neon028 = import ../development/libraries/neon/0.28.nix {
4584     inherit fetchurl stdenv libxml2 zlib openssl;
4585     compressionSupport = true;
4586     sslSupport = true;
4587   };
4589   nethack = builderDefsPackage (import ../games/nethack) {
4590     inherit ncurses flex bison;
4591   };
4593   nettle = import ../development/libraries/nettle {
4594     inherit fetchurl stdenv gmp gnum4;
4595   };
4597   nspr = import ../development/libraries/nspr {
4598     inherit fetchurl stdenv;
4599   };
4601   nss = import ../development/libraries/nss {
4602     inherit fetchurl stdenv nspr perl zlib;
4603   };
4605   ode = builderDefsPackage (import ../development/libraries/ode) {
4606   };
4608   openal = import ../development/libraries/openal {
4609     inherit fetchurl stdenv cmake alsaLib;
4610   };
4612   # added because I hope that it has been easier to compile on x86 (for blender)
4613   openalSoft = import ../development/libraries/openalSoft {
4614     inherit fetchurl stdenv alsaLib libtool cmake;
4615   };
4617   openbabel = import ../development/libraries/openbabel {
4618     inherit fetchurl stdenv zlib libxml2;
4619   };
4621   opencascade = import ../development/libraries/opencascade {
4622     inherit fetchurl stdenv mesa qt4 tcl tk;
4623   };
4625   openct = import ../development/libraries/openct {
4626     inherit fetchurl stdenv libtool pcsclite libusb pkgconfig;
4627   };
4629   opencv = import ../development/libraries/opencv {
4630       inherit fetchurl stdenv cmake libjpeg libpng libtiff jasper ffmpeg
4631           pkgconfig xineLib;
4632       inherit (gtkLibs) gtk glib;
4633       inherit (gst_all) gstreamer;
4634   };
4636   # this ctl version is needed by openexr_viewers
4637   openexr_ctl = import ../development/libraries/openexr_ctl {
4638     inherit fetchurl stdenv ilmbase ctl;
4639     openexr = openexr_1_6_1;
4640   };
4642   openexr_1_6_1 = import ../development/libraries/openexr {
4643     inherit fetchurl stdenv ilmbase zlib pkgconfig lib;
4644     version = "1.6.1";
4645     # optional features:
4646     inherit ctl;
4647   };
4649   # This older version is needed by blender (it complains about missing half.h )
4650   openexr_1_4_0 = import ../development/libraries/openexr {
4651     inherit fetchurl stdenv ilmbase zlib pkgconfig lib;
4652     version = "1.4.0";
4653   };
4655   openldap = import ../development/libraries/openldap {
4656     inherit fetchurl stdenv openssl cyrus_sasl db4 groff;
4657   };
4659   openlierox = builderDefsPackage ../games/openlierox {
4660     inherit (xlibs) libX11 xproto;
4661     inherit gd SDL SDL_image SDL_mixer zlib libxml2
4662       pkgconfig;
4663   };
4665   libopensc_dnie = import ../development/libraries/libopensc-dnie {
4666     inherit fetchurl stdenv patchelf writeScript openssl openct
4667       libtool pcsclite zlib;
4668     inherit (gtkLibs) glib;
4669     opensc = opensc_0_11_7;
4670   };
4672   openssl = makeOverridable (import ../development/libraries/openssl) {
4673     fetchurl = fetchurlBoot;
4674     inherit stdenv perl;
4675   };
4677   ortp = import ../development/libraries/ortp {
4678     inherit fetchurl stdenv;
4679   };
4681   pangoxsl = import ../development/libraries/pangoxsl {
4682     inherit fetchurl stdenv pkgconfig;
4683     inherit (gtkLibs) glib pango;
4684   };
4686   pcre = makeOverridable (import ../development/libraries/pcre) {
4687     inherit fetchurl stdenv;
4688     unicodeSupport = getConfig ["pcre" "unicode"] false;
4689     cplusplusSupport = !stdenv ? isDietLibC;
4690   };
4692   physfs = import ../development/libraries/physfs {
4693     inherit fetchurl stdenv cmake;
4694   };
4696   plib = import ../development/libraries/plib {
4697     inherit fetchurl stdenv mesa freeglut SDL;
4698     inherit (xlibs) libXi libSM libXmu libXext libX11;
4699   };
4701   podofo = import ../development/libraries/podofo {
4702     inherit fetchurl stdenv cmake zlib freetype libjpeg libtiff
4703       fontconfig openssl;
4704   };
4706   polkit = import ../development/libraries/polkit {
4707     inherit stdenv fetchurl pkgconfig eggdbus expat pam intltool gettext glib;
4708   };
4710   policykit = makeOverridable (import ../development/libraries/policykit) {
4711     inherit stdenv fetchurl pkgconfig dbus dbus_glib expat pam
4712       intltool gettext libxslt docbook_xsl glib;
4713   };
4715   poppler = makeOverridable (import ../development/libraries/poppler) {
4716     inherit fetchurl stdenv cairo freetype fontconfig zlib libjpeg pkgconfig;
4717     inherit (gtkLibs) glib gtk;
4718     qt4Support = false;
4719   };
4721   popplerQt44 = poppler.override {
4722     qt4Support = true;
4723     qt4 = qt44;
4724   };
4726   popplerQt45 = poppler.override {
4727     qt4Support = true;
4728     qt4 = qt45;
4729   };
4731   popplerQt46 = poppler.override {
4732     qt4Support = true;
4733     qt4 = qt46;
4734   };
4736   popt = import ../development/libraries/popt {
4737     inherit fetchurl stdenv;
4738   };
4740   proj = import ../development/libraries/proj.4 {
4741     inherit fetchurl stdenv;
4742   };
4744   pth = import ../development/libraries/pth {
4745     inherit fetchurl stdenv;
4746   };
4748   qt3 = makeOverridable (import ../development/libraries/qt-3) {
4749     inherit fetchurl stdenv x11 zlib libjpeg libpng which mysql mesa;
4750     inherit (xlibs) xextproto libXft libXrender libXrandr randrproto
4751       libXmu libXinerama libXcursor;
4752     openglSupport = mesaSupported;
4753     mysqlSupport = getConfig ["qt" "mysql"] false;
4754   };
4756   qt3mysql = qt3.override {
4757     mysqlSupport = true;
4758   };
4760   qt4 = qt44;
4762   qt44 = import ../development/libraries/qt-4.4 {
4763     inherit fetchurl stdenv fetchsvn zlib libjpeg libpng which mysql mesa openssl cups dbus
4764       fontconfig freetype pkgconfig libtiff;
4765     inherit (xlibs) xextproto libXft libXrender libXrandr randrproto
4766       libXmu libXinerama xineramaproto libXcursor libICE libSM libX11 libXext
4767       inputproto fixesproto libXfixes;
4768     inherit (gnome) glib;
4769   };
4771   qt45 = import ../development/libraries/qt-4.5 {
4772     inherit fetchurl stdenv lib zlib libjpeg libpng which mysql mesa openssl cups dbus
4773       fontconfig freetype pkgconfig libtiff;
4774     inherit (xlibs) xextproto libXft libXrender libXrandr randrproto
4775       libXmu libXinerama xineramaproto libXcursor libXext
4776       inputproto fixesproto libXfixes;
4777     inherit (gnome) glib;
4778   };
4780   qt46 = import ../development/libraries/qt-4.6 {
4781     inherit fetchurl stdenv lib zlib libjpeg libpng which mysql mesa openssl cups dbus
4782       fontconfig freetype pkgconfig libtiff;
4783     inherit (xlibs) xextproto libXft libXrender libXrandr randrproto
4784       libXmu libXinerama xineramaproto libXcursor libXext
4785       inputproto fixesproto libXfixes;
4786     inherit (gnome) glib;
4787   };
4789   qtscriptgenerator = makeOverridable (import ../development/libraries/qtscriptgenerator) {
4790     inherit stdenv fetchurl;
4791     qt4 = qt45;
4792   };
4794   readline = readline6;
4796   readline4 = import ../development/libraries/readline/readline4.nix {
4797     inherit fetchurl stdenv ncurses;
4798   };
4800   readline5 = import ../development/libraries/readline/readline5.nix {
4801     inherit fetchurl stdenv ncurses;
4802   };
4804   readline6 = import ../development/libraries/readline/readline6.nix {
4805     inherit fetchurl stdenv ncurses;
4806   };
4808   librdf_raptor = import ../development/libraries/librdf/raptor.nix {
4809     inherit fetchurl stdenv lib libxml2 curl;
4810   };
4811   
4812   librdf_rasqal = import ../development/libraries/librdf/rasqal.nix {
4813     inherit fetchurl stdenv lib pcre libxml2 gmp librdf_raptor;
4814   };
4815   
4816   librdf = import ../development/libraries/librdf {
4817     inherit fetchurl stdenv lib pkgconfig librdf_raptor ladspaH openssl zlib;
4818   };
4820   redland = redland_1_0_10;
4821   
4822   redland_1_0_8 = makeOverridable (import ../development/libraries/redland/1.0.8.nix) {
4823     inherit fetchurl stdenv openssl libxml2 pkgconfig perl sqlite
4824       libxslt curl pcre librdf_rasqal librdf_raptor;
4825     bdb = db4;
4826   };
4828   redland_1_0_10 = makeOverridable (import ../development/libraries/redland/1.0.10.nix) {
4829     inherit fetchurl stdenv openssl libxml2 pkgconfig perl sqlite
4830       mysql libxslt curl pcre librdf_rasqal librdf_raptor;
4831     bdb = db4;
4832   };
4834   rhino = import ../development/libraries/java/rhino {
4835     inherit fetchurl stdenv unzip;
4836     ant = apacheAntGcj;
4837     javac = gcj;
4838     jvm = gcj;
4839   };
4841   rte = import ../development/libraries/rte {
4842     inherit fetchurl stdenv;
4843   };
4845   rubberband = import ../development/libraries/rubberband {
4846     inherit fetchurl stdenv lib pkgconfig libsamplerate libsndfile ladspaH;
4847     fftw = fftwSinglePrec;
4848     inherit (vamp) vampSDK;
4849   };
4851   schroedinger = import ../development/libraries/schroedinger {
4852     inherit fetchurl stdenv liboil pkgconfig;
4853   };
4855   SDL = makeOverridable (import ../development/libraries/SDL) {
4856     inherit fetchurl stdenv pkgconfig x11 mesa alsaLib pulseaudio;
4857     inherit (xlibs) libXrandr;
4858     openglSupport = mesaSupported;
4859     alsaSupport = true;
4860     pulseaudioSupport = false; # better go through ALSA
4861   };
4863   SDL_image = import ../development/libraries/SDL_image {
4864     inherit fetchurl stdenv SDL libjpeg libungif libtiff libpng;
4865     inherit (xlibs) libXpm;
4866   };
4868   SDL_mixer = import ../development/libraries/SDL_mixer {
4869     inherit fetchurl stdenv SDL libogg libvorbis;
4870   };
4872   SDL_net = import ../development/libraries/SDL_net {
4873     inherit fetchurl stdenv SDL;
4874   };
4876   SDL_ttf = import ../development/libraries/SDL_ttf {
4877     inherit fetchurl stdenv SDL freetype;
4878   };
4880   slang = import ../development/libraries/slang {
4881     inherit fetchurl stdenv ncurses pcre libpng zlib readline;
4882   };
4884   slibGuile = import ../development/libraries/slib {
4885     inherit fetchurl stdenv unzip texinfo;
4886     scheme = guile;
4887   };
4889   snack = import ../development/libraries/snack {
4890     inherit fetchurl stdenv tcl tk pkgconfig x11;
4891         # optional
4892     inherit alsaLib vorbisTools python;
4893   };
4895   speex = import ../development/libraries/speex {
4896     inherit fetchurl stdenv libogg;
4897   };
4899   sqlite = lowPrio (import ../development/libraries/sqlite {
4900     inherit fetchurl stdenv;
4901   });
4903   sqliteInteractive = lowPrio (appendToName "interactive" (import ../development/libraries/sqlite {
4904     inherit fetchurl stdenv readline ncurses;
4905   }));
4907   stlport =  import ../development/libraries/stlport {
4908     inherit fetchurl stdenv;
4909   };
4911   t1lib = import ../development/libraries/t1lib {
4912     inherit fetchurl stdenv x11;
4913     inherit (xlibs) libXaw libXpm;
4914   };
4916   taglib = import ../development/libraries/taglib {
4917     inherit fetchurl stdenv zlib;
4918   };
4920   taglib_extras = import ../development/libraries/taglib-extras {
4921     inherit stdenv fetchurl cmake taglib;
4922   };
4924   tapioca_qt = import ../development/libraries/tapioca-qt {
4925     inherit stdenv fetchurl cmake qt4 telepathy_qt;
4926   };
4928   tdb = import ../development/libraries/tdb {
4929     inherit fetchurl stdenv libxslt libxml2 docbook_xsl;
4930   };
4932   tecla = import ../development/libraries/tecla {
4933     inherit fetchurl stdenv;
4934   };
4936   telepathy_gabble = import ../development/libraries/telepathy-gabble {
4937     inherit fetchurl stdenv pkgconfig libxslt telepathy_glib loudmouth;
4938   };
4940   telepathy_glib = import ../development/libraries/telepathy-glib {
4941     inherit fetchurl stdenv dbus_glib pkgconfig libxslt python glib;
4942   };
4944   telepathy_qt = import ../development/libraries/telepathy-qt {
4945     inherit stdenv fetchurl cmake qt4;
4946   };
4948   tk = import ../development/libraries/tk {
4949     inherit fetchurl stdenv tcl x11;
4950   };
4952   unixODBC = import ../development/libraries/unixODBC {
4953     inherit fetchurl stdenv;
4954   };
4956   unixODBCDrivers = recurseIntoAttrs (import ../development/libraries/unixODBCDrivers {
4957     inherit fetchurl stdenv unixODBC glibc libtool openssl zlib;
4958     inherit postgresql mysql sqlite;
4959   });
4961   vamp = import ../development/libraries/audio/vamp {
4962     inherit fetchurl stdenv lib pkgconfig libsndfile;
4963   };
4965   vtk = import ../development/libraries/vtk {
4966     inherit stdenv fetchurl cmake mesa;
4967     inherit (xlibs) libX11 xproto libXt;
4968   };
4970   vxl = import ../development/libraries/vxl {
4971    inherit fetchurl stdenv cmake unzip libtiff expat zlib libpng libjpeg;
4972   };
4974   webkit = builderDefsPackage (import ../development/libraries/webkit) {
4975     inherit (gnome28) gtkdoc libsoup;
4976     inherit (gtkLibs) gtk atk pango glib;
4977     inherit freetype fontconfig gettext gperf curl
4978       libjpeg libtiff libpng libxml2 libxslt sqlite
4979       icu cairo perl intltool automake libtool
4980       pkgconfig autoconf bison libproxy enchant;
4981     inherit (gst_all) gstreamer gstPluginsBase gstFfmpeg
4982       gstPluginsGood;
4983     flex = flex2535;
4984     inherit (xlibs) libXt;
4985   };
4987   wxGTK = wxGTK28;
4989   wxGTK26 = import ../development/libraries/wxGTK-2.6 {
4990     inherit fetchurl stdenv pkgconfig;
4991     inherit (gtkLibs216) gtk;
4992     inherit (xlibs) libXinerama libSM libXxf86vm xf86vidmodeproto;
4993   };
4995   wxGTK28 = makeOverridable (import ../development/libraries/wxGTK-2.8) {
4996     inherit fetchurl stdenv pkgconfig mesa;
4997     inherit (gtkLibs216) gtk;
4998     inherit (xlibs) libXinerama libSM libXxf86vm xf86vidmodeproto;
4999   };
5001   wtk = import ../development/libraries/wtk {
5002       inherit fetchurl stdenv unzip xlibs;
5003     };
5005   x264 = import ../development/libraries/x264 {
5006     inherit fetchurl stdenv;
5007   };
5009   xapian = makeOverridable (import ../development/libraries/xapian) {
5010     inherit fetchurl stdenv zlib;
5011   };
5013   xapianBindings = (import ../development/libraries/xapian/bindings/1.0.14.nix) {
5014     inherit fetchurl stdenv xapian composableDerivation pkgconfig;
5015     inherit ruby perl php tcl python; # TODO perl php Java, tcl, C#, python
5016   };
5018   Xaw3d = import ../development/libraries/Xaw3d {
5019     inherit fetchurl stdenv x11 bison;
5020     flex = flex2533;
5021     inherit (xlibs) imake gccmakedep libXmu libXpm libXp;
5022   };
5024   xineLib = import ../development/libraries/xine-lib {
5025     inherit fetchurl stdenv zlib libdvdcss alsaLib pkgconfig mesa aalib
5026       libvorbis libtheora speex xlibs perl ffmpeg;
5027   };
5029   xautolock = import ../misc/screensavers/xautolock {
5030     inherit fetchurl stdenv x11;
5031     inherit (xorg) imake;
5032     inherit (xlibs) libXScrnSaver scrnsaverproto;
5033   };
5035   xercesJava = import ../development/libraries/java/xerces {
5036     inherit fetchurl stdenv;
5037     ant   = apacheAntGcj;  # for bootstrap purposes
5038     javac = gcj;
5039     jvm   = gcj;
5040   };
5042   xlibsWrapper = import ../development/libraries/xlibs-wrapper {
5043     inherit stdenv;
5044     packages = [
5045       freetype fontconfig xlibs.xproto xlibs.libX11 xlibs.libXt
5046       xlibs.libXft xlibs.libXext xlibs.libSM xlibs.libICE
5047       xlibs.xextproto
5048     ];
5049   };
5051   zangband = builderDefsPackage (import ../games/zangband) {
5052     inherit ncurses flex bison autoconf automake m4 coreutils;
5053   };
5055   zlib = makeOverridable (import ../development/libraries/zlib) {
5056     fetchurl = fetchurlBoot;
5057     inherit stdenv;
5058   };
5060   zlibStatic = lowPrio (appendToName "static" (import ../development/libraries/zlib {
5061     inherit fetchurl stdenv;
5062     static = true;
5063   }));
5065   zvbi = import ../development/libraries/zvbi {
5066     inherit fetchurl stdenv libpng x11;
5067     pngSupport = true;
5068   };
5071   ### DEVELOPMENT / LIBRARIES / JAVA
5074   atermjava = import ../development/libraries/java/aterm {
5075     inherit fetchurl sharedobjects jjtraveler jdk;
5076     stdenv = overrideInStdenv stdenv [gnumake380];
5077   };
5079   commonsFileUpload = import ../development/libraries/java/jakarta-commons/file-upload {
5080     inherit stdenv fetchurl;
5081   };
5083   fastjar = import ../development/tools/java/fastjar {
5084     inherit fetchurl stdenv zlib;
5085   };
5087   httpunit = import ../development/libraries/java/httpunit {
5088     inherit stdenv fetchurl unzip;
5089   };
5091   gwtdragdrop = import ../development/libraries/java/gwt-dragdrop {
5092     inherit stdenv fetchurl;
5093   };
5095   gwtwidgets = import ../development/libraries/java/gwt-widgets {
5096     inherit stdenv fetchurl;
5097   };
5099   jakartabcel = import ../development/libraries/java/jakarta-bcel {
5100     regexp = jakartaregexp;
5101     inherit fetchurl stdenv;
5102   };
5104   jakartaregexp = import ../development/libraries/java/jakarta-regexp {
5105     inherit fetchurl stdenv;
5106   };
5108   javaCup = import ../development/libraries/java/cup {
5109     inherit stdenv fetchurl jdk;
5110   };
5112   javasvn = import ../development/libraries/java/javasvn {
5113     inherit stdenv fetchurl unzip;
5114   };
5116   jclasslib = import ../development/tools/java/jclasslib {
5117     inherit fetchurl stdenv xpf jre;
5118     ant = apacheAnt14;
5119   };
5121   jdom = import ../development/libraries/java/jdom {
5122     inherit stdenv fetchurl;
5123   };
5125   jflex = import ../development/libraries/java/jflex {
5126     inherit stdenv fetchurl;
5127   };
5129   jjtraveler = import ../development/libraries/java/jjtraveler {
5130     inherit fetchurl jdk;
5131     stdenv = overrideInStdenv stdenv [gnumake380];
5132   };
5134   junit = import ../development/libraries/java/junit {
5135     inherit stdenv fetchurl unzip;
5136   };
5138   lucene = import ../development/libraries/java/lucene {
5139     inherit stdenv fetchurl;
5140   };
5142   mockobjects = import ../development/libraries/java/mockobjects {
5143     inherit stdenv fetchurl;
5144   };
5146   saxon = import ../development/libraries/java/saxon {
5147     inherit fetchurl stdenv unzip;
5148   };
5150   saxonb = import ../development/libraries/java/saxon/default8.nix {
5151     inherit fetchurl stdenv unzip jre;
5152   };
5154   sharedobjects = import ../development/libraries/java/shared-objects {
5155     inherit fetchurl jdk;
5156     stdenv = overrideInStdenv stdenv [gnumake380];
5157   };
5159   smack = import ../development/libraries/java/smack {
5160     inherit stdenv fetchurl;
5161   };
5163   swt = import ../development/libraries/java/swt {
5164     inherit stdenv fetchurl unzip jdk pkgconfig;
5165     inherit (gtkLibs) gtk;
5166     inherit (xlibs) libXtst;
5167   };
5169   xalanj = xalanJava;
5170   xalanJava = import ../development/libraries/java/xalanj {
5171     inherit fetchurl stdenv;
5172     ant    = apacheAntGcj;  # for bootstrap purposes
5173     javac  = gcj;
5174     jvm    = gcj;
5175     xerces = xercesJava;
5176   };
5178   zziplib = import ../development/libraries/zziplib {
5179     inherit fetchurl stdenv perl python zip xmlto zlib;
5180   };
5183   ### DEVELOPMENT / PERL MODULES
5185   buildPerlPackage = import ../development/perl-modules/generic perl;
5187   perlPackages = recurseIntoAttrs (import ./perl-packages.nix {
5188     inherit pkgs;
5189   });
5191   perlXMLParser = perlPackages.XMLParser;
5194   ### DEVELOPMENT / PYTHON MODULES
5196   buildPythonPackage =
5197     import ../development/python-modules/generic {
5198       inherit python setuptools makeWrapper lib;
5199     };
5201   buildPython26Package =
5202     import ../development/python-modules/generic {
5203       inherit makeWrapper lib;
5204       python = python26;
5205       setuptools = setuptools_python26;
5206     };
5208   pythonPackages = recurseIntoAttrs (import ./python-packages.nix {
5209     inherit pkgs python buildPythonPackage;
5210   });
5212   python26Packages = recurseIntoAttrs (import ./python-packages.nix {
5213     inherit pkgs;
5214     python = python26;
5215     buildPythonPackage = buildPython26Package;
5216   });
5218   foursuite = import ../development/python-modules/4suite {
5219     inherit fetchurl stdenv python;
5220   };
5222   bsddb3 = import ../development/python-modules/bsddb3 {
5223     inherit fetchurl stdenv python db4;
5224   };
5226   flup = builderDefsPackage ../development/python-modules/flup {
5227     inherit fetchurl stdenv;
5228     python = python25;
5229     setuptools = setuptools.passthru.function {python = python25;};
5230   };
5232   numeric = import ../development/python-modules/numeric {
5233     inherit fetchurl stdenv python;
5234   };
5236   pil = import ../development/python-modules/pil {
5237     inherit fetchurl stdenv python zlib libjpeg freetype;
5238   };
5240   pil_python26 = import ../development/python-modules/pil {
5241     inherit fetchurl stdenv zlib libjpeg freetype;
5242     python = python26;
5243   };
5245   psyco = import ../development/python-modules/psyco {
5246       inherit fetchurl stdenv python;
5247     };
5249   pycairo = import ../development/python-modules/pycairo {
5250     inherit fetchurl stdenv python pkgconfig cairo x11;
5251   };
5253   pycrypto = import ../development/python-modules/pycrypto {
5254     inherit fetchurl stdenv python gmp;
5255   };
5257   pycups = import ../development/python-modules/pycups {
5258     inherit stdenv fetchurl python cups;
5259   };
5261   pygame = import ../development/python-modules/pygame {
5262     inherit fetchurl stdenv python pkgconfig SDL SDL_image
5263       SDL_mixer SDL_ttf numeric;
5264   };
5266   pygobject = import ../development/python-modules/pygobject {
5267     inherit fetchurl stdenv python pkgconfig glib;
5268   };
5270   pygtk = import ../development/python-modules/pygtk {
5271     inherit fetchurl stdenv python pkgconfig pygobject pycairo;
5272     inherit (gtkLibs) glib gtk;
5273   };
5275   pyGtkGlade = import ../development/python-modules/pygtk {
5276     inherit fetchurl stdenv python pkgconfig pygobject pycairo;
5277     inherit (gtkLibs) glib gtk;
5278     inherit (gnome) libglade;
5279   };
5281   pyopengl = import ../development/python-modules/pyopengl {
5282     inherit fetchurl stdenv setuptools mesa freeglut pil python;
5283   };
5285   pyopenssl = builderDefsPackage (import ../development/python-modules/pyopenssl) {
5286     inherit python openssl;
5287   };
5289   pythonSip = builderDefsPackage (import ../development/python-modules/python-sip/4.7.4.nix) {
5290     inherit python;
5291   };
5293   rhpl = import ../development/python-modules/rhpl {
5294     inherit stdenv fetchurl rpm cpio python wirelesstools gettext;
5295   };
5297   sip = import ../development/python-modules/python-sip {
5298     inherit stdenv fetchurl lib python;
5299   };
5301   sip410 = import ../development/python-modules/python-sip/4.10.nix {
5302     inherit stdenv fetchurl lib python;
5303   };
5305   sip_python26 = import ../development/python-modules/python-sip {
5306     inherit stdenv fetchurl lib;
5307     python = python26;
5308   };
5310   pyqt = builderDefsPackage (import ../development/python-modules/pyqt/4.3.3.nix) {
5311     inherit pkgconfig python pythonSip glib;
5312     inherit (xlibs) libX11 libXext;
5313     qt = qt4;
5314   };
5316   pyqt4 = import ../development/python-modules/pyqt {
5317     inherit stdenv fetchurl lib python sip;
5318     qt4 = qt45;
5319   };
5321   pyqt4_python26 = import ../development/python-modules/pyqt {
5322     inherit stdenv fetchurl lib;
5323     qt4 = qt45;
5324     python = python26;
5325     sip = sip_python26;
5326   };
5328   pyqt47 = import ../development/python-modules/pyqt/4.7.nix {
5329     inherit stdenv fetchurl lib python;
5330     qt4 = qt46;
5331     sip = sip410;
5332   };
5334   pyx = import ../development/python-modules/pyx {
5335     inherit fetchurl stdenv python makeWrapper;
5336   };
5338   pyxml = import ../development/python-modules/pyxml {
5339     inherit fetchurl stdenv python makeWrapper;
5340   };
5342   setuptools = builderDefsPackage (import ../development/python-modules/setuptools) {
5343     inherit python makeWrapper;
5344   };
5346   setuptools_python26 = builderDefsPackage (import ../development/python-modules/setuptools) {
5347     inherit makeWrapper;
5348     python = python26;
5349   };
5351   wxPython = wxPython26;
5353   wxPython26 = import ../development/python-modules/wxPython/2.6.nix {
5354     inherit fetchurl stdenv pkgconfig python;
5355     wxGTK = wxGTK26;
5356   };
5358   wxPython28 = import ../development/python-modules/wxPython/2.8.nix {
5359     inherit fetchurl stdenv pkgconfig python;
5360     inherit wxGTK;
5361   };
5363   twisted = pythonPackages.twisted;
5365   ZopeInterface = import ../development/python-modules/ZopeInterface {
5366     inherit fetchurl stdenv python;
5367   };
5369   zope = import ../development/python-modules/zope {
5370     inherit fetchurl stdenv;
5371     python = python24;
5372   };
5374   ### SERVERS
5377   apacheHttpd = makeOverridable (import ../servers/http/apache-httpd) {
5378     inherit (pkgsOverriden) fetchurl stdenv perl openssl zlib apr aprutil pcre;
5379     sslSupport = true;
5380   };
5382   sabnzbd = import ../servers/sabnzbd {
5383     inherit fetchurl stdenv python cheetahTemplate makeWrapper par2cmdline unzip unrar;
5384   };
5386   bind = builderDefsPackage (import ../servers/dns/bind/9.5.0.nix) {
5387     inherit openssl libtool;
5388   };
5390   dico = import ../servers/dico {
5391     inherit fetchurl stdenv libtool gettext zlib readline guile python;
5392   };
5394   dict = composedArgsAndFun (import ../servers/dict/1.9.15.nix) {
5395     inherit builderDefs which bison;
5396     flex=flex2534;
5397   };
5399   dictdDBs = recurseIntoAttrs (import ../servers/dict/dictd-db.nix {
5400     inherit builderDefs;
5401   });
5403   dictDBCollector = import ../servers/dict/dictd-db-collector.nix {
5404     inherit stdenv lib dict;
5405   };
5407   dovecot = import ../servers/mail/dovecot {
5408     inherit fetchurl stdenv openssl pam;
5409   };
5410   dovecot_1_1_1 = import ../servers/mail/dovecot/1.1.1.nix {
5411     inherit fetchurl stdenv openssl pam;
5412   };
5414   ejabberd = import ../servers/xmpp/ejabberd {
5415     inherit fetchurl stdenv expat erlang zlib openssl pam lib;
5416   };
5418   couchdb = import ../servers/http/couchdb {
5419     inherit fetchurl stdenv erlang spidermonkey icu getopt
5420       curl;
5421   };
5423   fingerd_bsd = import ../servers/fingerd/bsd-fingerd {
5424     inherit fetchurl stdenv;
5425   };
5427   ircdHybrid = import ../servers/irc/ircd-hybrid {
5428     inherit fetchurl stdenv openssl zlib;
5429   };
5431   jboss = import ../servers/http/jboss {
5432     inherit fetchurl stdenv unzip jdk lib;
5433   };
5435   jboss_mysql_jdbc = import ../servers/http/jboss/jdbc/mysql {
5436     inherit stdenv jboss mysql_jdbc;
5437   };
5439   jetty = import ../servers/http/jetty {
5440     inherit fetchurl stdenv unzip;
5441   };
5443   jetty61 = import ../servers/http/jetty/6.1 {
5444     inherit fetchurl stdenv unzip;
5445   };
5447   lighttpd = import ../servers/http/lighttpd {
5448     inherit fetchurl stdenv pcre libxml2 zlib attr bzip2;
5449   };
5451   mod_python = makeOverridable (import ../servers/http/apache-modules/mod_python) {
5452     inherit (pkgsOverriden) fetchurl stdenv apacheHttpd python;
5453   };
5455   myserver = import ../servers/http/myserver {
5456     inherit fetchurl stdenv libgcrypt libevent libidn gnutls libxml2
5457       zlib texinfo cppunit;
5458   };
5460   nginx = builderDefsPackage (import ../servers/http/nginx) {
5461     inherit openssl pcre zlib libxml2 libxslt;
5462   };
5464   postfix = import ../servers/mail/postfix {
5465     inherit fetchurl stdenv db4 openssl cyrus_sasl glibc;
5466   };
5468   pulseaudio = makeOverridable (import ../servers/pulseaudio) {
5469     inherit fetchurl stdenv pkgconfig gnum4 gdbm
5470       dbus hal avahi liboil libsamplerate libsndfile speex
5471       intltool gettext libtool libcap;
5472     inherit (xlibs) libX11 libICE libSM libXtst libXi;
5473     inherit (gtkLibs) gtk glib;
5474     inherit alsaLib;    # Needs ALSA >= 1.0.17.
5475     gconf = gnome.GConf;
5476   };
5478   tomcat_connectors = import ../servers/http/apache-modules/tomcat-connectors {
5479     inherit fetchurl stdenv apacheHttpd jdk;
5480   };
5482   portmap = makeOverridable (import ../servers/portmap) {
5483     inherit fetchurl stdenv lib tcpWrapper;
5484   };
5486   monetdb = import ../servers/sql/monetdb {
5487     inherit composableDerivation getConfig;
5488     inherit fetchurl stdenv pcre openssl readline libxml2 geos apacheAnt jdk5;
5489   };
5491   mysql4 = import ../servers/sql/mysql {
5492     inherit fetchurl stdenv ncurses zlib perl;
5493     ps = procps; /* !!! Linux only */
5494   };
5496   mysql5 = import ../servers/sql/mysql5 {
5497     inherit fetchurl stdenv ncurses zlib perl openssl;
5498     ps = procps; /* !!! Linux only */
5499   };
5501   mysql51 = import ../servers/sql/mysql51 {
5502     inherit fetchurl ncurses zlib perl openssl stdenv;
5503     ps = procps; /* !!! Linux only */
5504   };
5506   mysql = mysql5;
5508   mysql_jdbc = import ../servers/sql/mysql/jdbc {
5509     inherit fetchurl stdenv ant;
5510   };
5512   nagios = import ../servers/monitoring/nagios {
5513     inherit fetchurl stdenv perl gd libpng zlib;
5514     gdSupport = true;
5515   };
5517   nagiosPluginsOfficial = import ../servers/monitoring/nagios/plugins/official {
5518     inherit fetchurl stdenv openssh;
5519   };
5521   openfire = composedArgsAndFun (import ../servers/xmpp/openfire) {
5522     inherit builderDefs jre;
5523   };
5525   postgresql = postgresql83;
5527   postgresql83 = import ../servers/sql/postgresql/8.3.x.nix {
5528     inherit fetchurl stdenv readline ncurses zlib;
5529   };
5531   postgresql84 = import ../servers/sql/postgresql/8.4.x.nix {
5532     inherit fetchurl stdenv readline ncurses zlib;
5533   };
5535   postgresql_jdbc = import ../servers/sql/postgresql/jdbc {
5536     inherit fetchurl stdenv ant;
5537   };
5539   pyIRCt = builderDefsPackage (import ../servers/xmpp/pyIRCt) {
5540     inherit xmpppy pythonIRClib python makeWrapper;
5541   };
5543   pyMAILt = builderDefsPackage (import ../servers/xmpp/pyMAILt) {
5544     inherit xmpppy python makeWrapper fetchcvs;
5545   };
5547   samba = makeOverridable (import ../servers/samba) {
5548     inherit stdenv fetchurl readline openldap pam kerberos popt iniparser
5549   libunwind acl fam;
5550   };
5552   squids = recurseIntoAttrs( import ../servers/squid/squids.nix {
5553     inherit fetchurl stdenv perl lib composableDerivation;
5554   });
5555   squid = squids.squid3Beta; # has ipv6 support
5557   tomcat5 = import ../servers/http/tomcat {
5558     inherit fetchurl stdenv jdk;
5559   };
5561   tomcat6 = import ../servers/http/tomcat/6.0.nix {
5562     inherit fetchurl stdenv jdk;
5563   };
5565   tomcat_mysql_jdbc = import ../servers/http/tomcat/jdbc/mysql {
5566     inherit stdenv tomcat6 mysql_jdbc;
5567   };
5569   axis2 = import ../servers/http/tomcat/axis2 {
5570     inherit fetchurl stdenv jdk apacheAnt unzip;
5571   };
5573   vsftpd = import ../servers/ftp/vsftpd {
5574     inherit fetchurl openssl stdenv libcap pam;
5575   };
5577   xinetd = import ../servers/xinetd {
5578     inherit fetchurl stdenv;
5579   };
5581   xorg = recurseIntoAttrs (import ../servers/x11/xorg/default.nix {
5582     inherit fetchurl fetchsvn stdenv pkgconfig freetype fontconfig
5583       libxslt expat libdrm libpng zlib perl mesa
5584       xkeyboard_config dbus hal libuuid openssl gperf m4
5585       automake autoconf libtool;
5587     # !!! pythonBase is use instead of python because this cause an infinite
5588     # !!! recursion when the flag python.full is set to true.  Packages
5589     # !!! contained in the loop are python, tk, xlibs-wrapper, libX11,
5590     # !!! libxcd (and xcb-proto).
5591     python =  pythonBase;
5592   });
5594   xorgReplacements = composedArgsAndFun (import ../servers/x11/xorg/replacements.nix) {
5595     inherit fetchurl stdenv automake autoconf libtool xorg composedArgsAndFun;
5596   };
5598   xorgVideoUnichrome = import ../servers/x11/xorg/unichrome/default.nix {
5599     inherit stdenv fetchgit pkgconfig libdrm mesa automake autoconf libtool;
5600     inherit (xorg) fontsproto libpciaccess randrproto renderproto videoproto
5601       libX11 xextproto xf86driproto xorgserver xproto libXvMC glproto
5602       libXext utilmacros;
5603   };
5605   zabbixAgent = import ../servers/monitoring/zabbix {
5606     inherit fetchurl stdenv;
5607     enableServer = false;
5608   };
5610   zabbixServer = import ../servers/monitoring/zabbix {
5611     inherit fetchurl stdenv postgresql curl;
5612     enableServer = true;
5613   };
5616   ### OS-SPECIFIC
5618   afuse = import ../os-specific/linux/afuse {
5619     inherit fetchurl stdenv lib pkgconfig fuse;
5620   };
5622   autofs5 = import ../os-specific/linux/autofs/autofs-v5.nix {
5623     inherit sourceFromHead fetchurl stdenv flex bison linuxHeaders;
5624   };
5626   _915resolution = import ../os-specific/linux/915resolution {
5627     inherit fetchurl stdenv;
5628   };
5630   nfsUtils = import ../os-specific/linux/nfs-utils {
5631     inherit fetchurl stdenv tcpWrapper libuuid;
5632   };
5634   acpi = import ../os-specific/linux/acpi {
5635     inherit fetchurl stdenv;
5636   };
5638   acpid = import ../os-specific/linux/acpid {
5639     inherit fetchurl stdenv;
5640   };
5642   acpitool = import ../os-specific/linux/acpitool {
5643     inherit fetchurl stdenv;
5644   };
5646   alsaLib = import ../os-specific/linux/alsa-lib {
5647     inherit stdenv fetchurl;
5648   };
5650   alsaPlugins = import ../os-specific/linux/alsa-plugins {
5651     inherit fetchurl stdenv lib pkgconfig alsaLib pulseaudio jackaudio;
5652   };
5653   alsaPluginWrapper = import ../os-specific/linux/alsa-plugins/wrapper.nix {
5654     inherit stdenv alsaPlugins writeScriptBin;
5655   };
5657   alsaUtils = import ../os-specific/linux/alsa-utils {
5658     inherit stdenv fetchurl alsaLib gettext ncurses;
5659   };
5661   bluez = import ../os-specific/linux/bluez {
5662     inherit fetchurl stdenv pkgconfig dbus libusb alsaLib glib;
5663   };
5665   bridge_utils = import ../os-specific/linux/bridge_utils {
5666     inherit fetchurl stdenv autoconf automake;
5667   };
5669   cpufrequtils = (
5670     import ../os-specific/linux/cpufrequtils {
5671     inherit fetchurl stdenv libtool gettext;
5672     glibc = stdenv.gcc.libc;
5673     linuxHeaders = stdenv.gcc.libc.kernelHeaders;
5674   });
5676   cryopid = import ../os-specific/linux/cryopid {
5677     inherit fetchurl stdenv zlibStatic;
5678   };
5680   cryptsetup = import ../os-specific/linux/cryptsetup {
5681     inherit stdenv fetchurl libuuid popt devicemapper udev;
5682   };
5684   cramfsswap = import ../os-specific/linux/cramfsswap {
5685     inherit fetchurl stdenv zlib;
5686   };
5688   darwinArchUtility = import ../os-specific/darwin/arch {
5689     inherit stdenv;
5690   };
5692   darwinSwVersUtility = import ../os-specific/darwin/sw_vers {
5693     inherit stdenv;
5694   };
5696   devicemapper = lvm2;
5698   dmidecode = import ../os-specific/linux/dmidecode {
5699     inherit fetchurl stdenv;
5700   };
5702   dmtcp = import ../os-specific/linux/dmtcp {
5703     inherit fetchurl stdenv perl python;
5704   };
5706   dmtcp_devel = import ../os-specific/linux/dmtcp/devel.nix {
5707     inherit fetchsvn stdenv perl python;
5708   };
5710   dietlibc = import ../os-specific/linux/dietlibc {
5711     inherit fetchurl glibc;
5712     # Dietlibc 0.30 doesn't compile on PPC with GCC 4.1, bus GCC 3.4 works.
5713     stdenv = if stdenv.system == "powerpc-linux" then overrideGCC stdenv gcc34 else stdenv;
5714   };
5716   directvnc = builderDefsPackage ../os-specific/linux/directvnc {
5717     inherit libjpeg pkgconfig zlib directfb;
5718     inherit (xlibs) xproto;
5719   };
5721   dmraid = builderDefsPackage ../os-specific/linux/dmraid {
5722     inherit devicemapper;
5723   };
5725   libuuid = if ! stdenv.isDarwin then utillinuxng else null;
5727   e3cfsprogs = import ../os-specific/linux/e3cfsprogs {
5728     inherit stdenv fetchurl gettext;
5729   };
5731   eject = import ../os-specific/linux/eject {
5732     inherit fetchurl stdenv gettext;
5733   };
5735   fbterm = builderDefsPackage (import ../os-specific/linux/fbterm) {
5736     inherit fontconfig gpm freetype pkgconfig ncurses;
5737   };
5739   fuse = import ../os-specific/linux/fuse {
5740     inherit fetchurl stdenv utillinux;
5741   };
5743   fxload = import ../os-specific/linux/fxload {
5744     inherit fetchurl stdenv;
5745   };
5747   gpm = import ../servers/gpm {
5748     inherit fetchurl stdenv ncurses bison;
5749     flex = flex2535;
5750   };
5752   hal = makeOverridable (import ../os-specific/linux/hal) {
5753     inherit fetchurl stdenv pkgconfig python pciutils usbutils expat
5754       libusb dbus dbus_glib libuuid perl perlXMLParser
5755       gettext zlib eject libsmbios udev gperf dmidecode utillinuxng
5756       consolekit policykit pmutils glib;
5757   };
5759   halevt = import ../os-specific/linux/hal/hal-evt.nix {
5760     inherit fetchurl stdenv lib libxml2 pkgconfig boolstuff hal dbus_glib;
5761   };
5763   hal_info = import ../os-specific/linux/hal/info.nix {
5764     inherit fetchurl stdenv pkgconfig;
5765   };
5767   hal_info_synaptics = import ../os-specific/linux/hal/synaptics.nix {
5768     inherit stdenv;
5769   };
5771   hdparm = import ../os-specific/linux/hdparm {
5772     inherit fetchurl stdenv;
5773   };
5775   hibernate = import ../os-specific/linux/hibernate {
5776     inherit fetchurl stdenv gawk;
5777   };
5779   htop = import ../os-specific/linux/htop {
5780     inherit fetchurl stdenv ncurses;
5781   };
5783   hwdata = import ../os-specific/linux/hwdata {
5784     inherit fetchurl stdenv;
5785   };
5787   ifplugd = import ../os-specific/linux/ifplugd {
5788     inherit fetchurl stdenv pkgconfig libdaemon;
5789   };
5791   iproute = import ../os-specific/linux/iproute {
5792     inherit fetchurl stdenv flex bison db4;
5793   };
5795   iputils = (
5796     import ../os-specific/linux/iputils {
5797     inherit fetchurl stdenv;
5798     glibc = stdenv.gcc.libc;
5799     linuxHeaders = stdenv.gcc.libc.kernelHeaders;
5800   });
5802   iptables = import ../os-specific/linux/iptables {
5803     inherit fetchurl stdenv;
5804   };
5806   ipw2200fw = import ../os-specific/linux/firmware/ipw2200 {
5807     inherit fetchurl stdenv;
5808   };
5810   iwlwifi1000ucode = import ../os-specific/linux/firmware/iwlwifi-1000-ucode {
5811     inherit fetchurl stdenv;
5812   };
5814   iwlwifi3945ucode = import ../os-specific/linux/firmware/iwlwifi-3945-ucode {
5815     inherit fetchurl stdenv;
5816   };
5818   iwlwifi4965ucodeV1 = import ../os-specific/linux/firmware/iwlwifi-4965-ucode {
5819     inherit fetchurl stdenv;
5820   };
5822   iwlwifi4965ucodeV2 = import ../os-specific/linux/firmware/iwlwifi-4965-ucode/version-2.nix {
5823     inherit fetchurl stdenv;
5824   };
5826   iwlwifi5000ucode = import ../os-specific/linux/firmware/iwlwifi-5000-ucode {
5827     inherit fetchurl stdenv;
5828   };
5830   kbd = import ../os-specific/linux/kbd {
5831     inherit fetchurl stdenv bison flex autoconf automake;
5832   };
5834   linuxHeaders = linuxHeaders_2_6_28;
5836   linuxHeadersCross = cross : forceBuildDrv (import ../os-specific/linux/kernel-headers/2.6.28.nix {
5837     inherit stdenv fetchurl cross perl;
5838   });
5840   linuxHeaders_2_6_18 = import ../os-specific/linux/kernel-headers/2.6.18.5.nix {
5841     inherit fetchurl stdenv unifdef;
5842   };
5844   linuxHeaders_2_6_28 = import ../os-specific/linux/kernel-headers/2.6.28.nix {
5845     inherit fetchurl stdenv perl;
5846   };
5848   linuxHeaders_2_6_32 = import ../os-specific/linux/kernel-headers/2.6.32.nix {
5849     inherit fetchurl stdenv perl;
5850   };
5852   linuxHeadersArm = import ../os-specific/linux/kernel-headers-cross {
5853     inherit fetchurl stdenv;
5854     cross = "arm-linux";
5855   };
5857   linuxHeadersMips = import ../os-specific/linux/kernel-headers-cross {
5858     inherit fetchurl stdenv;
5859     cross = "mips-linux";
5860   };
5862   linuxHeadersSparc = import ../os-specific/linux/kernel-headers-cross {
5863     inherit fetchurl stdenv;
5864     cross = "sparc-linux";
5865   };
5867   kernelPatches = import ../os-specific/linux/kernel/patches.nix {
5868     inherit fetchurl;
5869   };
5871   linux_2_6_25 = makeOverridable (import ../os-specific/linux/kernel/linux-2.6.25.nix) {
5872     inherit fetchurl stdenv perl mktemp module_init_tools;
5873     kernelPatches =
5874       [ kernelPatches.fbcondecor_2_6_25
5875         kernelPatches.sec_perm_2_6_24
5876       ];
5877   };
5879   linux_2_6_27 = makeOverridable (import ../os-specific/linux/kernel/linux-2.6.27.nix) {
5880     inherit fetchurl stdenv perl mktemp module_init_tools;
5881     kernelPatches =
5882       [ kernelPatches.fbcondecor_2_6_27
5883         kernelPatches.sec_perm_2_6_24
5884       ];
5885   };
5887   linux_2_6_28 = makeOverridable (import ../os-specific/linux/kernel/linux-2.6.28.nix) {
5888     inherit fetchurl stdenv perl mktemp module_init_tools;
5889     kernelPatches =
5890       [ kernelPatches.fbcondecor_2_6_28
5891         kernelPatches.sec_perm_2_6_24
5892         kernelPatches.ext4_softlockups_2_6_28
5893       ];
5894   };
5896   linux_2_6_29 = makeOverridable (import ../os-specific/linux/kernel/linux-2.6.29.nix) {
5897     inherit fetchurl stdenv perl mktemp module_init_tools;
5898     kernelPatches =
5899       [ kernelPatches.fbcondecor_2_6_29
5900         kernelPatches.sec_perm_2_6_24
5901       ];
5902   };
5904   linux_2_6_31 = makeOverridable (import ../os-specific/linux/kernel/linux-2.6.31.nix) {
5905     inherit fetchurl stdenv perl mktemp module_init_tools platform;
5906     kernelPatches = [];
5907   };
5909   linux_2_6_32 = makeOverridable (import ../os-specific/linux/kernel/linux-2.6.32.nix) {
5910     inherit fetchurl stdenv perl mktemp module_init_tools;
5911     kernelPatches =
5912       [ kernelPatches.fbcondecor_2_6_31
5913         kernelPatches.sec_perm_2_6_24
5914       ];
5915     inherit platform;
5916   };
5918   linux_2_6_32_zen4 = makeOverridable (import ../os-specific/linux/zen-kernel/2.6.32-zen4.nix) {
5919     inherit fetchurl stdenv perl mktemp module_init_tools runCommand xz;
5920   };
5922   linux_2_6_32_zen4_oldi686 = linux_2_6_32_zen4.override {
5923     features = {
5924       oldI686 = true;
5925     };
5926   };
5928   linux_2_6_32_zen4_bfs = linux_2_6_32_zen4.override {
5929     features = {
5930       ckSched = true;
5931     };
5932   };
5934   /* Linux kernel modules are inherently tied to a specific kernel.  So
5935      rather than provide specific instances of those packages for a
5936      specific kernel, we have a function that builds those packages
5937      for a specific kernel.  This function can then be called for
5938      whatever kernel you're using. */
5940   linuxPackagesFor = kernel: rec {
5942     inherit kernel;
5944     aufs = import ../os-specific/linux/aufs {
5945       inherit fetchurl stdenv kernel;
5946     };
5948     # Currently it is broken
5949     # Build requires exporting some symbols from kernel
5950     # Go to package homepage to learn about the needed
5951     # patch. Feel free to take over the package.
5952     aufs2 = import ../os-specific/linux/aufs2 {
5953       inherit fetchgit stdenv kernel perl;
5954     };
5956     aufs2Utils = if lib.attrByPath ["features" "aufs"] false kernel then
5957       builderDefsPackage ../os-specific/linux/aufs2-utils {
5958         inherit kernel;
5959       }
5960     else null;
5962     exmap = import ../os-specific/linux/exmap {
5963       inherit fetchurl stdenv kernel boost pcre pkgconfig;
5964       inherit (gtkLibs) gtkmm;
5965     };
5967     iwlwifi = import ../os-specific/linux/iwlwifi {
5968       inherit fetchurl stdenv kernel;
5969     };
5971     iwlwifi4965ucode =
5972       (if (builtins.compareVersions kernel.version "2.6.27" == 0)
5973           || (builtins.compareVersions kernel.version "2.6.27" == 1)
5974        then iwlwifi4965ucodeV2
5975        else iwlwifi4965ucodeV1);
5977     atheros = composedArgsAndFun (import ../os-specific/linux/atheros/0.9.4.nix) {
5978       inherit fetchurl stdenv builderDefs kernel lib;
5979     };
5981     nvidia_x11 = import ../os-specific/linux/nvidia-x11 {
5982       inherit stdenv fetchurl kernel xlibs gtkLibs zlib perl;
5983     };
5985     nvidia_x11_legacy = import ../os-specific/linux/nvidia-x11/legacy.nix {
5986       inherit stdenv fetchurl kernel xlibs gtkLibs zlib;
5987     };
5989     openafsClient = import ../servers/openafs-client {
5990       inherit stdenv fetchurl autoconf automake flex yacc;
5991       inherit kernel glibc ncurses perl krb5;
5992     };
5994     wis_go7007 = import ../os-specific/linux/wis-go7007 {
5995       inherit fetchurl stdenv kernel ncurses fxload;
5996     };
5998     kqemu = builderDefsPackage ../os-specific/linux/kqemu/1.4.0pre1.nix {
5999       inherit kernel perl;
6000     };
6002     splashutils =
6003       if kernel.features ? fbConDecor then pkgs.splashutils else null;
6005     ext3cowtools = import ../os-specific/linux/ext3cow-tools {
6006       inherit stdenv fetchurl;
6007       kernel_ext3cowpatched = kernel;
6008     };
6010     /* compiles but has to be integrated into the kernel somehow
6011       Let's have it uncommented and finish it..
6012     */
6013     ndiswrapper = import ../os-specific/linux/ndiswrapper {
6014       inherit fetchurl stdenv;
6015       inherit kernel perl;
6016     };
6018     ov511 = import ../os-specific/linux/ov511 {
6019       inherit fetchurl kernel;
6020       stdenv = overrideGCC stdenv gcc34;
6021     };
6023     # State Nix
6024     snix = import ../tools/package-management/snix {
6025       inherit fetchurl stdenv perl curl bzip2 openssl bison;
6026       inherit libtool automake autoconf docbook5 docbook5_xsl libxslt docbook_xml_dtd_43 w3m;
6028       aterm = aterm25;
6029       db4 = db45;
6031       flex = flex2533;
6033       inherit ext3cowtools e3cfsprogs rsync;
6034       ext3cow_kernel = kernel;
6035     };
6037     sysprof = import ../development/tools/profiling/sysprof {
6038       inherit fetchurl stdenv binutils pkgconfig kernel;
6039       inherit (gnome) gtk glib pango libglade;
6040     };
6042     virtualbox = import ../applications/virtualization/virtualbox {
6043       stdenv = stdenv_32bit;
6044       inherit fetchurl lib iasl dev86 libxslt libxml2 SDL hal
6045           libcap libpng zlib kernel python which alsaLib curl glib;
6046       qt4 = qt45;
6047       inherit (xlibs) xproto libX11 libXext libXcursor;
6048       inherit (gnome) libIDL;
6049     };
6051     virtualboxGuestAdditions = import ../applications/virtualization/virtualbox/guest-additions {
6052       inherit stdenv fetchurl lib patchelf cdrkit kernel;
6053       inherit (xlibs) libX11 libXt libXext libXmu libXcomposite libXfixes;
6054     };
6055   };
6057   # Build the kernel modules for the some of the kernels.
6058   linuxPackages_2_6_25 = recurseIntoAttrs (linuxPackagesFor linux_2_6_25);
6059   linuxPackages_2_6_27 = recurseIntoAttrs (linuxPackagesFor linux_2_6_27);
6060   linuxPackages_2_6_28 = recurseIntoAttrs (linuxPackagesFor linux_2_6_28);
6061   linuxPackages_2_6_29 = recurseIntoAttrs (linuxPackagesFor linux_2_6_29);
6062   linuxPackages_2_6_31 = recurseIntoAttrs (linuxPackagesFor linux_2_6_31);
6063   linuxPackages_2_6_32 = recurseIntoAttrs (linuxPackagesFor linux_2_6_32);
6065   # The current default kernel / kernel modules.
6066   linux = linux_2_6_32;
6067   linuxPackages = linuxPackagesFor linux;
6069   customKernel = composedArgsAndFun (lib.sumTwoArgs (import ../os-specific/linux/kernel/generic.nix) {
6070     inherit fetchurl stdenv perl mktemp module_init_tools;
6071   });
6073   keyutils = import ../os-specific/linux/keyutils {
6074     inherit fetchurl stdenv;
6075   };
6077   libselinux = import ../os-specific/linux/libselinux {
6078     inherit fetchurl stdenv libsepol;
6079   };
6081   libraw1394 = import ../development/libraries/libraw1394 {
6082     inherit fetchurl stdenv;
6083   };
6085   libsexy = import ../development/libraries/libsexy {
6086     inherit stdenv fetchurl pkgconfig libxml2;
6087     inherit (gtkLibs) glib gtk pango;
6088   };
6090   librsvg = gnome.librsvg;
6092   libsepol = import ../os-specific/linux/libsepol {
6093     inherit fetchurl stdenv;
6094   };
6096   libsmbios = import ../os-specific/linux/libsmbios {
6097     inherit fetchurl stdenv pkgconfig libxml2 perl;
6098   };
6100   lm_sensors = import ../os-specific/linux/lm_sensors {
6101     inherit fetchurl stdenv bison flex perl;
6102   };
6104   klibc = makeOverridable (import ../os-specific/linux/klibc) {
6105     inherit fetchurl stdenv perl bison mktemp;
6106     linuxHeaders = glibc.kernelHeaders;
6107   };
6109   # Old version; needed in vmtools for insmod.  Should use
6110   # module_init_tools instead.
6111   klibc_15 = makeOverridable (import ../os-specific/linux/klibc/1.5.nix) {
6112     inherit fetchurl stdenv perl bison mktemp;
6113     linuxHeaders = glibc.kernelHeaders;
6114   };
6116   klibcShrunk = makeOverridable (import ../os-specific/linux/klibc/shrunk.nix) {
6117     inherit stdenv klibc;
6118   };
6120   kvm = kvm76;
6122   kvm76 = import ../os-specific/linux/kvm/76.nix {
6123     inherit fetchurl stdenv zlib e2fsprogs SDL alsaLib pkgconfig rsync;
6124     linuxHeaders = glibc.kernelHeaders;
6125   };
6127   kvm86 = import ../os-specific/linux/kvm/86.nix {
6128     inherit fetchurl stdenv zlib SDL alsaLib pkgconfig pciutils;
6129     linuxHeaders = glibc.kernelHeaders;
6130   };
6132   kvm88 = import ../os-specific/linux/kvm/88.nix {
6133     inherit fetchurl stdenv zlib SDL alsaLib pkgconfig pciutils;
6134     linuxHeaders = glibc.kernelHeaders;
6135   };
6137   libcap = import ../os-specific/linux/libcap {
6138     inherit fetchurl stdenv attr;
6139   };
6141   libnscd = import ../os-specific/linux/libnscd {
6142     inherit fetchurl stdenv;
6143   };
6145   libnotify = import ../development/libraries/libnotify {
6146     inherit stdenv fetchurl pkgconfig dbus dbus_glib;
6147     inherit (gtkLibs) gtk glib;
6148   };
6150   libvolume_id = import ../os-specific/linux/libvolume_id {
6151     inherit fetchurl stdenv;
6152   };
6154   lvm2 = import ../os-specific/linux/lvm2 {
6155     inherit fetchurl stdenv;
6156   };
6158   mdadm = import ../os-specific/linux/mdadm {
6159     inherit fetchurl stdenv groff;
6160   };
6162   mingetty = import ../os-specific/linux/mingetty {
6163     inherit fetchurl stdenv;
6164   };
6166   module_init_tools = import ../os-specific/linux/module-init-tools {
6167     inherit fetchurl stdenv;
6168   };
6170   mount_cifs = import ../os-specific/linux/mount-cifs {
6171     inherit fetchurl stdenv;
6172   };
6174   aggregateModules = modules:
6175     import ../os-specific/linux/module-init-tools/aggregator.nix {
6176       inherit stdenv module_init_tools modules buildEnv;
6177     };
6179   modutils = import ../os-specific/linux/modutils {
6180     inherit fetchurl bison flex;
6181     stdenv = overrideGCC stdenv gcc34;
6182   };
6184   nettools = import ../os-specific/linux/net-tools {
6185     inherit fetchurl stdenv;
6186   };
6188   neverball = import ../games/neverball {
6189     inherit stdenv fetchurl SDL mesa libpng libjpeg SDL_ttf libvorbis
6190       gettext physfs;
6191   };
6193   numactl = import ../os-specific/linux/numactl {
6194     inherit fetchurl stdenv;
6195   };
6197   gw6c = builderDefsPackage (import ../os-specific/linux/gw6c) {
6198     inherit fetchurl stdenv nettools openssl procps iproute;
6199   };
6201   nss_ldap = import ../os-specific/linux/nss_ldap {
6202     inherit fetchurl stdenv openldap;
6203   };
6205   pam = import ../os-specific/linux/pam {
6206     inherit stdenv fetchurl cracklib flex;
6207   };
6209   # pam_bioapi ( see http://www.thinkwiki.org/wiki/How_to_enable_the_fingerprint_reader )
6211   pam_console = import ../os-specific/linux/pam_console {
6212     inherit stdenv fetchurl pam autoconf automake pkgconfig bison glib;
6213     libtool = libtool_1_5;
6214     flex = if stdenv.system == "i686-linux" then flex else flex2533;
6215   };
6217   pam_devperm = import ../os-specific/linux/pam_devperm {
6218     inherit stdenv fetchurl pam;
6219   };
6221   pam_ldap = import ../os-specific/linux/pam_ldap {
6222     inherit stdenv fetchurl pam openldap;
6223   };
6225   pam_login = import ../os-specific/linux/pam_login {
6226     inherit stdenv fetchurl pam;
6227   };
6229   pam_unix2 = import ../os-specific/linux/pam_unix2 {
6230     inherit stdenv fetchurl pam libxcrypt;
6231   };
6233   pam_usb = import ../os-specific/linux/pam_usb {
6234     inherit stdenv fetchurl makeWrapper useSetUID dbus libxml2 pam hal pkgconfig pmount python pythonDBus;
6235   };
6237   pcmciaUtils = composedArgsAndFun (import ../os-specific/linux/pcmciautils) {
6238     inherit stdenv fetchurl udev yacc flex;
6239     inherit sysfsutils module_init_tools;
6241     firmware = getConfig ["pcmciaUtils" "firmware"] [];
6242     config = getConfig ["pcmciaUtils" "config"] null;
6243     inherit lib;
6244   };
6246   pmount = import ../os-specific/linux/pmount {
6247     inherit fetchurl stdenv cryptsetup dbus dbus_glib hal intltool ntfs3g utillinuxng;
6248   };
6250   pmutils = import ../os-specific/linux/pm-utils {
6251     inherit fetchurl stdenv;
6252   };
6254   powertop = import ../os-specific/linux/powertop {
6255     inherit fetchurl stdenv ncurses gettext;
6256   };
6258   procps = import ../os-specific/linux/procps {
6259     inherit fetchurl stdenv ncurses;
6260   };
6262   pwdutils = import ../os-specific/linux/pwdutils {
6263     inherit fetchurl stdenv pam openssl libnscd;
6264   };
6266   qemu_kvm = import ../os-specific/linux/qemu-kvm {
6267     inherit fetchurl stdenv zlib SDL alsaLib pkgconfig pciutils libuuid;
6268   };
6270   radeontools = import ../os-specific/linux/radeontools {
6271     inherit pciutils;
6272     inherit fetchurl stdenv;
6273   };
6275   rt73fw = import ../os-specific/linux/firmware/rt73 {
6276     inherit fetchurl stdenv unzip;
6277   };
6279   sdparm = import ../os-specific/linux/sdparm {
6280     inherit fetchurl stdenv;
6281   };
6283   shadowutils = import ../os-specific/linux/shadow {
6284     inherit fetchurl stdenv;
6285   };
6287   splashutils = import ../os-specific/linux/splashutils/default.nix {
6288     inherit fetchurl stdenv klibc;
6289     zlib = zlibStatic;
6290     libjpeg = libjpegStatic;
6291   };
6293   statifier = builderDefsPackage (import ../os-specific/linux/statifier) {
6294   };
6296   sysfsutils = import ../os-specific/linux/sysfsutils {
6297     inherit fetchurl stdenv;
6298   };
6300   # Provided with sysfsutils.
6301   libsysfs = sysfsutils;
6302   systool = sysfsutils;
6304   sysklogd = import ../os-specific/linux/sysklogd {
6305     inherit fetchurl stdenv;
6306   };
6308   syslinux = import ../os-specific/linux/syslinux {
6309     inherit fetchurl stdenv nasm perl;
6310   };
6312   sysstat = import ../os-specific/linux/sysstat {
6313     inherit fetchurl stdenv gettext;
6314   };
6316   sysvinit = import ../os-specific/linux/sysvinit {
6317     inherit fetchurl stdenv;
6318   };
6320   sysvtools = import ../os-specific/linux/sysvinit {
6321     inherit fetchurl stdenv;
6322     withoutInitTools = true;
6323   };
6325   # FIXME: `tcp-wrapper' is actually not OS-specific.
6326   tcpWrapper = import ../os-specific/linux/tcp-wrapper {
6327     inherit fetchurl stdenv;
6328   };
6330   trackballs = import ../games/trackballs {
6331     inherit stdenv fetchurl SDL mesa SDL_ttf gettext zlib SDL_mixer SDL_image guile;
6332     debug = false;
6333   };
6335   tunctl = import ../os-specific/linux/tunctl {
6336     inherit stdenv fetchurl;
6337   };
6339   /*tuxracer = builderDefsPackage (import ../games/tuxracer) {
6340     inherit mesa tcl freeglut;
6341     inherit (xlibs) libX11 xproto;
6342   };*/
6344   uboot = makeOverridable (import ../misc/uboot) {
6345     inherit fetchurl stdenv unzip;
6346   };
6349   uclibc = import ../os-specific/linux/uclibc {
6350     inherit fetchurl stdenv linuxHeaders;
6351   };
6354   uclibcCross = target: import ../os-specific/linux/uclibc {
6355     inherit fetchurl stdenv;
6356     linuxHeaders = linuxHeadersCross target;
6357     gccCross = gccCrossStageStatic target;
6358   };
6360   udev = makeOverridable (import ../os-specific/linux/udev) {
6361     inherit fetchurl stdenv gperf pkgconfig acl libusb usbutils pciutils glib;
6362   };
6364   uml = import ../os-specific/linux/kernel/linux-2.6.29.nix {
6365     inherit fetchurl stdenv perl mktemp module_init_tools;
6366     userModeLinux = true;
6367   };
6369   umlutilities = import ../os-specific/linux/uml-utilities {
6370     inherit fetchurl linuxHeaders stdenv readline lib;
6371     tunctl = true; mconsole = true;
6372   };
6374   upstart = import ../os-specific/linux/upstart {
6375     inherit fetchurl stdenv;
6376   };
6378   upstart06 = import ../os-specific/linux/upstart/0.6.nix {
6379     inherit fetchurl stdenv pkgconfig dbus expat;
6380   };
6382   upstartJobControl = import ../os-specific/linux/upstart/jobcontrol.nix {
6383     inherit stdenv;
6384   };
6386   usbutils = import ../os-specific/linux/usbutils {
6387     inherit fetchurl stdenv pkgconfig libusb;
6388   };
6390   utillinux = utillinuxng;
6392   utillinuxCurses = utillinuxngCurses;
6394   utillinuxng = makeOverridable (import ../os-specific/linux/util-linux-ng) {
6395     inherit fetchurl stdenv;
6396   };
6398   utillinuxngCurses = utillinuxng.override {
6399     inherit ncurses;
6400   };
6402   wesnoth = import ../games/wesnoth {
6403     inherit fetchurl stdenv SDL SDL_image SDL_mixer SDL_net SDL_ttf
6404       gettext zlib boost freetype libpng pkgconfig;
6405     inherit (gtkLibs) pango;
6406   };
6408   wirelesstools = import ../os-specific/linux/wireless-tools {
6409     inherit fetchurl stdenv;
6410   };
6412   wpa_supplicant = import ../os-specific/linux/wpa_supplicant {
6413     inherit fetchurl stdenv openssl;
6414   };
6416   wpa_supplicant_gui_qt4 = import ../os-specific/linux/wpa_supplicant/gui-qt4.nix {
6417     inherit fetchurl stdenv qt4 imagemagick inkscape;
6418   };
6420   xmoto = builderDefsPackage (import ../games/xmoto) {
6421     inherit chipmunk sqlite curl zlib bzip2 libjpeg libpng
6422       freeglut mesa SDL SDL_mixer SDL_image SDL_net SDL_ttf
6423       lua5 ode;
6424   };
6426   xorg_sys_opengl = import ../os-specific/linux/opengl/xorg-sys {
6427     inherit stdenv xlibs expat libdrm;
6428   };
6430   zd1211fw = import ../os-specific/linux/firmware/zd1211 {
6431     inherit stdenv fetchurl;
6432   };
6434   ### DATA
6436   arkpandora_ttf = builderDefsPackage (import ../data/fonts/arkpandora) {
6437   };
6439   bakoma_ttf = import ../data/fonts/bakoma-ttf {
6440     inherit fetchurl stdenv;
6441   };
6443   cacert = import ../data/misc/cacert {
6444     inherit fetchurl stdenv;
6445   };
6447   corefonts = import ../data/fonts/corefonts {
6448     inherit fetchurl stdenv cabextract;
6449   };
6451   wrapFonts = paths : ((import ../data/fonts/fontWrap) {
6452     inherit fetchurl stdenv builderDefs paths ttmkfdir;
6453     inherit (xorg) mkfontdir mkfontscale;
6454   });
6456   clearlyU = composedArgsAndFun (import ../data/fonts/clearlyU/1.9.nix) {
6457     inherit builderDefs;
6458     inherit (xorg) mkfontdir mkfontscale;
6459   };
6461   dejavu_fonts = import ../data/fonts/dejavu-fonts {
6462     inherit fetchurl stdenv fontforge perl fontconfig;
6463     inherit (perlPackages) FontTTF;
6464   };
6466   docbook5 = import ../data/sgml+xml/schemas/docbook-5.0 {
6467     inherit fetchurl stdenv unzip;
6468   };
6470   docbook_xml_dtd_412 = import ../data/sgml+xml/schemas/xml-dtd/docbook/4.1.2.nix {
6471     inherit fetchurl stdenv unzip;
6472   };
6474   docbook_xml_dtd_42 = import ../data/sgml+xml/schemas/xml-dtd/docbook/4.2.nix {
6475     inherit fetchurl stdenv unzip;
6476   };
6478   docbook_xml_dtd_43 = import ../data/sgml+xml/schemas/xml-dtd/docbook/4.3.nix {
6479     inherit fetchurl stdenv unzip;
6480   };
6482   docbook_xml_dtd_45 = import ../data/sgml+xml/schemas/xml-dtd/docbook/4.5.nix {
6483     inherit fetchurl stdenv unzip;
6484   };
6486   docbook_xml_ebnf_dtd = import ../data/sgml+xml/schemas/xml-dtd/docbook-ebnf {
6487     inherit fetchurl stdenv unzip;
6488   };
6490   docbook_xml_xslt = docbook_xsl;
6492   docbook_xsl = import ../data/sgml+xml/stylesheets/xslt/docbook-xsl {
6493     inherit fetchurl stdenv;
6494   };
6496   docbook5_xsl = docbook_xsl_ns;
6498   docbook_xsl_ns = import ../data/sgml+xml/stylesheets/xslt/docbook-xsl-ns {
6499     inherit fetchurl stdenv;
6500   };
6502   junicode = composedArgsAndFun (import ../data/fonts/junicode/0.6.15.nix) {
6503     inherit builderDefs fontforge unzip;
6504     inherit (xorg) mkfontdir mkfontscale;
6505   };
6507   freefont_ttf = import ../data/fonts/freefont-ttf {
6508     inherit fetchurl stdenv;
6509   };
6511   liberation_ttf = import ../data/fonts/redhat-liberation-fonts {
6512     inherit fetchurl stdenv;
6513   };
6515   libertine = builderDefsPackage (import ../data/fonts/libertine/2.7.nix) {
6516     inherit fontforge;
6517   };
6518   libertineBin = builderDefsPackage (import ../data/fonts/libertine/2.7.bin.nix) {
6519   };
6521   lmodern = import ../data/fonts/lmodern {
6522     inherit fetchurl stdenv;
6523   };
6525   manpages = import ../data/documentation/man-pages {
6526     inherit fetchurl stdenv;
6527   };
6529   miscfiles = import ../data/misc/miscfiles {
6530     inherit fetchurl stdenv;
6531   };
6533   mph_2b_damase = import ../data/fonts/mph-2b-damase {
6534     inherit fetchurl stdenv unzip;
6535   };
6537   pthreadmanpages = lowPrio (import ../data/documentation/pthread-man-pages {
6538     inherit fetchurl stdenv perl;
6539   });
6541   shared_mime_info = import ../data/misc/shared-mime-info {
6542     inherit fetchurl stdenv pkgconfig gettext
6543       intltool perl perlXMLParser libxml2 glib;
6544   };
6545   
6546   shared_desktop_ontologies = import ../data/misc/shared-desktop-ontologies {
6547     inherit stdenv fetchurl cmake;
6548   };
6550   stdmanpages = import ../data/documentation/std-man-pages {
6551     inherit fetchurl stdenv;
6552   };
6554   iana_etc = import ../data/misc/iana-etc {
6555     inherit fetchurl stdenv;
6556   };
6558   popplerData = import ../data/misc/poppler-data {
6559     inherit fetchurl stdenv;
6560   };
6562   r3rs = import ../data/documentation/rnrs/r3rs.nix {
6563     inherit fetchurl stdenv texinfo;
6564   };
6566   r4rs = import ../data/documentation/rnrs/r4rs.nix {
6567     inherit fetchurl stdenv texinfo;
6568   };
6570   r5rs = import ../data/documentation/rnrs/r5rs.nix {
6571     inherit fetchurl stdenv texinfo;
6572   };
6574   themes = name: import (../data/misc/themes + ("/" + name + ".nix")) {
6575     inherit fetchurl;
6576   };
6578   terminus_font = import ../data/fonts/terminus-font {
6579     inherit fetchurl stdenv perl;
6580     inherit (xorg) mkfontdir mkfontscale bdftopcf;
6581   };
6583   ttf_bitstream_vera = import ../data/fonts/ttf-bitstream-vera {
6584     inherit fetchurl stdenv;
6585   };
6587   ucsFonts = import ../data/fonts/ucs-fonts {
6588     inherit fetchurl stdenv wrapFonts;
6589   };
6591   unifont = import ../data/fonts/unifont {
6592     inherit debPackage perl;
6593     inherit (xorg) mkfontdir mkfontscale bdftopcf fontutil;
6594   };
6596   vistafonts = import ../data/fonts/vista-fonts {
6597     inherit fetchurl stdenv cabextract;
6598   };
6600   wqy_zenhei = composedArgsAndFun (import ../data/fonts/wqy_zenhei/0.4.23-1.nix) {
6601     inherit builderDefs;
6602   };
6604   xhtml1 = import ../data/sgml+xml/schemas/xml-dtd/xhtml1 {
6605     inherit fetchurl stdenv libxml2;
6606   };
6608   xkeyboard_config = import ../data/misc/xkeyboard-config {
6609     inherit fetchurl stdenv perl perlXMLParser gettext intltool;
6610     inherit (xlibs) xkbcomp;
6611   };
6614   ### APPLICATIONS
6617   aangifte2005 = import ../applications/taxes/aangifte-2005 {
6618     inherit stdenv fetchurl;
6619     inherit (xlibs) libX11 libXext;
6620   };
6622   aangifte2006 = import ../applications/taxes/aangifte-2006 {
6623     inherit stdenv fetchurl;
6624     inherit (xlibs) libX11 libXext;
6625   };
6627   aangifte2007 = import ../applications/taxes/aangifte-2007 {
6628     inherit stdenv fetchurl;
6629     inherit (xlibs) libX11 libXext libSM;
6630   };
6632   aangifte2008 = import ../applications/taxes/aangifte-2008 {
6633     inherit stdenv fetchurl;
6634     inherit (xlibs) libX11 libXext libSM;
6635   };
6637   abcde = import ../applications/audio/abcde {
6638     inherit fetchurl stdenv libcdio cddiscid wget bash vorbisTools
6639             makeWrapper;
6640   };
6642   abiword = import ../applications/office/abiword {
6643     inherit fetchurl stdenv pkgconfig fribidi libpng popt libgsf enchant wv librsvg bzip2;
6644     inherit (gtkLibs) gtk;
6645     inherit (gnome) libglade libgnomecanvas;
6646   };
6648   adobeReader = import ../applications/misc/adobe-reader {
6649     inherit fetchurl stdenv zlib libxml2 cups;
6650     inherit (xlibs) libX11;
6651     inherit (gtkLibs) glib pango atk gtk;
6652   };
6654   amsn = import ../applications/networking/instant-messengers/amsn {
6655     inherit fetchurl stdenv which tcl tk x11;
6656     libstdcpp = gcc33.gcc;
6657   };
6659   ardour = import ../applications/audio/ardour {
6660     inherit fetchurl stdenv lib pkgconfig scons boost redland librdf_raptor
6661       librdf_rasqal jackaudio flac libsamplerate alsaLib libxml2 libxslt
6662       libsndfile libsigcxx libusb cairomm librdf liblo fftw fftwSinglePrec
6663       aubio libmad;
6664     inherit (gtkLibs) glib pango gtk glibmm gtkmm;
6665     inherit (gnome) libgnomecanvas;
6666   };
6668   audacious = import ../applications/audio/audacious/player.nix {
6669     inherit fetchurl stdenv pkgconfig libmowgli libmcs gettext xlibs dbus_glib;
6670     inherit (gnome) libglade;
6671     inherit (gtkLibs) glib gtk;
6672   };
6674   audacious_plugins = import ../applications/audio/audacious/plugins.nix {
6675     inherit fetchurl stdenv pkgconfig audacious dbus_glib gettext
6676       libmad xlibs alsaLib taglib libmpcdec libogg libvorbis
6677       libcdio libcddb libxml2;
6678   };
6680   audacity = import ../applications/audio/audacity {
6681     inherit fetchurl stdenv gettext pkgconfig zlib perl intltool libogg
6682       libvorbis libmad;
6683     inherit (gtkLibs) gtk glib;
6684     inherit wxGTK;
6685   };
6687   aumix = import ../applications/audio/aumix {
6688     inherit fetchurl stdenv ncurses pkgconfig gettext;
6689     inherit (gtkLibs) gtk;
6690     gtkGUI = false;
6691   };
6693   autopanosiftc = import ../applications/graphics/autopanosiftc {
6694     inherit fetchurl stdenv cmake libpng libtiff libjpeg panotools libxml2;
6695   };
6697   avidemux = import ../applications/video/avidemux {
6698     inherit fetchurl stdenv cmake pkgconfig libxml2 qt4 gettext SDL libxslt x264
6699       alsaLib lame faac faad2 libvorbis;
6700     inherit (gtkLibs) gtk;
6701     inherit (xlibs) libXv pixman libpthreadstubs libXau libXdmcp;
6702   };
6704   batik = import ../applications/graphics/batik {
6705     inherit fetchurl stdenv unzip;
6706   };
6708   bazaar = import ../applications/version-management/bazaar {
6709     inherit fetchurl stdenv makeWrapper;
6710     python = pythonFull;
6711   };
6713   bazaarTools = builderDefsPackage (import ../applications/version-management/bazaar/tools.nix) {
6714     inherit bazaar;
6715   };
6717   beast = import ../applications/audio/beast {
6718 # stdenv = overrideGCC stdenv gcc34;
6719     inherit stdenv fetchurl zlib guile pkgconfig intltool libogg libvorbis python libxml2 bash perl gettext;
6720     inherit (gtkLibs) gtk glib;
6721     inherit (gnome) libgnomecanvas libart_lgpl;
6722     inherit automake autoconf;
6723   };
6725   bitlbee = import ../applications/networking/instant-messengers/bitlbee {
6726     inherit fetchurl stdenv gnutls pkgconfig glib;
6727   };
6729   bitlbeeOtr = import ../applications/networking/instant-messengers/bitlbee-otr {
6730     inherit fetchbzr stdenv gnutls pkgconfig libotr libgcrypt
6731       libxslt xmlto docbook_xsl docbook_xml_dtd_42 perl glib;
6732   };
6734   # commented out because it's using the new configuration style proposal which is unstable
6735   #biew = import ../applications/misc/biew {
6736   #  inherit lib stdenv fetchurl ncurses;
6737   #};
6739   # only to be able to compile blender - I couldn't compile the default openal software
6740   # Perhaps this can be removed - don't know which one openal{,soft} is better
6741   freealut_soft = import ../development/libraries/freealut {
6742     inherit fetchurl stdenv;
6743     openal = openalSoft;
6744   };
6746   blender = import ../applications/misc/blender {
6747     inherit cmake mesa gettext freetype SDL libtiff fetchurl glibc scons x11 lib
6748       libjpeg libpng zlib /* smpeg sdl */ python;
6749     inherit (xlibs) inputproto libXi;
6750     freealut = freealut_soft;
6751     openal = openalSoft;
6752     openexr = openexr_1_4_0;
6753     # using gcc43 makes blender segfault when pressing p then esc.
6754     # is this related to the PHP bug? I'm to lazy to try recompilng it without optimizations
6755     stdenv = overrideGCC stdenv gcc42;
6756   };
6758   bmp = import ../applications/audio/bmp {
6759     inherit fetchurl stdenv pkgconfig libogg libvorbis alsaLib id3lib;
6760     inherit (gnome) esound libglade;
6761     inherit (gtkLibs) glib gtk;
6762   };
6764   bmp_plugin_musepack = import ../applications/audio/bmp-plugins/musepack {
6765     inherit fetchurl stdenv pkgconfig bmp libmpcdec taglib;
6766   };
6768   bmp_plugin_wma = import ../applications/audio/bmp-plugins/wma {
6769     inherit fetchurl stdenv pkgconfig bmp;
6770   };
6772   bvi = import ../applications/editors/bvi {
6773     inherit fetchurl stdenv ncurses;
6774   };
6776   calibre = import ../applications/misc/calibre {
6777     inherit stdenv fetchurl libpng imagemagick pkgconfig libjpeg fontconfig podofo
6778       qt4 makeWrapper unrar;
6779     python = python26Full;
6780     pyqt4 = pyqt4_python26;
6781     sip = sip_python26;
6782     pil = pil_python26;
6783     popplerQt4 = popplerQt45;
6784     inherit (python26Packages) mechanize lxml dateutil;
6785   };
6787   carrier = builderDefsPackage (import ../applications/networking/instant-messengers/carrier/2.5.0.nix) {
6788     inherit fetchurl stdenv pkgconfig perl perlXMLParser libxml2 openssl nss
6789       gtkspell aspell gettext ncurses avahi dbus dbus_glib python
6790       libtool automake autoconf;
6791     GStreamer = gst_all.gstreamer;
6792     inherit (gtkLibs) gtk glib;
6793     inherit (gnome) startupnotification GConf ;
6794     inherit (xlibs) libXScrnSaver scrnsaverproto libX11 xproto kbproto;
6795   };
6796   funpidgin = carrier;
6798   cddiscid = import ../applications/audio/cd-discid {
6799     inherit fetchurl stdenv;
6800   };
6802   cdparanoia = cdparanoiaIII;
6804   cdparanoiaIII = import ../applications/audio/cdparanoia {
6805     inherit fetchurl stdenv;
6806   };
6808   cdrtools = import ../applications/misc/cdrtools {
6809     inherit fetchurl stdenv;
6810   };
6812   chatzilla =
6813     xulrunnerWrapper {
6814       launcher = "chatzilla";
6815       application = import ../applications/networking/irc/chatzilla {
6816         inherit fetchurl stdenv unzip;
6817       };
6818     };
6820   chrome = import ../applications/networking/browsers/chromium {
6821     inherit stdenv fetchurl ffmpeg cairo nspr nss fontconfig freetype alsaLib makeWrapper unzip expat zlib bzip2 libpng;
6822     inherit (xlibs) libX11 libXext libXrender libXt ;
6823     inherit (gtkLibs) gtk glib pango atk;
6824     inherit (gnome) GConf;
6825     libjpeg = libjpeg62;
6826   };
6828   chromeWrapper = wrapFirefox chrome "chrome" "";
6831   cinelerra = import ../applications/video/cinelerra {
6832     inherit lib fetchurl sourceFromHead stdenv
6833       automake autoconf libtool
6834       a52dec alsaLib   lame libavc1394 libiec61883 libraw1394 libsndfile
6835       libvorbis libogg libjpeg libtiff freetype mjpegtools x264
6836       gettext faad2 faac libtheora libpng libdv perl nasm e2fsprogs
6837       pkgconfig;
6838       openexr = openexr_1_6_1;
6839     fftw = fftwSinglePrec;
6840     inherit (xorg) libXxf86vm libXv libXi libX11 xextproto;
6841     inherit (gnome) esound;
6842   };
6844   compizBase = (builderDefsPackage (import ../applications/window-managers/compiz/0.8.0.nix)) {
6845     inherit lib stringsWithDeps builderDefs;
6846     inherit fetchurl stdenv pkgconfig libpng mesa perl perlXMLParser libxslt gettext
6847       intltool binutils;
6848     inherit (xorg) libXcomposite libXfixes libXdamage libXrandr
6849       libXinerama libICE libSM libXrender xextproto compositeproto fixesproto
6850       damageproto randrproto xineramaproto renderproto kbproto xproto libX11
6851       libxcb;
6852     inherit (gnome) startupnotification libwnck GConf;
6853     inherit (gtkLibs) gtk;
6854     inherit (gnome) libgnome libgnomeui metacity
6855       glib pango libglade libgtkhtml gtkhtml
6856       libgnomecanvas libgnomeprint
6857       libgnomeprintui gnomepanel;
6858     gnomegtk = gnome.gtk;
6859     inherit librsvg fuse;
6860     inherit dbus dbus_glib;
6861   };
6863   compiz = compizBase.passthru.function (x : x // {
6864     extraConfigureFlags = getConfig ["compiz" "extraConfigureFlags"] [];
6865   });
6867   compizFusion = import ../applications/window-managers/compiz-fusion {
6868     version = getConfig ["compizFusion" "version"] "0.7.8";
6869     inherit compiz;
6870     inherit stringsWithDeps lib builderDefs;
6871     inherit fetchurl stdenv pkgconfig libpng mesa perl perlXMLParser libxslt libxml2;
6872     inherit (xorg) libXcomposite libXfixes libXdamage libXrandr
6873       libXinerama libICE libSM libXrender xextproto;
6874     inherit (gnome) startupnotification libwnck GConf;
6875     inherit (gtkLibs) gtk;
6876     inherit (gnome) libgnome libgnomeui metacity
6877       glib pango libglade libgtkhtml gtkhtml
6878       libgnomecanvas libgnomeprint
6879       libgnomeprintui gnomepanel gnomedesktop;
6880     gnomegtk = gnome.gtk;
6881     inherit librsvg fuse dbus dbus_glib git;
6882     inherit automake autoconf libtool intltool python pyrex gettext;
6883     inherit pygtk pycairo getopt libjpeg glxinfo;
6884     inherit (xorg) xvinfo xdpyinfo;
6885   };
6887   compizExtra = import ../applications/window-managers/compiz/extra.nix {
6888     inherit fetchurl stdenv pkgconfig compiz perl perlXMLParser dbus;
6889     inherit (gnome) GConf;
6890     inherit (gtkLibs) gtk;
6891   };
6893   cinepaint = import ../applications/graphics/cinepaint {
6894     inherit stdenv fetchcvs cmake pkgconfig freetype fontconfig lcms flex libtiff
6895       libjpeg libpng libexif zlib perl mesa perlXMLParser python pygtk gettext
6896       intltool babl gegl automake autoconf libtool;
6897     inherit (xlibs) makedepend libX11 xf86vidmodeproto xineramaproto libXmu
6898       libXext libXpm libXxf86vm;
6899     inherit (gtkLibs) gtk glib;
6900     openexr = openexr_1_6_1;
6901     fltk = fltk11;
6902   };
6904   codeville = builderDefsPackage (import ../applications/version-management/codeville/0.8.0.nix) {
6905     inherit makeWrapper;
6906     python = pythonFull;
6907   };
6909   comical = import ../applications/graphics/comical {
6910     inherit stdenv fetchurl utillinux zlib;
6911     wxGTK = wxGTK26;
6912   };
6914   cuneiform = builderDefsPackage (import ../tools/graphics/cuneiform) {
6915     inherit cmake patchelf;
6916     imagemagick=imagemagick;
6917   };
6919   cvs = import ../applications/version-management/cvs {
6920     inherit fetchurl stdenv nano;
6921   };
6923   cvsps = import ../applications/version-management/cvsps {
6924     inherit fetchurl stdenv cvs zlib;
6925   };
6927   cvs2svn = import ../applications/version-management/cvs2svn {
6928     inherit fetchurl stdenv python makeWrapper;
6929   };
6931   d4x = import ../applications/misc/d4x {
6932     inherit fetchurl stdenv pkgconfig openssl boost;
6933     inherit (gtkLibs) gtk glib;
6934   };
6936   darcs = haskellPackages_ghc6104.darcs;
6938   dia = import ../applications/graphics/dia {
6939     inherit stdenv fetchurl pkgconfig perl perlXMLParser
6940       libxml2 gettext python libxml2Python docbook5 docbook_xsl
6941       libxslt intltool;
6942     inherit (gtkLibs) gtk glib;
6943   };
6945   digikam = import ../applications/graphics/digikam {
6946     inherit stdenv fetchurl exiv2 zlib libjpeg perl libpng expat qt3 cmake;
6947     inherit (kde3) kdelibs;
6948     inherit (xlibs) libXt libXext;
6949   };
6951   djvulibre = import ../applications/misc/djvulibre {
6952     inherit stdenv fetchurl libjpeg libtiff libungif zlib
6953       ghostscript libpng x11 mesa;
6954     qt = if (getConfig ["djvulibre" "qt3Frontend"] true) then qt3 else null;
6955     inherit (xlibs) libX11;
6956   };
6958   djview4 = import ../applications/graphics/djview {
6959     inherit fetchurl stdenv qt4 djvulibre;
6960   };
6962   dmenu = import ../applications/misc/dmenu {
6963     inherit lib fetchurl stdenv;
6964     inherit (xlibs) libX11 libXinerama;
6965   };
6967   dmtx = builderDefsPackage (import ../tools/graphics/dmtx) {
6968     inherit libpng libtiff libjpeg imagemagick librsvg
6969       pkgconfig bzip2 zlib libtool;
6970     inherit (xlibs) libX11;
6971   };
6973   dvdauthor = import ../applications/video/dvdauthor {
6974     inherit fetchurl stdenv freetype libpng fribidi libxml2 libdvdread imagemagick;
6975   };
6977   dwm = import ../applications/window-managers/dwm {
6978     inherit fetchurl stdenv;
6979     inherit (xlibs) libX11 libXinerama;
6980   };
6982   eaglemode = import ../applications/misc/eaglemode {
6983     inherit fetchurl stdenv perl xineLib libjpeg libpng libtiff;
6984     inherit (xlibs) libX11;
6985   };
6987   eclipse = import ../applications/editors/eclipse {
6988     inherit stdenv fetchurl patchelf makeDesktopItem makeWrapper freetype fontconfig jre zlib;
6989     # GTK 2.18 gives glitches such as mouse clicks on buttons not
6990     # working correctly.
6991     inherit (gtkLibs216) glib gtk;
6992     inherit (xlibs) libX11 libXext libXrender libXtst;
6993   };
6995   ed = import ../applications/editors/ed {
6996     inherit fetchurl stdenv;
6997   };
6999   elinks = import ../applications/networking/browsers/elinks {
7000     inherit stdenv fetchurl python perl ncurses x11 zlib openssl spidermonkey
7001       guile bzip2;
7002   };
7004   elvis = import ../applications/editors/elvis {
7005     inherit fetchurl stdenv ncurses;
7006   };
7008   emacs = emacs23;
7010   emacs22 = import ../applications/editors/emacs-22 {
7011     inherit fetchurl stdenv ncurses pkgconfig x11 Xaw3d;
7012     inherit (xlibs) libXaw libXpm;
7013     inherit (gtkLibs) gtk;
7014     xaw3dSupport = getPkgConfig "emacs" "xaw3dSupport" false;
7015     gtkGUI = getPkgConfig "emacs" "gtkSupport" true;
7016   };
7018   emacs23 = import ../applications/editors/emacs-23 {
7019     inherit fetchurl stdenv ncurses pkgconfig x11 Xaw3d
7020       libpng libjpeg libungif libtiff texinfo dbus;
7021     inherit (xlibs) libXaw libXpm libXft;
7022     inherit (gtkLibs) gtk;
7023     xawSupport = stdenv.isDarwin || getPkgConfig "emacs" "xawSupport" false;
7024     xaw3dSupport = getPkgConfig "emacs" "xaw3dSupport" false;
7025     gtkGUI = getPkgConfig "emacs" "gtkSupport" true;
7026     xftSupport = getPkgConfig "emacs" "xftSupport" true;
7027     dbusSupport = getPkgConfig "emacs" "dbusSupport" true;
7028   };
7030   emacsSnapshot = lowPrio (import ../applications/editors/emacs-snapshot {
7031     inherit fetchcvs stdenv ncurses pkgconfig x11 Xaw3d
7032       libpng libjpeg libungif libtiff texinfo dbus
7033       autoconf automake;
7034     inherit (xlibs) libXaw libXpm libXft;
7035     inherit (gtkLibs) gtk;
7036     xawSupport = getPkgConfig "emacs" "xawSupport" false;
7037     xaw3dSupport = getPkgConfig "emacs" "xaw3dSupport" false;
7038     gtkGUI = getPkgConfig "emacs" "gtkSupport" true;
7039     xftSupport = getPkgConfig "emacs" "xftSupport" true;
7040     dbusSupport = getPkgConfig "emacs" "dbusSupport" true;
7041   });
7043   emacsPackages = emacs: recurseIntoAttrs (rec {
7044     bbdb = import ../applications/editors/emacs-modes/bbdb {
7045       inherit fetchurl stdenv emacs texinfo ctags;
7046     };
7048     cedet = import ../applications/editors/emacs-modes/cedet {
7049       inherit fetchurl stdenv emacs;
7050     };
7052     cua = import ../applications/editors/emacs-modes/cua {
7053       inherit fetchurl stdenv;
7054     };
7056     ecb = import ../applications/editors/emacs-modes/ecb {
7057       inherit fetchurl stdenv emacs cedet jdee texinfo;
7058     };
7060     emacsSessionManagement = import ../applications/editors/emacs-modes/session-management-for-emacs {
7061       inherit fetchurl stdenv emacs;
7062     };
7064     emacsw3m = import ../applications/editors/emacs-modes/emacs-w3m {
7065       inherit fetchcvs stdenv emacs w3m imagemagick texinfo autoconf;
7066     };
7068     emms = import ../applications/editors/emacs-modes/emms {
7069       inherit fetchurl stdenv emacs texinfo mpg321 vorbisTools taglib
7070         alsaUtils;
7071     };
7073     jdee = import ../applications/editors/emacs-modes/jdee {
7074       # Requires Emacs 23, for `avl-tree'.
7075       inherit fetchsvn stdenv cedet ant emacs;
7076     };
7078     stratego = import ../applications/editors/emacs-modes/stratego {
7079       inherit fetchsvn stdenv;
7080     };
7082     haskellMode = import ../applications/editors/emacs-modes/haskell {
7083       inherit fetchurl stdenv emacs;
7084     };
7086     hol_light_mode = import ../applications/editors/emacs-modes/hol_light {
7087       inherit fetchsvn stdenv;
7088     };
7090     magit = import ../applications/editors/emacs-modes/magit {
7091       inherit fetchurl stdenv emacs texinfo;
7092     };
7094     maudeMode = import ../applications/editors/emacs-modes/maude {
7095       inherit fetchurl stdenv emacs;
7096     };
7098     nxml = import ../applications/editors/emacs-modes/nxml {
7099       inherit fetchurl stdenv;
7100     };
7102     prologMode = import ../applications/editors/emacs-modes/prolog {
7103       inherit fetchurl stdenv;
7104     };
7106     proofgeneral = import ../applications/editors/emacs-modes/proofgeneral {
7107        inherit stdenv fetchurl emacs perl;
7108     };
7110     quack = import ../applications/editors/emacs-modes/quack {
7111       inherit fetchurl stdenv emacs;
7112     };
7114     remember = import ../applications/editors/emacs-modes/remember {
7115       inherit fetchurl stdenv texinfo emacs bbdb;
7116     };
7118     scalaMode = import ../applications/editors/emacs-modes/scala-mode {
7119       inherit fetchsvn stdenv emacs;
7120     };
7121   });
7123   emacs22Packages = emacsPackages emacs22;
7124   emacs23Packages = emacsPackages emacs23;
7126   epdfview = import ../applications/misc/epdfview {
7127     inherit stdenv fetchurl pkgconfig poppler;
7128     inherit (gtkLibs) gtk;
7129   };
7131   evince = makeOverridable (import ../applications/misc/evince) {
7132     inherit fetchurl stdenv perl perlXMLParser gettext intltool
7133       pkgconfig poppler libspectre djvulibre libxslt
7134       dbus dbus_glib shared_mime_info which makeWrapper;
7135     inherit (gnome) gnomedocutils gnomeicontheme libgnome
7136       libgnomeui libglade glib gtk scrollkeeper gnome_keyring;
7137   };
7139   exrdisplay = import ../applications/graphics/exrdisplay {
7140     inherit fetchurl stdenv pkgconfig mesa which openexr_ctl;
7141     fltk = fltk20;
7142     openexr = openexr_1_6_1;
7143   };
7145   fbpanel = composedArgsAndFun (import ../applications/window-managers/fbpanel/4.12.nix) {
7146     inherit fetchurl stdenv builderDefs pkgconfig libpng libjpeg libtiff librsvg;
7147     inherit (gtkLibs) gtk;
7148     inherit (xlibs) libX11 libXmu libXpm;
7149   };
7151   fetchmail = import ../applications/misc/fetchmail {
7152     inherit stdenv fetchurl openssl;
7153   };
7155   grip = import ../applications/misc/grip {
7156     inherit fetchurl stdenv lib grip pkgconfig curl cdparanoia libid3tag;
7157     inherit (gtkLibs) gtk glib;
7158     inherit (gnome) libgnome libgnomeui vte;
7159   };
7161   gwenview = import ../applications/graphics/gwenview {
7162     inherit stdenv fetchurl exiv2 zlib libjpeg perl libpng expat qt3;
7163     inherit (kde3) kdelibs;
7164     inherit (xlibs) libXt libXext;
7165   };
7167   wavesurfer = import ../applications/misc/audio/wavesurfer {
7168     inherit fetchurl stdenv tcl tk snack makeWrapper;
7169   };
7171   wireshark = import ../applications/networking/sniffers/wireshark {
7172     inherit fetchurl stdenv perl pkgconfig libpcap flex bison;
7173     inherit (gtkLibs) gtk;
7174   };
7176   fbida = builderDefsPackage ../applications/graphics/fbida {
7177     inherit libjpeg libexif giflib libtiff libpng
7178       imagemagick ghostscript which curl pkgconfig
7179       freetype fontconfig;
7180   };
7182   fdupes = import ../tools/misc/fdupes {
7183     inherit fetchurl stdenv;
7184   };
7186   feh = import ../applications/graphics/feh {
7187     inherit fetchurl stdenv x11 imlib2 libjpeg libpng giblib;
7188   };
7190   firefox = firefox35;
7192   firefoxWrapper = firefox35Wrapper;
7194   firefox35Pkgs = import ../applications/networking/browsers/firefox/3.5.nix {
7195     inherit fetchurl stdenv pkgconfig perl zip libjpeg libpng zlib cairo
7196       python dbus dbus_glib freetype fontconfig bzip2 xlibs file alsaLib
7197       nspr nss;
7198     inherit (gtkLibs) gtk pango;
7199     inherit (gnome) libIDL;
7200   };
7202   firefox35 = firefox35Pkgs.firefox;
7203   xulrunner35 = firefox35Pkgs.xulrunner;
7204   firefox35Wrapper = wrapFirefox firefox35 "firefox" "";
7206   firefox36Pkgs = import ../applications/networking/browsers/firefox/3.6.nix {
7207     inherit fetchurl stdenv pkgconfig perl zip libjpeg libpng zlib cairo
7208       python dbus dbus_glib freetype fontconfig bzip2 xlibs file alsaLib
7209       nspr nss libnotify;
7210     inherit (gtkLibs) gtk pango;
7211     inherit (gnome) libIDL;
7212   };
7214   firefox36Wrapper = lowPrio (wrapFirefox firefox36Pkgs.firefox "firefox" "");
7216   flac = import ../applications/audio/flac {
7217     inherit fetchurl stdenv libogg;
7218   };
7220   flashplayer = flashplayer10;
7222   flashplayer9 = (
7223     import ../applications/networking/browsers/mozilla-plugins/flashplayer-9 {
7224       inherit fetchurl stdenv zlib alsaLib nss nspr fontconfig freetype expat;
7225       inherit (xlibs) libX11 libXext libXrender libXt;
7226       inherit (gtkLibs) gtk glib pango atk;
7227     });
7229   flashplayer10 = (
7230     import ../applications/networking/browsers/mozilla-plugins/flashplayer-10 {
7231       inherit fetchurl stdenv zlib alsaLib curl nss nspr fontconfig freetype expat;
7232       inherit (xlibs) libX11 libXext libXrender libXt ;
7233       inherit (gtkLibs) gtk glib pango atk;
7234       debug = getConfig ["flashplayer" "debug"] false;
7235     });
7237   flite = import ../applications/misc/flite {
7238     inherit fetchurl stdenv;
7239   };
7241   freemind = import ../applications/misc/freemind {
7242     inherit fetchurl stdenv ant coreutils gnugrep;
7243     jdk = jdk;
7244     jre = jdk;
7245   };
7247   freepv = import ../applications/graphics/freepv {
7248     inherit fetchurl stdenv mesa freeglut libjpeg zlib cmake libxml2 libpng;
7249     inherit (xlibs) libX11 libXxf86vm;
7250   };
7252   xfontsel = import ../applications/misc/xfontsel {
7253     inherit fetchurl stdenv pkgconfig;
7254     inherit (xlibs) libX11 libXaw;
7255   };
7256   xlsfonts = import ../applications/misc/xlsfonts {
7257     inherit fetchurl stdenv pkgconfig;
7258     inherit (xlibs) libX11;
7259   };
7261   fspot = import ../applications/graphics/f-spot {
7262     inherit fetchurl stdenv perl perlXMLParser pkgconfig mono
7263             libexif libjpeg sqlite lcms libgphoto2 monoDLLFixer;
7264     inherit (gnome) libgnome libgnomeui;
7265     gtksharp = gtksharp1;
7266   };
7268   gimp = import ../applications/graphics/gimp {
7269     inherit fetchurl stdenv pkgconfig freetype fontconfig
7270       libtiff libjpeg libpng libexif zlib perl perlXMLParser
7271       python pygtk gettext xlibs intltool babl gegl;
7272     inherit (gnome) gtk libart_lgpl;
7273   };
7275   gimpPlugins = recurseIntoAttrs (import ../applications/graphics/gimp/plugins {
7276     inherit pkgs gimp;
7277   });
7279   gitAndTools = recurseIntoAttrs (import ../applications/version-management/git-and-tools {
7280     inherit pkgs;
7281   });
7282   git = gitAndTools.git;
7283   gitFull = gitAndTools.gitFull;
7285   gnucash = import ../applications/office/gnucash {
7286     inherit fetchurl stdenv pkgconfig libxml2 goffice enchant
7287       gettext intltool perl guile slibGuile swig isocodes bzip2 makeWrapper;
7288     inherit (gnome) gtk glib libglade libgnomeui libgtkhtml gtkhtml
7289       libgnomeprint;
7290     gconf = gnome.GConf;
7291   };
7293   qcad = import ../applications/misc/qcad {
7294     inherit fetchurl stdenv qt3 libpng;
7295     inherit (xlibs) libXext libX11;
7296   };
7298   qjackctl = import ../applications/audio/qjackctl {
7299     inherit fetchurl stdenv alsaLib jackaudio;
7300     qt4 = qt4;
7301   };
7303   gkrellm = import ../applications/misc/gkrellm {
7304     inherit fetchurl stdenv gettext pkgconfig;
7305     inherit (gtkLibs) glib gtk;
7306     inherit (xlibs) libX11 libICE libSM;
7307   };
7309   gnash = import ../applications/video/gnash {
7310     inherit fetchurl stdenv SDL SDL_mixer libogg libxml2 libjpeg mesa libpng
7311             boost freetype agg dbus curl pkgconfig x11 libtool lib libungif
7312             gettext makeWrapper ming dejagnu python;
7313     inherit (gtkLibs) glib gtk;
7314     inherit (gst_all) gstreamer gstPluginsBase gstFfmpeg;
7315   };
7317   gnome_mplayer = import ../applications/video/gnome-mplayer {
7318     inherit fetchurl stdenv pkgconfig dbus dbus_glib;
7319     inherit (gtkLibs) glib gtk;
7320     inherit (gnome) GConf;
7321   };
7323   gnunet = import ../applications/networking/p2p/gnunet {
7324     inherit fetchurl stdenv libextractor libmicrohttpd libgcrypt
7325       gmp curl libtool guile adns sqlite gettext zlib pkgconfig
7326       libxml2 ncurses findutils makeWrapper;
7327     inherit (gnome) gtk libglade;
7328     gtkSupport = getConfig [ "gnunet" "gtkSupport" ] true;
7329   };
7331   gocr = composedArgsAndFun (import ../applications/graphics/gocr/0.44.nix) {
7332     inherit builderDefs fetchurl stdenv;
7333   };
7335   gphoto2 = import ../applications/misc/gphoto2 {
7336     inherit fetchurl stdenv pkgconfig libgphoto2 libexif popt gettext
7337       libjpeg readline libtool;
7338   };
7340   gphoto2fs = builderDefsPackage ../applications/misc/gphoto2/gphotofs.nix {
7341     inherit libgphoto2 fuse pkgconfig glib;
7342   };
7344   gtkpod = import ../applications/audio/gtkpod {
7345     inherit stdenv fetchurl pkgconfig libgpod gettext perl perlXMLParser flex libid3tag libvorbis;
7346     inherit (gtkLibs) gtk glib;
7347     inherit (gnome) libglade;
7348   };
7350   qrdecode = builderDefsPackage (import ../tools/graphics/qrdecode) {
7351     inherit libpng libcv;
7352   };
7354   qrencode = builderDefsPackage (import ../tools/graphics/qrencode) {
7355     inherit libpng pkgconfig;
7356   };
7358   gecko_mediaplayer = import ../applications/networking/browsers/mozilla-plugins/gecko-mediaplayer {
7359     inherit fetchurl stdenv pkgconfig dbus dbus_glib x11 gnome_mplayer MPlayer glib;
7360     inherit (gnome) GConf;
7361     browser = firefox35;
7362   };
7364   geeqie = import ../applications/graphics/geeqie {
7365     inherit fetchurl stdenv pkgconfig libpng lcms exiv2
7366       intltool gettext;
7367     inherit (gtkLibs) gtk;
7368   };
7370   gqview = import ../applications/graphics/gqview {
7371     inherit fetchurl stdenv pkgconfig libpng;
7372     inherit (gtkLibs) gtk;
7373   };
7375   googleearth = import ../applications/misc/googleearth {
7376     inherit stdenv fetchurl glibc mesa freetype zlib glib;
7377     inherit (xlibs) libSM libICE libXi libXv libXrender libXrandr libXfixes
7378       libXcursor libXinerama libXext libX11;
7379   };
7381   gpsbabel = import ../applications/misc/gpsbabel {
7382     inherit fetchurl stdenv zlib expat;
7383   };
7385   gpscorrelate = import ../applications/misc/gpscorrelate {
7386     inherit fetchurl stdenv pkgconfig exiv2 libxml2
7387       libxslt docbook_xsl docbook_xml_dtd_42;
7388     inherit (gtkLibs) gtk;
7389   };
7391   gpsd = import ../servers/gpsd {
7392     inherit fetchurl stdenv pkgconfig dbus dbus_glib
7393       ncurses makeWrapper libxslt xmlto;
7394     inherit (xlibs) libX11 libXt libXpm libXaw libXext;
7396     # We need a Python with NCurses bindings.
7397     python = pythonFull;
7398   };
7400   gv = import ../applications/misc/gv {
7401     inherit fetchurl stdenv Xaw3d ghostscriptX;
7402   };
7404   hello = makeOverridable (import ../applications/misc/hello/ex-2) {
7405     inherit fetchurl stdenv;
7406   };
7408   homebank = import ../applications/office/homebank {
7409     inherit fetchurl stdenv pkgconfig libofx intltool;
7410     inherit (gtkLibs) gtk;
7411   };
7413   hugin = import ../applications/graphics/hugin {
7414     inherit fetchurl stdenv cmake panotools libtiff libpng boost pkgconfig
7415       exiv2 gettext ilmbase enblendenfuse autopanosiftc mesa freeglut
7416       glew;
7417     inherit wxGTK;
7418     inherit (xlibs) libXi libXmu;
7419     openexr = openexr_1_6_1;
7420   };
7422   i810switch = import ../applications/misc/i810 {
7423     inherit fetchurl stdenv pciutils;
7424   };
7426   icecat3 = lowPrio (import ../applications/networking/browsers/icecat-3 {
7427     inherit fetchurl stdenv pkgconfig perl zip libjpeg libpng zlib cairo
7428       python dbus dbus_glib freetype fontconfig bzip2 xlibs alsaLib libnotify
7429       wirelesstools;
7430     inherit (gnome) libIDL libgnomeui gnomevfs gtk pango;
7431     inherit (pythonPackages) ply;
7432   });
7434   icecatXulrunner3 = lowPrio (import ../applications/networking/browsers/icecat-3 {
7435     application = "xulrunner";
7436     inherit fetchurl stdenv pkgconfig perl zip libjpeg libpng zlib cairo
7437       python dbus dbus_glib freetype fontconfig bzip2 xlibs alsaLib libnotify
7438       wirelesstools;
7439     inherit (gnome) libIDL libgnomeui gnomevfs gtk pango;
7440     inherit (pythonPackages) ply;
7441   });
7443   icecat3Xul =
7444     (symlinkJoin "icecat-with-xulrunner-${icecat3.version}"
7445        [ icecat3 icecatXulrunner3 ])
7446     // { inherit (icecat3) gtk isFirefox3Like meta; };
7448   icecatWrapper = wrapFirefox icecat3Xul "icecat" "";
7450   icewm = import ../applications/window-managers/icewm {
7451     inherit fetchurl stdenv gettext libjpeg libtiff libungif libpng imlib xlibs;
7452   };
7454   ikiwiki = makeOverridable (import ../applications/misc/ikiwiki) {
7455     inherit fetchurl stdenv perl gettext makeWrapper lib;
7456     inherit (perlPackages) TextMarkdown URI HTMLParser HTMLScrubber
7457       HTMLTemplate TimeDate CGISession DBFile CGIFormBuilder;
7458     inherit git; # The RCS should be optional
7459     monotone = null;
7460     extraUtils = [];
7461   };
7463   imagemagick = import ../applications/graphics/ImageMagick {
7464     inherit stdenv fetchurl bzip2 freetype graphviz ghostscript
7465       libjpeg libpng libtiff libxml2 zlib libtool;
7466     inherit (xlibs) libX11;
7467   };
7469   imagemagickBig = import ../applications/graphics/ImageMagick {
7470     inherit stdenv fetchurl bzip2 freetype graphviz ghostscript
7471       libjpeg libpng libtiff libxml2 zlib tetex librsvg libtool;
7472     inherit (xlibs) libX11;
7473   };
7475   # Impressive, formerly known as "KeyJNote".
7476   impressive = import ../applications/office/impressive {
7477     inherit fetchurl stdenv xpdf pil pyopengl pygame makeWrapper lib python;
7479     # XXX These are the PyOpenGL dependencies, which we need here.
7480     inherit setuptools mesa freeglut;
7481   };
7483   inkscape = import ../applications/graphics/inkscape {
7484     inherit fetchurl stdenv perl perlXMLParser pkgconfig zlib popt
7485       libxml2 libxslt libpng boehmgc libsigcxx lcms boost gettext
7486       cairomm python pyxml makeWrapper intltool gsl;
7487     inherit (pythonPackages) lxml;
7488     inherit (gtkLibs) gtk glib glibmm gtkmm;
7489     inherit (xlibs) libXft;
7490   };
7492   ion3 = import ../applications/window-managers/ion-3 {
7493     inherit fetchurl stdenv x11 gettext groff;
7494     lua = lua5;
7495   };
7497   iptraf = import ../applications/networking/iptraf {
7498     inherit fetchurl stdenv ncurses;
7499   };
7501   irssi = import ../applications/networking/irc/irssi {
7502     inherit stdenv fetchurl pkgconfig ncurses openssl glib;
7503   };
7505   jackmeter = import ../applications/audio/jackmeter {
7506     inherit fetchurl stdenv lib jackaudio pkgconfig;
7507   };
7509   jedit = import ../applications/editors/jedit {
7510     inherit fetchurl stdenv ant;
7511   };
7513   jigdo = import ../applications/misc/jigdo {
7514     inherit fetchurl stdenv db45 libwpd bzip2;
7515     inherit (gtkLibs) gtk;
7516   };
7518   joe = import ../applications/editors/joe {
7519     inherit stdenv fetchurl;
7520   };
7522   jwm = import ../applications/window-managers/jwm {
7523     inherit fetchurl stdenv;
7524     inherit (xlibs) libX11 libXext libXinerama libXpm libXft;
7525   };
7527   k3b = import ../applications/misc/k3b {
7528     inherit stdenv fetchurl kdelibs x11 zlib libpng libjpeg perl qt3;
7529   };
7531   kbasket = import ../applications/misc/kbasket {
7532     inherit fetchurl kdelibs x11 zlib libpng libjpeg
7533       perl qt3 gpgme libgpgerror;
7534     stdenv = overrideGCC stdenv gcc43;
7535   };
7537   kermit = import ../tools/misc/kermit {
7538     inherit fetchurl stdenv ncurses;
7539   };
7541   kino = import ../applications/video/kino {
7542     inherit fetchurl stdenv pkgconfig libxml2 perl perlXMLParser
7543       libdv libraw1394 libavc1394 libiec61883 x11 gettext cairo; /* libavformat */
7544     inherit libsamplerate ffmpeg;
7545     inherit (gnome) libglade gtk glib;
7546     inherit (xlibs) libXv libX11;
7547     inherit (gtkLibs) pango;
7548     # #  optional
7549     #  inherit ffmpeg2theora sox, vorbis-tools lame mjpegtools dvdauthor 'Q'dvdauthor growisofs mencoder;
7550   };
7552   kile = import ../applications/editors/kile {
7553     inherit stdenv fetchurl perl arts kdelibs zlib libpng libjpeg freetype expat;
7554     inherit (xlibs) libX11 libXt libXext libXrender libXft;
7555     qt = qt3;
7556   };
7558   konversation = import ../applications/networking/irc/konversation {
7559     inherit fetchurl stdenv perl arts kdelibs zlib libpng libjpeg expat;
7560     inherit (xlibs) libX11 libXt libXext libXrender libXft;
7561     qt = qt3;
7562   };
7564   kphone = import ../applications/networking/kphone {
7565     inherit fetchurl lib autoconf automake libtool pkgconfig openssl libpng alsaLib;
7566     qt = qt3;
7567     inherit (xlibs) libX11 libXext libXt libICE libSM;
7568     stdenv = overrideGCC stdenv gcc42; # I'm to lazy to clean up header files
7569   };
7571   kuickshow = import ../applications/graphics/kuickshow {
7572     inherit fetchurl stdenv kdelibs arts libpng libjpeg libtiff libungif imlib expat perl;
7573     inherit (xlibs) libX11 libXext libSM;
7574     qt = qt3;
7575   };
7577   lame = import ../applications/audio/lame {
7578     inherit fetchurl stdenv;
7579   };
7581   ladspaH = import ../applications/audio/ladspa-plugins/ladspah.nix {
7582     inherit fetchurl stdenv builderDefs stringsWithDeps;
7583   };
7585   ladspaPlugins = import ../applications/audio/ladspa-plugins {
7586     inherit fetchurl stdenv builderDefs stringsWithDeps fftw ladspaH pkgconfig;
7587   };
7589   ldcpp = composedArgsAndFun (import ../applications/networking/p2p/ldcpp/1.0.3.nix) {
7590     inherit builderDefs scons pkgconfig bzip2 openssl;
7591     inherit (gtkLibs) gtk;
7592     inherit (gnome) libglade;
7593     inherit (xlibs) libX11;
7594   };
7596   links = import ../applications/networking/browsers/links {
7597     inherit fetchurl stdenv;
7598   };
7600   ledger = import ../applications/office/ledger {
7601     inherit stdenv fetchurl emacs gmp pcre;
7602   };
7604   links2 = (builderDefsPackage ../applications/networking/browsers/links2) {
7605     inherit fetchurl stdenv bzip2 zlib libjpeg libpng libtiff
7606       gpm openssl SDL SDL_image SDL_net pkgconfig;
7607     inherit (xlibs) libX11 libXau xproto libXt;
7608   };
7610   lynx = import ../applications/networking/browsers/lynx {
7611     inherit fetchurl stdenv ncurses openssl;
7612   };
7614   lyx = import ../applications/misc/lyx {
7615    inherit fetchurl stdenv texLive python;
7616    qt = qt4;
7617   };
7619   mercurial = import ../applications/version-management/mercurial {
7620     inherit fetchurl stdenv makeWrapper getConfig tk;
7621     guiSupport = getConfig ["mercurial" "guiSupport"] false; # for hgk (gitk gui for hg)
7622     python = # allow cloning sources from https servers.
7623       if getConfig ["mercurial" "httpsSupport"] true
7624       then pythonFull
7625       else pythonBase;
7626   };
7628   meshlab = import ../applications/graphics/meshlab {
7629     inherit fetchurl stdenv bzip2 lib3ds levmar muparser unzip;
7630     qt = qt4;
7631   };
7633   midori = builderDefsPackage (import ../applications/networking/browsers/midori) {
7634     inherit imagemagick intltool python pkgconfig webkit libxml2
7635       which gettext makeWrapper file libidn sqlite docutils libnotify;
7636     inherit (gtkLibs) gtk glib;
7637     inherit (gnome28) gtksourceview libsoup;
7638   };
7640   minicom = import ../tools/misc/minicom {
7641     inherit fetchurl stdenv ncurses;
7642   };
7644   mmex = import ../applications/office/mmex {
7645     inherit fetchsvn stdenv wxGTK;
7646   };
7648   monodevelop = import ../applications/editors/monodevelop {
7649     inherit fetchurl stdenv file mono gtksourceviewsharp
7650             gtkmozembedsharp monodoc perl perlXMLParser pkgconfig;
7651     inherit (gnome) gnomevfs libbonobo libglade libgnome GConf glib gtk;
7652     mozilla = firefox;
7653     gtksharp = gtksharp2;
7654   };
7656   monodoc = import ../applications/editors/monodoc {
7657     inherit fetchurl stdenv mono pkgconfig;
7658     gtksharp = gtksharp1;
7659   };
7661   monotone = import ../applications/version-management/monotone {
7662     inherit stdenv fetchurl boost zlib botan libidn pcre
7663       sqlite lib perl;
7664     lua = lua5;
7665   };
7667   monotoneViz = builderDefsPackage (import ../applications/version-management/monotone-viz/mtn-head.nix) {
7668     inherit ocaml lablgtk graphviz pkgconfig autoconf automake libtool;
7669     inherit (gnome) gtk libgnomecanvas glib;
7670   };
7672   mozilla = import ../applications/networking/browsers/mozilla {
7673     inherit fetchurl pkgconfig stdenv perl zip;
7674     inherit (gtkLibs) gtk;
7675     inherit (gnome) libIDL;
7676     inherit (xlibs) libXi;
7677   };
7679   mozplugger = builderDefsPackage (import ../applications/networking/browsers/mozilla-plugins/mozplugger) {
7680     inherit firefox;
7681     inherit (xlibs) libX11 xproto;
7682   };
7684   mpc123 = import ../applications/audio/mpc123 {
7685     inherit stdenv fetchurl gettext libao libmpcdec;
7686   };
7688   mpg321 = import ../applications/audio/mpg321 {
7689     inherit stdenv fetchurl libao libmad libid3tag zlib;
7690   };
7692   MPlayer = import ../applications/video/MPlayer {
7693     inherit fetchurl stdenv freetype x11 zlib libtheora libcaca freefont_ttf libdvdnav
7694       cdparanoia mesa pkgconfig unzip amrnb amrwb;
7695     inherit (xlibs) libX11 libXv libXinerama libXrandr;
7696     alsaSupport = true;
7697     alsa = alsaLib;
7698     theoraSupport = true;
7699     cacaSupport = true;
7700     xineramaSupport = true;
7701     randrSupport = true;
7702     cddaSupport = true;
7703     amrSupport = getConfig [ "MPlayer" "amr" ] false;
7704   };
7706   MPlayerPlugin = browser:
7707     import ../applications/networking/browsers/mozilla-plugins/mplayerplug-in {
7708       inherit browser;
7709       inherit fetchurl stdenv pkgconfig gettext;
7710       inherit (xlibs) libXpm;
7711       # !!! should depend on MPlayer
7712     };
7714   MPlayerTrunk = import ../applications/video/MPlayer/trunk.nix {
7715     inherit fetchurl sourceFromHead stdenv freetype x11 zlib libtheora libcaca
7716       freefont_ttf libdvdnav cdparanoia mesa pkgconfig jackaudio;
7717     inherit (xlibs) libX11 libXv libXinerama libXrandr;
7718     alsaSupport = true;
7719     alsa = alsaLib;
7720     theoraSupport = true;
7721     cacaSupport = true;
7722     xineramaSupport = true;
7723     randrSupport = true;
7724     cddaSupport = true;
7725   };
7727   mrxvt = import ../applications/misc/mrxvt {
7728     inherit lib fetchurl stdenv freetype pkgconfig which;
7729     inherit (xlibs) libXaw xproto libXt libX11 libSM libICE libXft
7730       libXi inputproto;
7731   };
7733   multisync = import ../applications/misc/multisync {
7734     inherit fetchurl stdenv autoconf automake libtool pkgconfig;
7735     inherit (gnome) gtk glib ORBit2 libbonobo libgnomeui GConf;
7736   };
7738   mutt = import ../applications/networking/mailreaders/mutt {
7739     inherit fetchurl stdenv ncurses which openssl gdbm perl;
7740   };
7742   msmtp = import ../applications/networking/msmtp {
7743     inherit fetchurl stdenv;
7744   };
7746   mythtv = import ../applications/video/mythtv {
7747     inherit fetchurl stdenv which x11 xlibs lame zlib mesa freetype perl alsaLib;
7748     qt3 = qt3mysql;
7749   };
7751   nano = import ../applications/editors/nano {
7752     inherit fetchurl stdenv ncurses gettext;
7753   };
7755   nedit = import ../applications/editors/nedit {
7756       inherit fetchurl stdenv x11;
7757       inherit (xlibs) libXpm;
7758       motif = lesstif;
7759     };
7761   netsurfBrowser = netsurf.browser;
7762   netsurf = recurseIntoAttrs (import ../applications/networking/browsers/netsurf { inherit pkgs; });
7764   nvi = import ../applications/editors/nvi {
7765     inherit fetchurl stdenv ncurses;
7766   };
7768   openoffice = import ../applications/office/openoffice {
7769     inherit fetchurl stdenv pam python tcsh libxslt perl zlib libjpeg
7770       expat pkgconfig freetype fontconfig libwpd libxml2 db4 sablotron
7771       curl libsndfile flex zip unzip libmspack getopt file neon cairo
7772       which icu jdk ant cups openssl bison boost gperf cppunit;
7773     inherit (xlibs) libXaw libXext libX11 libXtst libXi libXinerama;
7774     inherit (gtkLibs) gtk;
7775     inherit (perlPackages) ArchiveZip CompressZlib;
7776     inherit (gnome) GConf ORBit2;
7777   };
7779   opera = import ../applications/networking/browsers/opera {
7780     inherit fetchurl zlib glibc stdenv makeDesktopItem;
7781     inherit (xlibs) libX11 libSM libICE libXt libXext;
7782     qt = qt3;
7783   };
7785   pan = import ../applications/networking/newsreaders/pan {
7786     inherit fetchurl stdenv pkgconfig perl pcre gmime gettext;
7787     inherit (gtkLibs) gtk;
7788     spellChecking = false;
7789   };
7791   panotools = import ../applications/graphics/panotools {
7792     inherit stdenv fetchsvn libpng libjpeg libtiff automake libtool autoconf;
7793   };
7795   pavucontrol = import ../applications/audio/pavucontrol {
7796     inherit fetchurl stdenv pkgconfig pulseaudio libsigcxx
7797       libcanberra intltool gettext;
7798     inherit (gtkLibs) gtkmm;
7799     inherit (gnome) libglademm;
7800   };
7802   paraview = import ../applications/graphics/paraview {
7803     inherit fetchurl stdenv cmake qt4;
7804   };
7806   partitionManager = import ../tools/misc/partition-manager {
7807     inherit fetchurl stdenv lib cmake pkgconfig gettext parted libuuid perl;
7808     kde = kde43;
7809     qt = qt4;
7810   };
7812   pidgin = import ../applications/networking/instant-messengers/pidgin {
7813     inherit fetchurl stdenv pkgconfig perl perlXMLParser libxml2 nss nspr farsight2 python
7814       gtkspell aspell gettext ncurses avahi dbus dbus_glib lib intltool libidn;
7815     openssl = if (getConfig ["pidgin" "openssl"] true) then openssl else null;
7816     gnutls = if (getConfig ["pidgin" "gnutls"] false) then gnutls else null;
7817     GStreamer = gst_all.gstreamer;
7818     inherit (gtkLibs) gtk;
7819     inherit (gnome) startupnotification;
7820     inherit (xlibs) libXScrnSaver;
7821     inherit (gst_all) gstPluginsBase;
7822   };
7824   pidginlatex = composedArgsAndFun (import ../applications/networking/instant-messengers/pidgin-plugins/pidgin-latex) {
7825     inherit fetchurl stdenv pkgconfig ghostscript pidgin texLive;
7826     imagemagick = imagemagickBig;
7827     inherit (gtkLibs) glib gtk;
7828   };
7830   pidginlatexSF = builderDefsPackage
7831     (import ../applications/networking/instant-messengers/pidgin-plugins/pidgin-latex/pidgin-latex-sf.nix)
7832     {
7833       inherit pkgconfig pidgin texLive imagemagick which;
7834       inherit (gtkLibs) glib gtk;
7835     };
7837   pidginotr = import ../applications/networking/instant-messengers/pidgin-plugins/otr {
7838     inherit fetchurl stdenv libotr pidgin;
7839   };
7841   pinfo = import ../applications/misc/pinfo {
7842     inherit fetchurl stdenv ncurses readline;
7843   };
7845   pqiv = import ../applications/graphics/pqiv {
7846     inherit fetchurl stdenv getopt which pkgconfig;
7847     inherit (gtkLibs) gtk;
7848   };
7850   # perhaps there are better apps for this task? It's how I had configured my preivous system.
7851   # And I don't want to rewrite all rules
7852   procmail = import ../applications/misc/procmail {
7853     inherit fetchurl stdenv autoconf;
7854   };
7856   pstree = import ../applications/misc/pstree {
7857     inherit stdenv fetchurl;
7858   };
7860   pythonmagick = import ../applications/graphics/PythonMagick {
7861     inherit fetchurl stdenv pkgconfig imagemagick boost python;
7862   };
7864   qemu = import ../applications/virtualization/qemu/0.12.1.nix {
7865     inherit stdenv fetchurl SDL zlib which;
7866   };
7868   qemuSVN = import ../applications/virtualization/qemu/svn-6642.nix {
7869     inherit fetchsvn SDL zlib which stdenv;
7870   };
7872   qemuImage = composedArgsAndFun (import ../applications/virtualization/qemu/linux-img/0.2.nix) {
7873     inherit builderDefs fetchurl stdenv;
7874   };
7876   qtpfsgui = import ../applications/graphics/qtpfsgui {
7877     inherit fetchurl stdenv exiv2 libtiff fftw qt4 ilmbase;
7878     openexr = openexr_1_6_1;
7879   };
7881   ratpoison = import ../applications/window-managers/ratpoison {
7882     inherit fetchurl stdenv fontconfig readline pkgconfig autoconf automake;
7883     inherit (xlibs) libX11 inputproto libXt libXpm libXft
7884       libXtst xextproto libXi;
7885   };
7887   rawtherapee = import ../applications/graphics/rawtherapee {
7888     inherit fetchsvn stdenv pkgconfig cmake lcms libiptcdata;
7889     inherit (gtkLibs) gtk gtkmm;
7890     inherit (xlibs) libXau libXdmcp pixman libpthreadstubs;
7891   };
7893   rcs = import ../applications/version-management/rcs {
7894     inherit fetchurl stdenv;
7895   };
7897   rdesktop = import ../applications/networking/remote/rdesktop {
7898     inherit fetchurl stdenv openssl;
7899     inherit (xlibs) libX11;
7900   };
7902   RealPlayer =
7903     (import ../applications/video/RealPlayer {
7904       inherit fetchurl stdenv;
7905       inherit (gtkLibs) glib pango atk gtk;
7906       inherit (xlibs) libX11;
7907       libstdcpp5 = gcc33.gcc;
7908     });
7910   rsync = import ../applications/networking/sync/rsync {
7911     inherit fetchurl stdenv acl perl;
7912     enableACLs = !stdenv.isDarwin;
7913   };
7915   rxvt = import ../applications/misc/rxvt {
7916     inherit lib fetchurl stdenv;
7917     inherit (xlibs) libXt libX11;
7918   };
7920   # = urxvt
7921   rxvt_unicode = makeOverridable (import ../applications/misc/rxvt_unicode) {
7922     inherit lib fetchurl stdenv perl ncurses;
7923     inherit (xlibs) libXt libX11 libXft;
7924     perlSupport = false;
7925   };
7927   sbagen = import ../applications/misc/sbagen {
7928     inherit fetchurl stdenv;
7929   };
7931   scribus = import ../applications/office/scribus {
7932     inherit fetchurl stdenv lib cmake pkgconfig freetype lcms libtiff libxml2
7933       cairo python cups fontconfig zlib libjpeg libpng;
7934     inherit (gnome) libart_lgpl;
7935     inherit (xlibs) libXaw libXext libX11 libXtst libXi libXinerama;
7936     qt = qt3;
7937   };
7939   skype_linux = import ../applications/networking/skype {
7940     inherit fetchurl stdenv;
7941     inherit alsaLib freetype fontconfig zlib;
7942     qt = qt46;
7943     inherit (xlibs) libXext libX11 libXv libXScrnSaver libSM libICE
7944       libXi libXrender libXrandr;
7945     inherit (gtkLibs) glib;
7946   };
7948   slim = import ../applications/display-managers/slim {
7949     inherit fetchurl stdenv x11 libjpeg libpng freetype pam;
7950     inherit (xlibs) libXmu;
7951   };
7953   sndBase = builderDefsPackage (import ../applications/audio/snd) {
7954     inherit fetchurl stdenv stringsWithDeps lib fftw;
7955     inherit pkgconfig gmp gettext;
7956     inherit (xlibs) libXpm libX11;
7957     inherit (gtkLibs) gtk glib;
7958   };
7960   snd = sndBase.passthru.function {
7961     inherit guile mesa libtool jackaudio alsaLib;
7962   };
7964   sonicVisualizer = import ../applications/audio/sonic-visualizer {
7965     inherit fetchurl stdenv lib libsndfile libsamplerate bzip2 librdf
7966       rubberband jackaudio pulseaudio libmad
7967       libogg liblo alsaLib librdf_raptor librdf_rasqal redland fftw;
7968     inherit (vamp) vampSDK;
7969     qt = qt4;
7970   };
7972   sox = import ../applications/misc/audio/sox {
7973     inherit fetchurl stdenv lib composableDerivation;
7974     # optional features
7975     inherit alsaLib libao ffmpeg;
7976     inherit libsndfile libogg flac libmad lame libsamplerate;
7977     # Using the default nix ffmpeg I get this error when linking
7978     # .libs/libsox_la-ffmpeg.o: In function `audio_decode_frame':
7979     # /tmp/nix-7957-1/sox-14.0.0/src/ffmpeg.c:130: undefined reference to `avcodec_decode_audio2
7980     # That's why I'v added ffmpeg_svn
7981   };
7983   stumpwm = builderDefsPackage (import ../applications/window-managers/stumpwm) {
7984     inherit texinfo;
7985     clisp = clisp_2_44_1;
7986   };
7988   subversion = makeOverridable (import ../applications/version-management/subversion/default.nix) {
7989     inherit (pkgsOverriden) fetchurl stdenv apr aprutil expat swig zlib jdk python perl sqlite;
7990     neon = neon028;
7991     bdbSupport = getConfig ["subversion" "bdbSupport"] true;
7992     httpServer = getConfig ["subversion" "httpServer"] false;
7993     httpSupport = getConfig ["subversion" "httpSupport"] true;
7994     sslSupport = getConfig ["subversion" "sslSupport"] true;
7995     pythonBindings = getConfig ["subversion" "pythonBindings"] false;
7996     perlBindings = getConfig ["subversion" "perlBindings"] false;
7997     javahlBindings = supportsJDK && getConfig ["subversion" "javahlBindings"] false;
7998     compressionSupport = getConfig ["subversion" "compressionSupport"] true;
7999     httpd = pkgsOverriden.apacheHttpd;
8000   };
8002   svk = perlPackages.SVK;
8004   sylpheed = import ../applications/networking/mailreaders/sylpheed {
8005     inherit fetchurl stdenv pkgconfig openssl gpgme;
8006     inherit (gtkLibs) gtk;
8007     sslSupport = true;
8008     gpgSupport = true;
8009   };
8011   # linux only by now
8012   synergy = import ../applications/misc/synergy {
8013     inherit fetchurl sourceFromHead stdenv x11 automake autoconf;
8014     inherit (xlibs) xextproto libXtst inputproto libXi;
8015   };
8017   tahoelafs = import ../tools/networking/p2p/tahoe-lafs {
8018     inherit fetchurl lib unzip nettools buildPythonPackage;
8019     inherit (pythonPackages) twisted foolscap simplejson nevow zfec
8020       pycryptopp pysqlite darcsver setuptoolsTrial setuptoolsDarcs
8021       numpy;
8022   };
8024   tailor = builderDefsPackage (import ../applications/version-management/tailor) {
8025     inherit makeWrapper python;
8026   };
8028   tangogps = import ../applications/misc/tangogps {
8029     inherit fetchurl stdenv pkgconfig gettext curl libexif sqlite libxml2;
8030     inherit (gtkLibs) gtk;
8031     gconf = gnome.GConf;
8032   };
8034   /* does'nt work yet i686-linux only (32bit version)
8035   teamspeak_client = import ../applications/networking/instant-messengers/teamspeak/client.nix {
8036     inherit fetchurl stdenv;
8037     inherit glibc x11;
8038   };
8039   */
8041   taskJuggler = import ../applications/misc/taskjuggler {
8042     inherit stdenv fetchurl;
8043     inherit zlib libpng perl expat;
8044     qt = qt3;
8046     inherit (xlibs) libX11 libXext libSM libICE;
8048     # KDE support is not working yet.
8049     inherit kdelibs kdebase;
8050     withKde = pkgs.getConfig ["taskJuggler" "kde"] false;
8051   };
8053   thinkingRock = import ../applications/misc/thinking-rock {
8054     inherit fetchurl stdenv;
8055   };
8057   thunderbird = thunderbird2;
8059   thunderbird2 = import ../applications/networking/mailreaders/thunderbird/2.x.nix {
8060     inherit fetchurl stdenv pkgconfig perl zip libjpeg libpng zlib cairo;
8061     inherit (gtkLibs) gtk;
8062     inherit (gnome) libIDL;
8063     inherit (xlibs) libXi;
8064   };
8066   thunderbird3 = lowPrio (import ../applications/networking/mailreaders/thunderbird/3.x.nix {
8067     inherit fetchurl stdenv pkgconfig perl python dbus_glib zip bzip2 alsaLib nspr;
8068     inherit (gtkLibs) gtk;
8069     inherit (gnome) libIDL;
8070   });
8072   timidity = import ../tools/misc/timidity {
8073     inherit fetchurl stdenv lib alsaLib composableDerivation jackaudio ncurses;
8074   };
8076   tkcvs = import ../applications/version-management/tkcvs {
8077     inherit stdenv fetchurl tcl tk;
8078   };
8080   tla = import ../applications/version-management/arch {
8081     inherit fetchurl stdenv diffutils gnutar gnupatch which;
8082   };
8084   twinkle = import ../applications/networking/twinkle {
8085     inherit fetchurl stdenv lib pkgconfig commoncpp2 ccrtp openssl speex libjpeg perl
8086       libzrtpcpp libsndfile libxml2 file readline alsaLib;
8087     qt = qt3;
8088     boost = boostFull;
8089     inherit (xlibs) libX11 libXaw libICE libXext;
8090   };
8092   unison = import ../applications/networking/sync/unison {
8093     inherit fetchurl stdenv ocaml lablgtk makeWrapper;
8094     inherit (xorg) xset fontschumachermisc;
8095   };
8097   uucp = import ../tools/misc/uucp {
8098     inherit fetchurl stdenv;
8099   };
8101   uzbl = builderDefsPackage (import ../applications/networking/browsers/uzbl) {
8102     inherit pkgconfig webkit makeWrapper;
8103     inherit (gtkLibs) gtk glib;
8104     libsoup = gnome28.libsoup;
8105   };
8107   uzblExperimental = builderDefsPackage
8108         (import ../applications/networking/browsers/uzbl/experimental.nix) {
8109     inherit pkgconfig webkit makeWrapper;
8110     inherit (gtkLibs) gtk glib;
8111     libsoup = gnome28.libsoup;
8112   };
8114   valknut = import ../applications/networking/p2p/valknut {
8115     inherit fetchurl stdenv perl x11 libxml2 libjpeg libpng openssl dclib;
8116     qt = qt3;
8117   };
8119   viewMtn = builderDefsPackage (import ../applications/version-management/viewmtn/0.10.nix)
8120   {
8121     inherit monotone flup cheetahTemplate highlight ctags
8122       makeWrapper graphviz which python;
8123   };
8125   vim = import ../applications/editors/vim {
8126     inherit fetchurl stdenv ncurses lib;
8127   };
8129   vimHugeX = import ../applications/editors/vim {
8130     inherit fetchurl stdenv lib ncurses pkgconfig
8131       perl python tcl;
8132     inherit (xlibs) libX11 libXext libSM libXpm
8133       libXt libXaw libXau;
8134     inherit (gtkLibs) glib gtk;
8136     # Looks like python and perl can conflict
8137     flags = ["hugeFeatures" "gtkGUI" "x11Support"
8138       /*"perlSupport"*/ "pythonSupport" "tclSupport"];
8139   };
8141   vim_configurable = import ../applications/editors/vim/configurable.nix {
8142     inherit fetchurl stdenv ncurses pkgconfig composableDerivation lib;
8143     inherit (xlibs) libX11 libXext libSM libXpm
8144         libXt libXaw libXau libXmu;
8145     inherit (gtkLibs) glib gtk;
8146     features = "huge"; # one of  tiny, small, normal, big or huge
8147     # optional features by passing
8148     # python
8149     # TODO mzschemeinterp perlinterp
8150     inherit python perl tcl ruby /*x11*/;
8152     # optional features by flags
8153     flags = [ "X11" ]; # only flag "X11" by now
8154   };
8156   vlc = import ../applications/video/vlc {
8157     inherit fetchurl stdenv perl xlibs zlib a52dec libmad faad2
8158       ffmpeg libdvdnav pkgconfig hal fribidi qt4 freefont_ttf;
8159     dbus = dbus.libs;
8160     alsa = alsaLib;
8161   };
8163   vnstat = import ../applications/networking/vnstat {
8164     inherit fetchurl stdenv ncurses;
8165   };
8167   vorbisTools = import ../applications/audio/vorbis-tools {
8168     inherit fetchurl stdenv libogg libvorbis libao pkgconfig curl glibc
8169       speex flac;
8170   };
8172   vwm = import ../applications/window-managers/vwm {
8173     inherit fetchurl stdenv ncurses pkgconfig libviper libpseudo gpm glib libvterm;
8174   };
8176   w3m = import ../applications/networking/browsers/w3m {
8177     inherit fetchurl stdenv ncurses openssl boehmgc gettext zlib imlib2 x11;
8178     graphicsSupport = false;
8179   };
8181   # I'm keen on wmiimenu only  >wmii-3.5 no longer has it...
8182   wmiimenu = import ../applications/window-managers/wmii31 {
8183     libixp = libixp_for_wmii;
8184     inherit fetchurl /* fetchhg */ stdenv gawk;
8185     inherit (xlibs) libX11;
8186   };
8188   wmiiSnap = import ../applications/window-managers/wmii {
8189     libixp = libixp_for_wmii;
8190     inherit fetchurl /* fetchhg */ stdenv gawk;
8191     inherit (xlibs) libX11 xextproto libXt libXext;
8192     includeUnpack = getConfig ["stdenv" "includeUnpack"] false;
8193   };
8195   wordnet = import ../applications/misc/wordnet {
8196     inherit stdenv fetchurl tcl tk x11 makeWrapper;
8197   };
8199   wrapFirefox = browser: browserName: nameSuffix: import ../applications/networking/browsers/firefox/wrapper.nix {
8200     inherit stdenv nameSuffix makeWrapper makeDesktopItem browser browserName;
8201     plugins =
8202       let enableAdobeFlash = getConfig [ browserName "enableAdobeFlash" ] true;
8203       in
8204        ([]
8205         ++ lib.optional (!enableAdobeFlash) gnash
8206         ++ lib.optional enableAdobeFlash flashplayer
8207         # RealPlayer is disabled by default for legal reasons.
8208         ++ lib.optional (system != "i686-linux" && getConfig [browserName "enableRealPlayer"] false) RealPlayer
8209         ++ lib.optional (getConfig [browserName "enableMPlayer"] false) (MPlayerPlugin browser)
8210         ++ lib.optional (getConfig [browserName "enableGeckoMediaPlayer"] false) gecko_mediaplayer
8211         ++ lib.optional (supportsJDK && getConfig [browserName "jre"] false && jrePlugin ? mozillaPlugin) jrePlugin
8212        );
8213   };
8215   x11vnc = composedArgsAndFun (import ../tools/X11/x11vnc/0.9.3.nix) {
8216     inherit builderDefs openssl zlib libjpeg ;
8217     inherit (xlibs) libXfixes fixesproto libXdamage damageproto
8218       libX11 xproto libXtst libXinerama xineramaproto libXrandr randrproto
8219       libXext xextproto inputproto recordproto libXi renderproto
8220       libXrender;
8221   };
8223   x2vnc = composedArgsAndFun (import ../tools/X11/x2vnc/1.7.2.nix) {
8224     inherit builderDefs;
8225     inherit (xlibs) libX11 xproto xextproto libXext libXrandr randrproto;
8226   };
8228   xaos = builderDefsPackage (import ../applications/graphics/xaos) {
8229     inherit (xlibs) libXt libX11 libXext xextproto xproto;
8230     inherit gsl aalib zlib libpng intltool gettext perl;
8231   };
8233   xara = import ../applications/graphics/xara {
8234     inherit fetchurl stdenv autoconf automake libtool gettext cvs
8235       pkgconfig libxml2 zip libpng libjpeg shebangfix perl freetype;
8236     inherit (gtkLibs) gtk;
8237     wxGTK = wxGTK26;
8238   };
8240   xawtv = import ../applications/video/xawtv {
8241     inherit fetchurl stdenv ncurses libjpeg perl;
8242     inherit (xlibs) libX11 libXt libXft xproto libFS fontsproto libXaw libXpm libXext libSM libICE xextproto;
8243   };
8245   xchat = import ../applications/networking/irc/xchat {
8246     inherit fetchurl stdenv pkgconfig tcl;
8247     inherit (gtkLibs) gtk;
8248   };
8250   xchm = import ../applications/misc/xchm {
8251     inherit fetchurl stdenv chmlib wxGTK;
8252   };
8254   xcompmgr = import ../applications/window-managers/xcompmgr {
8255     inherit stdenv fetchurl pkgconfig;
8256     inherit (xlibs) libXcomposite libXfixes libXdamage libXrender;
8257   };
8259   /* Doesn't work yet
8261   xen = builderDefsPackage (import ../applications/virtualization/xen) {
8262     inherit python e2fsprogs gnutls pkgconfig libjpeg
8263       ncurses SDL libvncserver zlib;
8264     texLive = if (getConfig ["xen" "texLive"] false) then texLive else null;
8265     graphviz = if (getConfig ["xen" "graphviz"] false) then graphviz else null;
8266     ghostscript = if (getConfig ["xen" "ghostscript"] false) then ghostscript else null;
8267   }; */
8269   xfig = import ../applications/graphics/xfig {
8270     stdenv = overrideGCC stdenv gcc34;
8271     inherit fetchurl makeWrapper x11 Xaw3d libpng libjpeg;
8272     inherit (xlibs) imake libXpm libXmu libXi libXp;
8273   };
8275   xineUI = import ../applications/video/xine-ui {
8276     inherit fetchurl stdenv pkgconfig xlibs xineLib libpng readline ncurses curl;
8277   };
8279   xmms = import ../applications/audio/xmms {
8280     inherit fetchurl libogg libvorbis alsaLib;
8281     inherit (gnome) esound;
8282     inherit (gtkLibs1x) glib gtk;
8283     stdenv = overrideGCC stdenv gcc34; # due to problems with gcc 4.x
8284   };
8286   xneur = import ../applications/misc/xneur {
8287     inherit fetchurl stdenv pkgconfig pcre libxml2 aspell imlib2
8288       xosd libnotify cairo;
8289     GStreamer=gst_all.gstreamer;
8290     inherit (xlibs) libX11 libXpm libXt libXext libXi;
8291     inherit (gtkLibs) glib gtk pango atk;
8292   };
8294   xneur_0_8 = import ../applications/misc/xneur/0.8.nix {
8295     inherit fetchurl stdenv pkgconfig pcre libxml2 aspell imlib2 xosd glib;
8296     GStreamer = gst_all.gstreamer;
8297     inherit (xlibs) libX11 libXpm libXt libXext;
8298   };
8300   xournal = builderDefsPackage (import ../applications/graphics/xournal) {
8301     inherit ghostscript fontconfig freetype zlib
8302       poppler popplerData autoconf automake
8303       libtool pkgconfig;
8304     inherit (xlibs) xproto libX11;
8305     inherit (gtkLibs) gtk atk pango glib;
8306     inherit (gnome) libgnomeprint libgnomeprintui
8307       libgnomecanvas;
8308   };
8310   xpdf = import ../applications/misc/xpdf {
8311     inherit fetchurl stdenv x11 freetype t1lib;
8312     motif = lesstif;
8313     base14Fonts = "${ghostscript}/share/ghostscript/fonts";
8314   };
8316   xpra = import ../tools/X11/xpra {
8317     inherit stdenv fetchurl pkgconfig python pygtk xlibs makeWrapper;
8318     inherit (gtkLibs) gtk;
8319     pyrex = pyrex095;
8320   };
8322   xscreensaver = makeOverridable (import ../applications/graphics/xscreensaver) {
8323     inherit stdenv fetchurl pkgconfig bc perl xlibs libjpeg mesa libxml2;
8324     inherit (gtkLibs) gtk;
8325     inherit (gnome) libglade;
8326   };
8328   xterm = import ../applications/misc/xterm {
8329     inherit fetchurl stdenv ncurses freetype pkgconfig;
8330     inherit (xlibs) libXaw xproto libXt libX11 libSM libICE libXext libXft luit;
8331   };
8333   xtrace = import ../tools/X11/xtrace {
8334     inherit stdenv fetchurl;
8335     inherit (xlibs) libX11;
8336   };
8338   xlaunch = import ../tools/X11/xlaunch {
8339     inherit stdenv;
8340     inherit (xorg) xorgserver;
8341   };
8343   xmacro = import ../tools/X11/xmacro {
8344     inherit fetchurl stdenv;
8345     inherit (xlibs) libX11 libXi libXtst xextproto inputproto;
8346   };
8348   xmove = import ../applications/misc/xmove {
8349     inherit fetchurl stdenv;
8350     inherit (xlibs) libX11 libXi imake libXau;
8351     inherit (xorg) xauth;
8352   };
8354   xnee = builderDefsPackage (import ../tools/X11/xnee) {
8355     inherit (gtkLibs) gtk;
8356     inherit (xlibs) libX11 libXtst xextproto libXext
8357       inputproto libXi xproto recordproto;
8358     inherit pkgconfig;
8359   };
8361   xvidcap = import ../applications/video/xvidcap {
8362     inherit fetchurl stdenv perl perlXMLParser pkgconfig gettext lame;
8363     inherit (gtkLibs) gtk;
8364     inherit (gnome) scrollkeeper libglade;
8365     inherit (xlibs) libXmu libXext libXfixes libXdamage libX11;
8366   };
8368   yate = import ../applications/misc/yate {
8369     inherit sox speex openssl automake autoconf pkgconfig;
8370     inherit fetchurl stdenv lib composableDerivation;
8371     qt = qt4;
8372   };
8374   # doesn't compile yet - in case someone else want's to continue ..
8375   qgis = (import ../applications/misc/qgis/1.0.1-2.nix) {
8376     inherit composableDerivation fetchsvn stdenv flex lib
8377             ncurses fetchurl perl cmake gdal geos proj x11
8378             gsl libpng zlib bison
8379             sqlite glibc fontconfig freetype /* use libc from stdenv ? - to lazy now - Marc */;
8380     inherit (xlibs) libSM libXcursor libXinerama libXrandr libXrender;
8381     inherit (xorg) libICE;
8382     qt = qt4;
8384     # optional features
8385     # grass = "not yet supported" # cmake -D WITH_GRASS=TRUE  and GRASS_PREFX=..
8386   };
8388   zapping = import ../applications/video/zapping {
8389     inherit fetchurl stdenv pkgconfig perl python
8390             gettext zvbi libjpeg libpng x11
8391             rte perlXMLParser;
8392     inherit (gnome) scrollkeeper libgnomeui libglade esound;
8393     inherit (xlibs) libXv libXmu libXext;
8394     teletextSupport = true;
8395     jpegSupport = true;
8396     pngSupport = true;
8397     recordingSupport = true;
8398   };
8401   ### GAMES
8403   ballAndPaddle = import ../games/ball-and-paddle {
8404     inherit fetchurl stdenv SDL SDL_image SDL_mixer SDL_ttf guile gettext;
8405   };
8407   bsdgames = import ../games/bsdgames {
8408     inherit fetchurl stdenv ncurses openssl flex bison miscfiles;
8409   };
8411   castleCombat = import ../games/castle-combat {
8412     inherit fetchurl stdenv python pygame twisted lib numeric makeWrapper;
8413   };
8415   construoBase = composedArgsAndFun (import ../games/construo/0.2.2.nix) {
8416     inherit stdenv fetchurl builderDefs
8417       zlib;
8418     inherit (xlibs) libX11 xproto;
8419   };
8421   construo = construoBase.passthru.function {
8422     inherit mesa freeglut;
8423   };
8425   eduke32 = import ../games/eduke32 {
8426     inherit stdenv fetchsvn SDL SDL_mixer unzip libvorbis mesa pkgconfig nasm makeDesktopItem;
8427     inherit (gtkLibs) gtk;
8428   };
8430   exult = import ../games/exult {
8431     inherit fetchurl SDL SDL_mixer zlib libpng unzip;
8432     stdenv = overrideGCC stdenv gcc42;
8433   };
8435   /*
8436   exultSnapshot = lowPrio (import ../games/exult/snapshot.nix {
8437     inherit fetchurl stdenv SDL SDL_mixer zlib libpng unzip
8438       autoconf automake libtool flex bison;
8439   });
8440   */
8442   fsg = import ../games/fsg {
8443     inherit stdenv fetchurl pkgconfig mesa;
8444     inherit (gtkLibs) glib gtk;
8445     inherit (xlibs) libX11 xproto;
8446     wxGTK = wxGTK28.override {unicode = false;};
8447   };
8449   fsgAltBuild = import ../games/fsg/alt-builder.nix {
8450     inherit stdenv fetchurl mesa;
8451     wxGTK = wxGTK28.override {unicode = false;};
8452     inherit (xlibs) libX11 xproto;
8453     inherit stringsWithDeps builderDefs;
8454   };
8456   gemrb = import ../games/gemrb {
8457     inherit fetchurl stdenv SDL openal freealut zlib libpng python;
8458   };
8460   gnuchess = builderDefsPackage (import ../games/gnuchess) {
8461     flex = flex2535;
8462   };
8464   gparted = import ../tools/misc/gparted {
8465     inherit fetchurl stdenv parted intltool gettext libuuid pkgconfig libxml2;
8466     inherit (gtkLibs) gtk glib gtkmm;
8467     inherit (gnome) gnomedocutils;
8468   };
8470   hexen = import ../games/hexen {
8471     inherit stdenv fetchurl SDL;
8472   };
8474   kobodeluxe = import ../games/kobodeluxe {
8475     inherit stdenv fetchurl SDL SDL_image;
8476   };
8478   lincity = builderDefsPackage (import ../games/lincity) {
8479     inherit (xlibs) libX11 libXext xextproto
8480       libICE libSM xproto;
8481     inherit libpng zlib;
8482   };
8484   micropolis = import ../games/micropolis {
8485     inherit lib fetchurl stdenv;
8486     inherit (xlibs) libX11 libXpm libXext xextproto;
8487     inherit byacc bash;
8488   };
8490   openttd = import ../games/openttd {
8491     inherit fetchurl stdenv SDL libpng;
8492     zlib = zlibStatic;
8493   };
8495   pioneers = import ../games/pioneers {
8496     inherit stdenv fetchurl pkgconfig intltool;
8497     inherit (gtkLibs) gtk /*glib gtkmm*/;
8498   };
8500   quake3demo = import ../games/quake3/wrapper {
8501     name = "quake3-demo-${quake3game.name}";
8502     description = "Demo of Quake 3 Arena, a classic first-person shooter";
8503     inherit fetchurl stdenv mesa makeWrapper;
8504     game = quake3game;
8505     paks = [quake3demodata];
8506   };
8508   quake3demodata = import ../games/quake3/demo {
8509     inherit fetchurl stdenv;
8510   };
8512   quake3game = import ../games/quake3/game {
8513     inherit fetchurl stdenv x11 SDL mesa openal;
8514   };
8516   rogue = import ../games/rogue {
8517     inherit fetchurl stdenv ncurses;
8518   };
8520   scummvm = import ../games/scummvm {
8521     inherit fetchurl stdenv SDL zlib mpeg2dec;
8522   };
8524   scorched3d = import ../games/scorched3d {
8525     inherit stdenv fetchurl mesa openal autoconf automake libtool freealut freetype fftw SDL SDL_net zlib libpng libjpeg;
8526     wxGTK = wxGTK26;
8527   };
8529   sgtpuzzles = builderDefsPackage (import ../games/sgt-puzzles) {
8530     inherit (gtkLibs) gtk glib;
8531     inherit pkgconfig fetchsvn perl;
8532     inherit (xlibs) libX11;
8533   };
8535   # You still can override by passing more arguments.
8536   spaceOrbit = composedArgsAndFun (import ../games/orbit/1.01.nix) {
8537     inherit fetchurl stdenv builderDefs mesa freeglut;
8538     inherit (gnome) esound;
8539     inherit (xlibs) libXt libX11 libXmu libXi libXext;
8540   };
8542   superTuxKart = import ../games/super-tux-kart {
8543     inherit fetchurl stdenv plib SDL openal freealut mesa
8544       libvorbis libogg gettext;
8545   };
8547   teeworlds = import ../games/teeworlds {
8548     inherit fetchurl stdenv python alsaLib mesa SDL;
8549     inherit (xlibs) libX11;
8550   };
8552   tennix = import ../games/tennix {
8553     inherit stdenv fetchurl SDL SDL_mixer SDL_image SDL_ttf;
8554   };
8556   /*tpm = import ../games/thePenguinMachine {
8557     inherit stdenv fetchurl pil pygame SDL;
8558     python24 = python;
8559   };*/
8561   ultimatestunts = import ../games/ultimatestunts {
8562     inherit stdenv fetchurl SDL mesa SDL_image freealut;
8563   };
8565   urbanterror = import ../games/urbanterror {
8566     inherit fetchurl stdenv unzip SDL mesa curl openal;
8567   };
8569   ut2004demo = import ../games/ut2004demo {
8570     inherit fetchurl stdenv xlibs mesa;
8571   };
8573   warsow = import ../games/warsow {
8574     inherit stdenv fetchurl unzip pkgconfig zlib curl libvorbis SDL
8575             mesa openal;
8576     inherit (xlibs) libXxf86dga libXxf86vm libXinerama;
8577     libjpeg = libjpeg62;
8578   };
8580   xboard = builderDefsPackage (import ../games/xboard) {
8581     inherit (xlibs) libX11 xproto libXt libXaw libSM
8582       libICE libXmu libXext libXpm;
8583     inherit gnuchess texinfo;
8584   };
8586   xsokoban = builderDefsPackage (import ../games/xsokoban) {
8587     inherit (xlibs) libX11 xproto libXpm libXt;
8588   };
8590   zdoom = import ../games/zdoom {
8591     inherit cmake stdenv fetchsvn SDL nasm p7zip zlib flac fmod libjpeg;
8592   };
8594   zoom = import ../games/zoom {
8595     inherit fetchurl stdenv perl expat freetype;
8596     inherit (xlibs) xlibs;
8597   };
8599   keen4 = import ../games/keen4 {
8600     inherit fetchurl stdenv dosbox unzip;
8601   };
8604   ### DESKTOP ENVIRONMENTS
8607   enlightenment = import ../desktops/enlightenment {
8608     inherit stdenv fetchurl pkgconfig x11 xlibs dbus imlib2 freetype;
8609   };
8611   gnome28 = import ../desktops/gnome-2.28 pkgs;
8613   gnome = gnome28;
8615   kde3 = {
8617     kdelibs = import ../desktops/kde-3/kdelibs {
8618       inherit
8619         fetchurl xlibs zlib perl openssl pcre pkgconfig
8620         libjpeg libpng libtiff libxml2 libxslt libtool
8621         expat freetype bzip2 cups attr acl;
8622       stdenv = overrideGCC stdenv gcc43;
8623       qt = qt3;
8624     };
8626     kdebase = import ../desktops/kde-3/kdebase {
8627       inherit
8628         fetchurl pkgconfig x11 xlibs zlib libpng libjpeg perl
8629         kdelibs openssl bzip2 fontconfig pam hal dbus glib;
8630       stdenv = overrideGCC stdenv gcc43;
8631       qt = qt3;
8632     };
8634   };
8636   kde4 = kde43;
8638   kde43 = makeOverridable (import ../desktops/kde-4.3) (pkgs // {
8639     openexr = openexr_1_6_1;
8640     qt4 = qt45;
8641     popplerQt4 = popplerQt45;
8642   });
8643   
8644   kde44 = makeOverridable (import ../desktops/kde-4.4) (pkgs // {
8645     openexr = openexr_1_6_1;
8646     qt4 = qt46;
8647     popplerQt4 = popplerQt46;
8648     sip = sip410;
8649     pyqt4 = pyqt47;
8650   });
8651   
8653   kdelibs = kde3.kdelibs;
8654   kdebase = kde3.kdebase;
8656   ### SCIENCE
8658   xplanet = import ../applications/science/xplanet {
8659     inherit stdenv fetchurl lib pkgconfig freetype libpng libjpeg giflib libtiff;
8660     inherit (gtkLibs) pango;
8661   };
8663   ### SCIENCE/GEOMETRY
8665   drgeo = builderDefsPackage (import ../applications/science/geometry/drgeo) {
8666     inherit (gnome) libglade gtk;
8667     inherit libxml2 guile perl intltool libtool pkgconfig;
8668   };
8671   ### SCIENCE/BIOLOGY
8673   alliance = import ../applications/science/electronics/alliance {
8674     inherit fetchurl stdenv bison flex;
8675     inherit (xlibs) xproto libX11 libXt libXpm;
8676     motif = lesstif;
8677   };
8679   arb = import ../applications/science/biology/arb {
8680     inherit fetchurl readline libpng zlib x11 lesstif93 freeglut perl;
8681     inherit (xlibs) libXpm libXaw libX11 libXext libXt;
8682     inherit mesa glew libtiff lynx rxp sablotron jdk transfig gv gnuplot;
8683     lesstif = lesstif93;
8684     stdenv = overrideGCC stdenv gcc42;
8685   };
8687   biolib = import ../development/libraries/science/biology/biolib {
8688     inherit fetchurl stdenv readline perl cmake rLang zlib;
8689   };
8691   emboss = import ../applications/science/biology/emboss {
8692     inherit fetchurl stdenv readline perl libpng zlib;
8693     inherit (xorg) libX11 libXt;
8694   };
8696   mrbayes = import ../applications/science/biology/mrbayes {
8697     inherit fetchurl stdenv readline;
8698   };
8700   ncbiCTools = builderDefsPackage ../development/libraries/ncbi {
8701     inherit tcsh mesa lesstif;
8702     inherit (xlibs) libX11 libXaw xproto libXt libSM libICE
8703       libXmu libXext;
8704   };
8706   ncbi_tools = import ../applications/science/biology/ncbi-tools {
8707     inherit fetchurl stdenv cpio;
8708   };
8710   paml = import ../applications/science/biology/paml {
8711     inherit fetchurl stdenv;
8712   };
8714   /* slr = import ../applications/science/biology/slr {
8715     inherit fetchurl stdenv liblapack;
8716   }; */
8718   pal2nal = import ../applications/science/biology/pal2nal {
8719     inherit fetchurl stdenv perl paml;
8720   };
8723   ### SCIENCE/MATH
8725   atlas = import ../development/libraries/science/math/atlas {
8726     inherit fetchurl stdenv gfortran;
8727   };
8729   blas = import ../development/libraries/science/math/blas {
8730     inherit fetchurl stdenv gfortran;
8731   };
8733   content = builderDefsPackage ../applications/science/math/content {
8734     inherit mesa lesstif;
8735     inherit (xlibs) libX11 libXaw xproto libXt libSM libICE
8736       libXmu libXext libXcursor;
8737   };
8739   liblapack = import ../development/libraries/science/math/liblapack {
8740     inherit fetchurl stdenv gfortran blas;
8741   };
8744   ### SCIENCE/LOGIC
8746   coq = import ../applications/science/logic/coq {
8747     inherit stdenv fetchurl ocaml lablgtk ncurses;
8748     camlp5 = camlp5_transitional;
8749   };
8751   hol_light = import ../applications/science/logic/hol_light {
8752     inherit stdenv fetchurl ocaml_with_sources;
8753   };
8755   hol_light_binaries =
8756   import ../applications/science/logic/hol_light/binaries.nix {
8757     inherit stdenv ocaml_with_sources hol_light nettools openssh;
8758     dmtcp = dmtcp_devel;
8759   };
8761   # This is a special version of OCaml handcrafted especially for
8762   # hol_light it should be merged with the current expresion for ocaml
8763   # one day.
8764   ocaml_with_sources =
8765   import ../applications/science/logic/hol_light/ocaml-with-sources.nix {
8766     inherit stdenv fetchurl;
8767   };
8769   isabelle = import ../applications/science/logic/isabelle {
8770     inherit (pkgs) stdenv fetchurl nettools perl polyml emacs emacsPackages;
8771   };
8773   ssreflect = import ../applications/science/logic/ssreflect {
8774     inherit stdenv fetchurl ocaml coq;
8775     camlp5 = camlp5_transitional;
8776   };
8778   ### SCIENCE / ELECTRONICS
8780   ngspice = import ../applications/science/electronics/ngspice {
8781     inherit fetchurl stdenv readline;
8782   };
8784   gtkwave = import ../applications/science/electronics/gtkwave {
8785     inherit fetchurl stdenv gperf pkgconfig bzip2;
8786     inherit (gtkLibs) gtk;
8787   };
8789   ### SCIENCE / MATH
8791   maxima = import ../applications/science/math/maxima {
8792     inherit fetchurl stdenv clisp;
8793   };
8795   wxmaxima = import ../applications/science/math/wxmaxima {
8796     inherit fetchurl stdenv maxima;
8797     inherit wxGTK;
8798   };
8800   scilab = (import ../applications/science/math/scilab) {
8801     inherit stdenv fetchurl lib gfortran;
8802     inherit (gtkLibs) gtk;
8803     inherit ncurses Xaw3d tcl tk ocaml x11;
8805     withXaw3d = false;
8806     withTk = true;
8807     withGtk = false;
8808     withOCaml = true;
8809     withX = true;
8810   };
8813   ### MISC
8815   atari800 = import ../misc/emulators/atari800 {
8816     inherit fetchurl stdenv unzip zlib SDL;
8817   };
8819   ataripp = import ../misc/emulators/atari++ {
8820     inherit fetchurl stdenv x11 SDL;
8821   };
8823   auctex = import ../misc/tex/auctex {
8824     inherit stdenv fetchurl emacs texLive;
8825   };
8827   busybox = import ../misc/busybox {
8828     inherit fetchurl stdenv;
8829   };
8831   cups = import ../misc/cups {
8832     inherit fetchurl stdenv pkgconfig zlib libjpeg libpng libtiff pam openssl dbus;
8833   };
8835   gutenprint = import ../misc/drivers/gutenprint {
8836     inherit fetchurl stdenv lib pkgconfig composableDerivation cups libtiff libpng
8837       openssl git gimp;
8838   };
8840   gutenprintBin = import ../misc/drivers/gutenprint/bin.nix {
8841     inherit fetchurl stdenv rpm cpio zlib;
8842   };
8844   cupsBjnp = import ../misc/cups/drivers/cups-bnjp {
8845     inherit fetchurl stdenv cups;
8846   };
8848   dblatex = import ../misc/tex/dblatex {
8849     inherit fetchurl stdenv python libxslt tetex;
8850   };
8852   dosbox = import ../misc/emulators/dosbox {
8853     inherit fetchurl stdenv SDL makeDesktopItem;
8854   };
8856   dpkg = import ../tools/package-management/dpkg {
8857     inherit fetchurl stdenv perl zlib bzip2;
8858   };
8860   electricsheep = import ../misc/screensavers/electricsheep {
8861     inherit fetchurl stdenv pkgconfig expat zlib libpng libjpeg xlibs;
8862   };
8864   foldingathome = import ../misc/foldingathome {
8865     inherit fetchurl stdenv;
8866   };
8868   freestyle = import ../misc/freestyle {
8869     inherit fetchurl freeglut qt4 libpng lib3ds libQGLViewer swig;
8870     inherit (xlibs) libXi;
8871     #stdenv = overrideGCC stdenv gcc41;
8872     inherit stdenv python;
8873   };
8875   gajim = builderDefsPackage (import ../applications/networking/instant-messengers/gajim) {
8876     inherit perl intltool pyGtkGlade gettext pkgconfig makeWrapper pygobject
8877       pyopenssl gtkspell libsexy pycrypto aspell pythonDBus pythonSexy
8878       docutils;
8879     dbus = dbus.libs;
8880     inherit (gnome) gtk libglade;
8881     inherit (xlibs) libXScrnSaver libXt xproto libXext xextproto libX11
8882       scrnsaverproto;
8883     python = pythonFull;
8884   };
8886   generator = import ../misc/emulators/generator {
8887     inherit fetchurl stdenv SDL nasm zlib bzip2 libjpeg;
8888     inherit (gtkLibs1x) gtk;
8889   };
8891   ghostscript = makeOverridable (import ../misc/ghostscript) {
8892     inherit fetchurl stdenv libjpeg libpng libtiff zlib x11 pkgconfig
8893       fontconfig cups openssl;
8894     x11Support = false;
8895     cupsSupport = getPkgConfig "ghostscript" "cups" true;
8896   };
8898   ghostscriptX = lowPrio (appendToName "with-X" (ghostscript.override {
8899     x11Support = true;
8900   }));
8902   gxemul = (import ../misc/gxemul) {
8903     inherit lib stdenv fetchurl composableDerivation;
8904     inherit (xlibs) libX11;
8905   };
8907   # using the new configuration style proposal which is unstable
8908   jackaudio = import ../misc/jackaudio {
8909     inherit composableDerivation
8910            ncurses lib stdenv fetchurl alsaLib pkgconfig;
8911     flags = [ "posix_shm" "timestamps" "alsa"];
8912   };
8914   keynav = import ../tools/X11/keynav {
8915     inherit stdenv fetchurl;
8916     inherit (xlibs) libX11 xextproto libXtst imake libXi libXext;
8917   };
8919   lazylist = import ../misc/tex/lazylist {
8920     inherit fetchurl stdenv tetex;
8921   };
8923   lilypond = import ../misc/lilypond {
8924     inherit fetchurl sourceFromHead stdenv lib automake autoconf
8925       ghostscript texinfo imagemagick texi2html guile python gettext
8926       perl bison pkgconfig texLive fontconfig freetype fontforge help2man;
8927     inherit (gtkLibs) pango;
8928     flex = flex2535;
8929   };
8931   linuxwacom = import ../misc/linuxwacom {
8932     inherit fetchurl stdenv ncurses pkgconfig;
8933     inherit (xorg) libX11 libXi xproto inputproto xorgserver;
8934   };
8936   martyr = import ../development/libraries/martyr {
8937     inherit stdenv fetchurl apacheAnt;
8938   };
8940   maven = import ../misc/maven/maven-1.0.nix {
8941     inherit stdenv fetchurl jdk;
8942   };
8944   maven2 = import ../misc/maven {
8945     inherit stdenv fetchurl jdk makeWrapper;
8946   };
8948   nix = makeOverridable (import ../tools/package-management/nix) {
8949     inherit fetchurl stdenv perl curl bzip2 openssl;
8950     aterm = aterm242fixes;
8951     storeDir = getPkgConfig "nix" "storeDir" "/nix/store";
8952     stateDir = getPkgConfig "nix" "stateDir" "/nix/var";
8953   };
8955   # The bleeding edge.
8956   nixUnstable = nix;
8957   /*
8958   nixUnstable = makeOverridable (import ../tools/package-management/nix/unstable.nix) {
8959     inherit fetchurl stdenv perl curl bzip2 openssl;
8960     aterm = aterm242fixes;
8961     storeDir = getPkgConfig "nix" "storeDir" "/nix/store";
8962     stateDir = getPkgConfig "nix" "stateDir" "/nix/var";
8963   };
8964   */
8966   nixCustomFun = src: preConfigure: enableScripts: configureFlags:
8967     import ../tools/package-management/nix/custom.nix {
8968       inherit fetchurl stdenv perl curl bzip2 openssl src preConfigure automake
8969         autoconf libtool configureFlags enableScripts lib bison libxml2;
8970       flex = flex2533;
8971       aterm = aterm25;
8972       db4 = db45;
8973       inherit docbook5_xsl libxslt docbook5 docbook_xml_dtd_43 w3m;
8974     };
8976   disnix = import ../tools/package-management/disnix {
8977     inherit stdenv fetchsvn openssl autoconf automake libtool pkgconfig dbus_glib libxml2;
8978   };
8980   disnix_activation_scripts = import ../tools/package-management/disnix/activation-scripts {
8981     inherit stdenv fetchsvn autoconf automake;
8982   };
8984   DisnixService = import ../tools/package-management/disnix/DisnixService {
8985     inherit stdenv fetchsvn apacheAnt jdk axis2 shebangfix;
8986   };
8988   latex2html = import ../misc/tex/latex2html/default.nix {
8989     inherit fetchurl stdenv perl ghostscript netpbm;
8990     tex = tetex;
8991   };
8993   pgadmin = import ../applications/misc/pgadmin {
8994     inherit fetchurl stdenv postgresql libxml2 libxslt openssl;
8995     inherit wxGTK;
8996   };
8998   pgf = pgf2;
9000   # Keep the old PGF since some documents don't render properly with
9001   # the new one.
9002   pgf1 = import ../misc/tex/pgf/1.x.nix {
9003     inherit fetchurl stdenv;
9004   };
9006   pgf2 = import ../misc/tex/pgf/2.x.nix {
9007     inherit fetchurl stdenv;
9008   };
9010   polytable = import ../misc/tex/polytable {
9011     inherit fetchurl stdenv tetex lazylist;
9012   };
9014   psi = (import ../applications/networking/instant-messengers/psi) {
9015     inherit stdenv fetchurl zlib aspell sox qt4;
9016     inherit (xlibs) xproto libX11 libSM libICE;
9017     qca2 = kde4.qca2;
9018   };
9020   putty = import ../applications/networking/remote/putty {
9021     inherit stdenv fetchurl ncurses;
9022     inherit (gtkLibs1x) gtk;
9023   };
9025   rssglx = import ../misc/screensavers/rss-glx {
9026     inherit fetchurl stdenv x11 mesa pkgconfig imagemagick libtiff bzip2;
9027   };
9029   xlockmore = import ../misc/screensavers/xlockmore {
9030     inherit fetchurl stdenv x11 freetype;
9031     pam = if getPkgConfig "xlockmore" "pam" true then pam else null;
9032   };
9034   saneBackends = import ../misc/sane-backends {
9035     inherit fetchurl stdenv libusb;
9036     gt68xxFirmware = getConfig ["sane" "gt68xxFirmware"] null;
9037   };
9039   saneFrontends = import ../misc/sane-front {
9040     inherit fetchurl stdenv pkgconfig libusb saneBackends;
9041     inherit (gtkLibs) gtk;
9042     inherit (xlibs) libX11;
9043   };
9045   sourceAndTags = import ../misc/source-and-tags {
9046     inherit pkgs stdenv unzip lib ctags;
9047     hasktags = haskellPackages.myhasktags;
9048   };
9050   synaptics = import ../misc/synaptics {
9051     inherit fetchurl stdenv pkgconfig;
9052     inherit (xlibs) libX11 libXi libXext pixman xf86inputevdev;
9053     inherit (xorg) xorgserver;
9054   };
9056   tetex = import ../misc/tex/tetex {
9057     inherit fetchurl stdenv flex bison zlib libpng ncurses ed;
9058   };
9060   tex4ht = import ../misc/tex/tex4ht {
9061     inherit fetchurl stdenv tetex;
9062   };
9064   texFunctions = import ../misc/tex/nix {
9065     inherit stdenv perl tetex graphviz ghostscript makeFontsConf imagemagick runCommand lib;
9066     inherit (haskellPackages) lhs2tex;
9067   };
9069   texLive = builderDefsPackage (import ../misc/tex/texlive) {
9070     inherit builderDefs zlib bzip2 ncurses libpng ed
9071       gd t1lib freetype icu perl ruby expat curl
9072       libjpeg bison python fontconfig;
9073     inherit (xlibs) libXaw libX11 xproto libXt libXpm
9074       libXmu libXext xextproto libSM libICE;
9075     flex = flex2535;
9076     ghostscript = ghostscriptX;
9077   };
9079   /* Look in configurations/misc/raskin.nix for usage example (around revisions
9080   where TeXLive was added)
9082   (texLiveAggregationFun {
9083     paths = [texLive texLiveExtra texLiveCMSuper
9084       texLiveBeamer
9085     ];
9086   })
9088   You need to use texLiveAggregationFun to regenerate, say, ls-R (TeX-related file list)
9089   Just installing a few packages doesn't work.
9090   */
9091   texLiveAggregationFun =
9092     (builderDefsPackage (import ../misc/tex/texlive/aggregate.nix));
9094   texLiveContext = builderDefsPackage (import ../misc/tex/texlive/context.nix) {
9095     inherit texLive;
9096   };
9098   texLiveExtra = builderDefsPackage (import ../misc/tex/texlive/extra.nix) {
9099     inherit texLive;
9100   };
9102   texLiveCMSuper = builderDefsPackage (import ../misc/tex/texlive/cm-super.nix) {
9103     inherit texLive;
9104   };
9106   texLiveLatexXColor = builderDefsPackage (import ../misc/tex/texlive/xcolor.nix) {
9107     inherit texLive;
9108   };
9110   texLivePGF = builderDefsPackage (import ../misc/tex/texlive/pgf.nix) {
9111     inherit texLiveLatexXColor texLive;
9112   };
9114   texLiveBeamer = builderDefsPackage (import ../misc/tex/texlive/beamer.nix) {
9115     inherit texLiveLatexXColor texLivePGF texLive;
9116   };
9118   toolbuslib = import ../development/libraries/toolbuslib {
9119     inherit stdenv fetchurl aterm;
9120   };
9122   trac = import ../misc/trac {
9123     inherit stdenv fetchurl python clearsilver makeWrapper
9124       sqlite subversion;
9125     inherit (pythonPackages) pysqlite;
9126   };
9128    vice = import ../misc/emulators/vice {
9129      inherit stdenv fetchurl lib perl gettext libpng giflib libjpeg alsaLib readline mesa;
9130      inherit pkgconfig SDL makeDesktopItem autoconf automake;
9131      inherit (gtkLibs) gtk;
9132    };
9134   wine =
9135     if system == "x86_64-linux" then
9136       # Can't build this in 64-bit; use a 32-bit build instead.
9137       pkgsi686Linux.wine
9138       # some hackery to make nix-env show this package on x86_64...
9139       // {system = "x86_64-linux";}
9140     else
9141       import ../misc/emulators/wine {
9142         inherit fetchurl stdenv bison mesa ncurses
9143           libpng libjpeg alsaLib lcms xlibs freetype
9144           fontconfig fontforge libxml2 libxslt openssl;
9145         flex = flex2535;
9146       };
9148   xosd = import ../misc/xosd {
9149     inherit fetchurl stdenv;
9150     inherit (xlibs) libX11 libXext libXt xextproto xproto;
9151   };
9153   xsane = import ../misc/xsane {
9154     inherit fetchurl stdenv pkgconfig libusb
9155       saneBackends saneFrontends;
9156     inherit (gtkLibs) gtk;
9157     inherit (xlibs) libX11;
9158   };
9160   yafc = import ../applications/networking/yafc {
9161     inherit fetchurl stdenv readline openssh;
9162   };
9164   myEnvFun = import ../misc/my-env {
9165     inherit substituteAll pkgs;
9166     inherit (stdenv) mkDerivation;
9167   };
9169   misc = import ../misc/misc.nix { inherit pkgs stdenv; };
9171 }; in pkgs