Fix bugs and improve pkgs/servers/openafs-client
[nixpkgs-libre.git] / pkgs / top-level / all-packages.nix
blob999be126505de93bbaa36de539b1b2232b2cc49e
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
39 let config_ = config; in # rename the function argument
41 let
43   lib = import ../lib; # see also libTests below
45   # The contents of the configuration file found at $NIXPKGS_CONFIG or
46   # $HOME/.nixpkgs/config.nix.
47   # for NIXOS (nixos-rebuild): use nixpkgs.config option
48   config =
49     let
50       toPath = builtins.toPath;
51       getEnv = x: if builtins ? getEnv then builtins.getEnv x else "";
52       pathExists = name:
53         builtins ? pathExists && builtins.pathExists (toPath name);
55       configFile = getEnv "NIXPKGS_CONFIG";
56       homeDir = getEnv "HOME";
57       configFile2 = homeDir + "/.nixpkgs/config.nix";
59       configExpr =
60         if config_ != null then config_
61         else if configFile != "" && pathExists configFile then import (toPath configFile)
62         else if homeDir != "" && pathExists configFile2 then import (toPath configFile2)
63         else {};
65     in
66       # allow both:
67       # { /* the config */ } and
68       # { pkgsOrig, pkgs, ... } : { /* the config */ }
69       if builtins.isFunction configExpr
70         then configExpr { inherit pkgs pkgsOrig; }
71         else configExpr;
73   # Return an attribute from the Nixpkgs configuration file, or
74   # a default value if the attribute doesn't exist.
75   getConfig = attrPath: default: lib.attrByPath attrPath default config;
78   # Helper functions that are exported through `pkgs'.
79   helperFunctions =
80     stdenvAdapters //
81     (import ../build-support/trivial-builders.nix { inherit (pkgs) stdenv; inherit (pkgs.xorg) lndir; });
83   stdenvAdapters =
84     import ../stdenv/adapters.nix { inherit (pkgs) dietlibc fetchurl runCommand; };
87   # Allow packages to be overriden globally via the `packageOverrides'
88   # configuration option, which must be a function that takes `pkgs'
89   # as an argument and returns a set of new or overriden packages.
90   # `__overrides' is a magic attribute that causes the attributes in
91   # its value to be added to the surrounding `rec'.  The
92   # `packageOverrides' function is called with the *original*
93   # (un-overriden) set of packages, allowing packageOverrides
94   # attributes to refer to the original attributes (e.g. "foo =
95   # ... pkgs.foo ...").
96   __overrides = (getConfig ["packageOverrides"] (pkgs: {})) pkgsOrig;
98   pkgsOrig = pkgsFun {}; # the un-overriden packages, passed to packageOverrides
99   pkgsOverriden = pkgsFun __overrides; # the overriden, final packages
100   pkgs = pkgsOverriden // helperFunctions;
103   # The package compositions.  Yes, this isn't properly indented.
104   pkgsFun = __overrides: with helperFunctions; rec {
106   # override system. This is useful to build i686 packages on x86_64-linux
107   forceSystem = system: (import ./all-packages.nix) {
108     inherit system;
109     inherit bootStdenv noSysDirs gccWithCC gccWithProfiling config;
110   };
112   # used by wine, firefox with debugging version of Flash, ..
113   pkgsi686Linux = forceSystem "i686-linux";
115   inherit __overrides;
118   # For convenience, allow callers to get the path to Nixpkgs.
119   path = ../..;
122   ### Symbolic names.
125   x11 = xlibsWrapper;
127   # `xlibs' is the set of X library components.  This used to be the
128   # old modular X libraries project (called `xlibs') but now it's just
129   # the set of packages in the modular X.org tree (which also includes
130   # non-library components like the server, drivers, fonts, etc.).
131   xlibs = xorg // {xlibs = xlibsWrapper;};
134   ### Helper functions.
137   inherit lib config getConfig stdenvAdapters;
139   inherit (lib) lowPrio appendToName makeOverridable;
141   # Applying this to an attribute set will cause nix-env to look
142   # inside the set for derivations.
143   recurseIntoAttrs = attrs: attrs // {recurseForDerivations = true;};
145   useFromStdenv = it : alternative : if (builtins.hasAttr it stdenv) then
146     (builtins.getAttr it stdenv) else alternative;
148   # Return the first available value in the order: pkg.val, val, or default.
149   getPkgConfig = pkg : val : default : (getConfig [ pkg val ] (getConfig [ val ] default));
151   # Check absence of non-used options
152   checker = x: flag: opts: config:
153     (if flag then let result=(
154       (import ../build-support/checker)
155       opts config); in
156       (if (result=="") then x else
157       abort ("Unknown option specified: " + result))
158     else x);
160   builderDefs = composedArgsAndFun (import ../build-support/builder-defs/builder-defs.nix) {
161     inherit stringsWithDeps lib stdenv writeScript
162       fetchurl fetchmtn fetchgit;
163   };
165   composedArgsAndFun = lib.composedArgsAndFun;
167   builderDefsPackage = builderDefs.builderDefsPackage builderDefs;
169   stringsWithDeps = lib.stringsWithDeps;
172   ### STANDARD ENVIRONMENT
175   allStdenvs = import ../stdenv {
176     inherit system stdenvType;
177     allPackages = args: import ./all-packages.nix ({ inherit config; } // args);
178   };
180   defaultStdenv = allStdenvs.stdenv;
182   stdenv =
183     if bootStdenv != null then bootStdenv else
184       let changer = getConfig ["replaceStdenv"] null;
185       in if changer != null then
186         changer {
187           stdenv = defaultStdenv;
188           overrideSetup = overrideSetup;
189         }
190       else defaultStdenv;
192   # A stdenv capable of building 32-bit binaries.  On x86_64-linux,
193   # it uses GCC compiled with multilib support; on i686-linux, it's
194   # just the plain stdenv.
195   stdenv_32bit =
196     if system == "x86_64-linux" then
197       overrideGCC stdenv gcc43_multi
198     else
199       stdenv;
202   ### BUILD SUPPORT
204   attrSetToDir = arg : import ../build-support/upstream-updater/attrset-to-dir.nix {
205     inherit writeTextFile stdenv lib;
206     theAttrSet = arg;
207   };
209   buildEnv = import ../build-support/buildenv {
210     inherit stdenv perl;
211   };
213   debPackage = {
214     debBuild = lib.sumTwoArgs(import ../build-support/deb-package) {
215       inherit builderDefs;
216     };
217     inherit fetchurl stdenv;
218   };
220   fetchbzr = import ../build-support/fetchbzr {
221     inherit stdenv bazaar;
222   };
224   fetchcvs = import ../build-support/fetchcvs {
225     inherit stdenv cvs;
226   };
228   fetchdarcs = import ../build-support/fetchdarcs {
229     inherit stdenv darcs nix;
230   };
232   fetchgit = import ../build-support/fetchgit {
233     inherit stdenv git;
234   };
236   fetchmtn = import ../build-support/fetchmtn {
237     inherit monotone stdenv;
238     cacheDB = getConfig ["fetchmtn" "cacheDB"] "";
239     defaultDBMirrors = getConfig ["fetchmtn" "defaultDBMirrors"] [];
240   };
242   fetchsvn = import ../build-support/fetchsvn {
243     inherit stdenv subversion openssh;
244     sshSupport = true;
245   };
247   fetchsvnssh = import ../build-support/fetchsvnssh {
248     inherit stdenv subversion openssh expect;
249     sshSupport = true;
250   };
252   fetchhg = import ../build-support/fetchhg {
253     inherit stdenv mercurial nix;
254   };
256   # `fetchurl' downloads a file from the network.  The `useFromStdenv'
257   # is there to allow stdenv to determine fetchurl.  Used during the
258   # stdenv-linux bootstrap phases to prevent lots of different curls
259   # from being built.
260   fetchurl = useFromStdenv "fetchurl"
261     (import ../build-support/fetchurl {
262       inherit curl stdenv;
263     });
265   # fetchurlBoot is used for curl and its dependencies in order to
266   # prevent a cyclic dependency (curl depends on curl.tar.bz2,
267   # curl.tar.bz2 depends on fetchurl, fetchurl depends on curl).  It
268   # uses the curl from the previous bootstrap phase (e.g. a statically
269   # linked curl in the case of stdenv-linux).
270   fetchurlBoot = stdenv.fetchurlBoot;
272   resolveMirrorURLs = {url}: fetchurl {
273     showURLs = true;
274     inherit url;
275   };
277   makeDesktopItem = import ../build-support/make-desktopitem {
278     inherit stdenv;
279   };
281   makeInitrd = {contents}: import ../build-support/kernel/make-initrd.nix {
282     inherit stdenv perl cpio contents;
283   };
285   makeWrapper = makeSetupHook ../build-support/make-wrapper/make-wrapper.sh;
287   makeModulesClosure = {kernel, rootModules, allowMissing ? false}:
288     import ../build-support/kernel/modules-closure.nix {
289       inherit stdenv module_init_tools kernel nukeReferences
290         rootModules allowMissing;
291     };
293   pathsFromGraph = ../build-support/kernel/paths-from-graph.pl;
295   srcOnly = args: (import ../build-support/src-only) ({inherit stdenv; } // args);
297   substituteAll = import ../build-support/substitute/substitute-all.nix {
298     inherit stdenv;
299   };
301   nukeReferences = import ../build-support/nuke-references/default.nix {
302     inherit stdenv;
303   };
305   vmTools = import ../build-support/vm/default.nix {
306     inherit pkgs;
307   };
309   releaseTools = import ../build-support/release/default.nix {
310     inherit pkgs;
311   };
313   composableDerivation = (import ../lib/composable-derivation.nix) {
314     inherit pkgs lib;
315   };
318   ### TOOLS
320   acct = import ../tools/system/acct {
321     inherit fetchurl stdenv;
322   };
324   aefs = import ../tools/filesystems/aefs {
325     inherit fetchurl stdenv fuse;
326   };
328   aircrackng = import ../tools/networking/aircrack-ng {
329     inherit fetchurl stdenv libpcap openssl zlib wirelesstools;
330   };
332   ec2apitools = import ../tools/virtualization/amazon-ec2-api-tools {
333     inherit stdenv fetchurl unzip makeWrapper jre;
334   };
336   ec2amitools = import ../tools/virtualization/amazon-ec2-ami-tools {
337     inherit stdenv fetchurl unzip makeWrapper ruby openssl;
338   };
340   amule = import ../tools/networking/p2p/amule {
341     inherit fetchurl stdenv zlib perl cryptopp gettext libupnp makeWrapper;
342     inherit wxGTK;
343   };
345   aria = builderDefsPackage (import ../tools/networking/aria) {
346   };
348   at = import ../tools/system/at {
349     inherit fetchurl stdenv bison flex pam ssmtp;
350   };
352   autogen = import ../development/tools/misc/autogen {
353     inherit fetchurl stdenv guile which;
354   };
356   autojump = import ../tools/misc/autojump {
357     inherit fetchurl stdenv python;
358   };
360   avahi =
361     let qt4Support = getConfig [ "avahi" "qt4Support" ] false;
362     in
363       makeOverridable (import ../development/libraries/avahi) {
364         inherit stdenv fetchurl pkgconfig libdaemon dbus perl perlXMLParser
365           expat gettext intltool lib;
366         inherit (gtkLibs) glib gtk;
367         inherit qt4Support;
368         qt4 = if qt4Support then qt4 else null;
369       };
371   axel = import ../tools/networking/axel {
372     inherit fetchurl stdenv;
373   };
375   azureus = import ../tools/networking/p2p/azureus {
376     inherit fetchurl stdenv jdk swt;
377   };
379   bc = import ../tools/misc/bc {
380     inherit fetchurl stdenv flex readline;
381   };
383   bfr = import ../tools/misc/bfr {
384     inherit fetchurl stdenv perl;
385   };
387   bootchart = import ../tools/system/bootchart {
388     inherit fetchurl stdenv gnutar gzip coreutils utillinux gnugrep gnused psmisc nettools;
389   };
391   btrfsProgs = builderDefsPackage (import ../tools/filesystems/btrfsprogs) {
392     inherit libuuid zlib acl;
393   };
395   eggdrop = import ../tools/networking/eggdrop {
396     inherit fetchurl stdenv tcl;
397   };
399   mcrl = import ../tools/misc/mcrl {
400     inherit fetchurl stdenv coreutils;
401   };
403   mcrl2 = import ../tools/misc/mcrl2 {
404     inherit fetchurl stdenv mesa ;
405     inherit (xorg) libX11;
406     inherit wxGTK;
407   };
409   syslogng = import ../tools/misc/syslog-ng {
410     inherit fetchurl stdenv eventlog pkgconfig glib;
411   };
413   asciidoc = import ../tools/typesetting/asciidoc {
414     inherit fetchurl stdenv python;
415   };
417   bibtextools = import ../tools/typesetting/bibtex-tools {
418     inherit fetchurl stdenv aterm tetex hevea;
419     inherit (strategoPackages016) strategoxt sdf;
420   };
422   bittorrent = import ../tools/networking/p2p/bittorrent {
423     inherit fetchurl stdenv makeWrapper python pycrypto twisted;
424     wxPython = wxPython26;
425     gui = true;
426   };
428   bittornado = import ../tools/networking/p2p/bit-tornado {
429     inherit fetchurl stdenv python wxPython26;
430   };
432   bmrsa = builderDefsPackage (import ../tools/security/bmrsa/11.nix) {
433     inherit unzip;
434   };
436   bogofilter = import ../tools/misc/bogofilter {
437     inherit fetchurl stdenv flex;
438     bdb = db4;
439   };
441   bsdiff = import ../tools/compression/bsdiff {
442     inherit fetchurl stdenv;
443   };
445   bzip2 = useFromStdenv "bzip2"
446     (import ../tools/compression/bzip2 {
447       inherit fetchurl stdenv;
448     });
450   cabextract = import ../tools/archivers/cabextract {
451     inherit fetchurl stdenv;
452   };
454   ccid = import ../tools/security/ccid {
455     inherit fetchurl stdenv pcsclite libusb pkgconfig perl;
456   };
458   ccrypt = import ../tools/security/ccrypt {
459     inherit fetchurl stdenv;
460   };
462   cdecl = import ../development/tools/cdecl {
463     inherit fetchurl stdenv yacc flex readline ncurses;
464   };
466   cdrdao = import ../tools/cd-dvd/cdrdao {
467     inherit fetchurl stdenv lame libvorbis libmad pkgconfig libao;
468   };
470   cdrkit = import ../tools/cd-dvd/cdrkit {
471     inherit fetchurl stdenv cmake libcap zlib bzip2;
472   };
474   checkinstall = import ../tools/package-management/checkinstall {
475     inherit fetchurl stdenv gettext;
476   };
478   cheetahTemplate = builderDefsPackage (import ../tools/text/cheetah-template/2.0.1.nix) {
479     inherit makeWrapper python;
480   };
482   chkrootkit = import ../tools/security/chkrootkit {
483     inherit fetchurl stdenv;
484   };
486   cksfv = import ../tools/networking/cksfv {
487     inherit fetchurl stdenv;
488   };
490   convertlit = import ../tools/text/convertlit {
491     inherit fetchurl stdenv unzip libtommath;
492   };
494   unifdef = import ../development/tools/misc/unifdef {
495     inherit fetchurl stdenv;
496   };
498   cloogppl = import ../development/libraries/cloog-ppl {
499     inherit fetchurl stdenv ppl;
500   };
502   coreutils = useFromStdenv "coreutils"
503     (makeOverridable (if stdenv ? isDietLibC
504       then import ../tools/misc/coreutils-5
505       else import ../tools/misc/coreutils)
506     {
507       inherit fetchurl stdenv acl;
508       aclSupport = stdenv.isLinux;
509     });
511   cpio = import ../tools/archivers/cpio {
512     inherit fetchurl stdenv;
513   };
515   cromfs = import ../tools/archivers/cromfs {
516     inherit fetchurl stdenv pkgconfig fuse perl;
517   };
519   cron = import ../tools/system/cron { # see also fcron
520     inherit fetchurl stdenv;
521   };
523   curl = import ../tools/networking/curl {
524     fetchurl = fetchurlBoot;
525     inherit stdenv zlib openssl;
526     zlibSupport = ! ((stdenv ? isDietLibC) || (stdenv ? isStatic));
527     sslSupport = ! ((stdenv ? isDietLibC) || (stdenv ? isStatic));
528   };
530   curlftpfs = import ../tools/filesystems/curlftpfs {
531     inherit fetchurl stdenv fuse curl pkgconfig zlib glib;
532   };
534   dadadodo = builderDefsPackage (import ../tools/text/dadadodo) {
535   };
537   dar = import ../tools/archivers/dar {
538     inherit fetchurl stdenv zlib bzip2 openssl;
539   };
541   davfs2 = import ../tools/filesystems/davfs2 {
542     inherit fetchurl stdenv zlib;
543     neon = neon028;
544   };
546   dcraw = import ../tools/graphics/dcraw {
547     inherit fetchurl stdenv gettext libjpeg lcms;
548   };
550   debootstrap = import ../tools/misc/debootstrap {
551     inherit fetchurl stdenv lib dpkg gettext gawk wget perl;
552   };
554   ddclient = import ../tools/networking/ddclient {
555     inherit fetchurl buildPerlPackage perl;
556   };
558   ddrescue = import ../tools/system/ddrescue {
559     inherit fetchurl stdenv;
560   };
562   desktop_file_utils = import ../tools/misc/desktop-file-utils {
563     inherit stdenv fetchurl pkgconfig glib;
564   };
566   dev86 = import ../development/compilers/dev86 {
567     inherit fetchurl stdenv;
568   };
570   dnsmasq = import ../tools/networking/dnsmasq {
571     # TODO i18n can be installed as well, implement it?
572     inherit fetchurl stdenv;
573   };
575   dhcp = import ../tools/networking/dhcp {
576     inherit fetchurl stdenv nettools iputils iproute makeWrapper;
577   };
579   dhcpcd = import ../tools/networking/dhcpcd {
580     inherit fetchurl stdenv;
581   };
583   diffstat = import ../tools/text/diffstat {
584     inherit fetchurl stdenv;
585   };
587   diffutils = useFromStdenv "diffutils"
588     (import ../tools/text/diffutils {
589       inherit fetchurl stdenv coreutils;
590     });
592   docbook2x = import ../tools/typesetting/docbook2x {
593     inherit fetchurl stdenv texinfo perl
594             gnused groff libxml2 libxslt makeWrapper;
595     inherit (perlPackages) XMLSAX XMLParser XMLNamespaceSupport;
596     libiconv = if stdenv.isDarwin then libiconv else null;
597   };
599   dosfstools = composedArgsAndFun (import ../tools/filesystems/dosfstools) {
600     inherit builderDefs;
601   };
603   dvdplusrwtools = import ../tools/cd-dvd/dvd+rw-tools {
604     inherit fetchurl stdenv cdrkit m4;
605   };
607   e2fsprogs = import ../tools/filesystems/e2fsprogs {
608     inherit fetchurl stdenv pkgconfig libuuid;
609   };
611   ecryptfs = import ../tools/security/ecryptfs {
612     inherit fetchurl stdenv fuse python perl keyutils pam nss nspr;
613   };
615   enblendenfuse = import ../tools/graphics/enblend-enfuse {
616     inherit fetchurl stdenv libtiff libpng lcms libxmi boost;
617   };
619   enscript = import ../tools/text/enscript {
620     inherit fetchurl stdenv gettext;
621   };
623   eprover = composedArgsAndFun (import ../tools/misc/eProver) {
624     inherit fetchurl stdenv which;
625     texLive = texLiveAggregationFun {
626       paths = [
627         texLive texLiveExtra
628       ];
629     };
630   };
632   ethtool = import ../tools/misc/ethtool {
633     inherit fetchurl stdenv;
634   };
636   exif = import ../tools/graphics/exif {
637     inherit fetchurl stdenv pkgconfig libexif popt;
638   };
640   exiftags = import ../tools/graphics/exiftags {
641     inherit stdenv fetchurl;
642   };
644   expect = import ../tools/misc/expect {
645     inherit fetchurl stdenv tcl tk autoconf;
646     inherit (xorg) xproto libX11;
647   };
649   fcron = import ../tools/system/fcron { # see also cron
650     inherit fetchurl stdenv perl;
651   };
653   fdisk = import ../tools/system/fdisk {
654     inherit fetchurl stdenv parted libuuid gettext;
655   };
657   figlet = import ../tools/misc/figlet {
658     inherit fetchurl stdenv;
659   };
661   file = import ../tools/misc/file {
662     inherit fetchurl stdenv;
663   };
665   filelight = import ../tools/system/filelight {
666     inherit fetchurl stdenv kdelibs x11 zlib perl libpng;
667     qt = qt3;
668   };
670   findutils = useFromStdenv "findutils"
671     (if stdenv.isDarwin then findutils4227 else
672       import ../tools/misc/findutils {
673         inherit fetchurl stdenv coreutils;
674       }
675     );
677   findutils4227 = import ../tools/misc/findutils/4.2.27.nix {
678     inherit fetchurl stdenv coreutils;
679   };
681   findutilsWrapper = lowPrio (appendToName "wrapper" (import ../tools/misc/findutils-wrapper {
682     inherit stdenv findutils;
683   }));
685   finger_bsd = import ../tools/networking/bsd-finger {
686     inherit fetchurl stdenv;
687   };
689   fontforge = import ../tools/misc/fontforge {
690     inherit fetchurl stdenv gettext freetype zlib
691       libungif libpng libjpeg libtiff libxml2 lib;
692   };
694   fontforgeX = import ../tools/misc/fontforge {
695     inherit fetchurl stdenv gettext freetype zlib
696       libungif libpng libjpeg libtiff libxml2 lib;
697     inherit (xlibs) libX11 xproto libXt;
698   };
700   dos2unix = import ../tools/text/dos2unix {
701       inherit fetchurl stdenv;
702   };
704   unix2dos = import ../tools/text/unix2dos {
705       inherit fetchurl stdenv;
706   };
708   gawk = useFromStdenv "gawk"
709     (import ../tools/text/gawk {
710       inherit fetchurl stdenv;
711     });
713   gdmap = composedArgsAndFun (import ../tools/system/gdmap/0.8.1.nix) {
714     inherit stdenv fetchurl builderDefs pkgconfig libxml2 intltool
715       gettext;
716     inherit (gtkLibs) gtk;
717   };
719   genext2fs = import ../tools/filesystems/genext2fs {
720     inherit fetchurl stdenv;
721   };
723   gengetopt = import ../development/tools/misc/gengetopt {
724     inherit fetchurl stdenv;
725   };
727   getopt = import ../tools/misc/getopt {
728     inherit fetchurl stdenv;
729   };
731   gftp = import ../tools/networking/gftp {
732     inherit lib fetchurl stdenv;
733     inherit readline ncurses gettext openssl pkgconfig;
734     inherit (gtkLibs) glib gtk;
735   };
737   gifsicle = import ../tools/graphics/gifscile {
738     inherit fetchurl stdenv;
739     inherit (xlibs) xproto libXt libX11;
740   };
742   glusterfs = builderDefsPackage ../tools/filesystems/glusterfs {
743     inherit fuse;
744     bison = bison24;
745     flex = flex2535;
746   };
748   glxinfo = import ../tools/graphics/glxinfo {
749     inherit fetchurl stdenv x11 mesa;
750   };
752   gnokii = builderDefsPackage (import ../tools/misc/gnokii) {
753     inherit intltool perl gettext libusb;
754   };
756   gnugrep = useFromStdenv "gnugrep"
757     (import ../tools/text/gnugrep {
758       inherit fetchurl stdenv pcre;
759     });
761   gnupatch = useFromStdenv "patch" (import ../tools/text/gnupatch {
762     inherit fetchurl stdenv;
763   });
765   gnupg = import ../tools/security/gnupg {
766     inherit fetchurl stdenv readline;
767     ideaSupport = getPkgConfig "gnupg" "idea" false; # enable for IDEA crypto support
768   };
770   gnupg2 = import ../tools/security/gnupg2 {
771     inherit fetchurl stdenv readline libgpgerror libgcrypt libassuan pth libksba zlib;
772     openldap = if getPkgConfig "gnupg" "ldap" true then openldap else null;
773     bzip2 = if getPkgConfig "gnupg" "bzip2" true then bzip2 else null;
774     libusb = if getPkgConfig "gnupg" "usb" true then libusb else null;
775     curl = if getPkgConfig "gnupg" "curl" true then curl else null;
776   };
778   gnuplot = import ../tools/graphics/gnuplot {
779     inherit fetchurl stdenv zlib gd texinfo readline emacs;
780     inherit (xlibs) libX11 libXt libXaw libXpm;
781     x11Support = getPkgConfig "gnuplot" "x11" false;
782     wxGTK = if getPkgConfig "gnuplot" "wxGtk" false then wxGTK else null;
783     inherit (gtkLibs) pango;
784     inherit cairo pkgconfig;
785   };
787   gnused = useFromStdenv "gnused"
788     (import ../tools/text/gnused {
789       inherit fetchurl stdenv;
790     });
792   gnused_4_2 = import ../tools/text/gnused/4.2.nix {
793     inherit fetchurl stdenv;
794   };
796   gnutar = useFromStdenv "gnutar"
797     (import ../tools/archivers/gnutar {
798       inherit fetchurl stdenv;
799     });
801   gnuvd = import ../tools/misc/gnuvd {
802     inherit fetchurl stdenv;
803   };
805   graphviz = import ../tools/graphics/graphviz {
806     inherit fetchurl stdenv pkgconfig libpng libjpeg expat x11 yacc
807       libtool fontconfig gd;
808     inherit (xlibs) libXaw;
809     inherit (gtkLibs) pango;
810   };
812   groff = import ../tools/text/groff {
813     inherit fetchurl stdenv perl;
814     ghostscript = null;
815   };
817   grub = import ../tools/misc/grub {
818     inherit fetchurl autoconf automake;
819     stdenv = stdenv_32bit;
820     buggyBiosCDSupport = (getConfig ["grub" "buggyBiosCDSupport"] true);
821   };
823   grub2 = import ../tools/misc/grub/1.9x.nix {
824     inherit stdenv fetchurl bison ncurses libusb freetype;
825   };
827   gssdp = import ../development/libraries/gssdp {
828     inherit fetchurl stdenv pkgconfig libxml2 glib;
829     inherit (gnome) libsoup;
830   };
832   gtkgnutella = import ../tools/networking/p2p/gtk-gnutella {
833     inherit fetchurl stdenv pkgconfig libxml2;
834     inherit (gtkLibs) glib gtk;
835   };
837   gupnp = import ../development/libraries/gupnp {
838     inherit fetchurl stdenv pkgconfig libxml2 gssdp e2fsprogs glib;
839     inherit (gnome) libsoup;
840   };
842   gupnptools = import ../tools/networking/gupnp-tools {
843     inherit fetchurl stdenv gssdp gupnp pkgconfig libxml2 e2fsprogs;
844     inherit (gtkLibs) gtk glib;
845     inherit (gnome) libsoup libglade gnomeicontheme;
846   };
848   gvpe = builderDefsPackage ../tools/networking/gvpe {
849     inherit openssl gmp nettools iproute;
850   };
852   gzip = useFromStdenv "gzip"
853     (import ../tools/compression/gzip {
854       inherit fetchurl stdenv;
855     });
857   pigz = import ../tools/compression/pigz {
858     inherit fetchurl stdenv zlib;
859   };
861   halibut = import ../tools/typesetting/halibut {
862     inherit fetchurl stdenv perl;
863   };
865   hddtemp = import ../tools/misc/hddtemp {
866     inherit fetchurl stdenv;
867   };
869   hevea = import ../tools/typesetting/hevea {
870     inherit fetchurl stdenv ocaml;
871   };
873   highlight = import ../tools/text/highlight {
874     inherit fetchurl stdenv getopt;
875   };
877   host = import ../tools/networking/host {
878     inherit fetchurl stdenv;
879   };
881   iasl = import ../development/compilers/iasl {
882     inherit fetchurl stdenv bison flex;
883   };
885   idutils = import ../tools/misc/idutils {
886     inherit fetchurl stdenv emacs;
887   };
889   iftop = import ../tools/networking/iftop {
890     inherit fetchurl stdenv ncurses libpcap;
891   };
893   imapsync = import ../tools/networking/imapsync {
894     inherit fetchurl stdenv perl openssl;
895     inherit (perlPackages) MailIMAPClient;
896   };
898   inetutils = import ../tools/networking/inetutils {
899     inherit fetchurl stdenv ncurses;
900   };
902   iodine = import ../tools/networking/iodine {
903     inherit stdenv fetchurl zlib nettools;
904   };
906   iperf = import ../tools/networking/iperf {
907     inherit fetchurl stdenv;
908   };
910   ipmitool = import ../tools/system/ipmitool {
911     inherit fetchurl stdenv openssl;
912   };
914   jdiskreport = import ../tools/misc/jdiskreport {
915     inherit fetchurl stdenv unzip jdk;
916   };
918   jfsrec = import ../tools/filesystems/jfsrec {
919     inherit fetchurl stdenv boost;
920   };
922   jfsutils = import ../tools/filesystems/jfsutils {
923     inherit fetchurl stdenv libuuid;
924   };
926   jhead = import ../tools/graphics/jhead {
927     inherit stdenv fetchurl;
928   };
930   jing = import ../tools/text/xml/jing {
931     inherit fetchurl stdenv unzip;
932   };
934   jing_tools = import ../tools/text/xml/jing/jing-script.nix {
935     inherit fetchurl stdenv unzip jre;
936   };
938   jnettop = import ../tools/networking/jnettop {
939     inherit fetchurl stdenv autoconf libpcap ncurses pkgconfig;
940     inherit (gnome) glib;
941   };
943   jwhois = import ../tools/networking/jwhois {
944     inherit fetchurl stdenv;
945   };
947   keychain = import ../tools/misc/keychain {
948     inherit fetchurl stdenv;
949   };
951   kismet = import ../applications/networking/sniffers/kismet {
952     inherit fetchurl stdenv libpcap ncurses expat;
953   };
955   ktorrent = import ../tools/networking/p2p/ktorrent {
956     inherit fetchurl stdenv pkgconfig boost
957       xlibs zlib libpng libjpeg perl gmp cmake gettext;
958     kde = kde43;
959   };
961   less = import ../tools/misc/less {
962     inherit fetchurl stdenv ncurses;
963   };
965   lftp = import ../tools/networking/lftp {
966     inherit fetchurl stdenv readline;
967   };
969   libtorrent = import ../tools/networking/p2p/libtorrent {
970     inherit fetchurl stdenv pkgconfig openssl libsigcxx;
971   };
973   lout = import ../tools/typesetting/lout {
974     inherit fetchurl stdenv ghostscript;
975   };
977   lrzip = import ../tools/compression/lrzip {
978     inherit fetchurl stdenv zlib lzo bzip2 nasm;
979   };
981   lsh = import ../tools/networking/lsh {
982     inherit stdenv fetchurl gperf guile gmp zlib liboop gnum4 pam
983       readline nettools lsof procps;
984   };
986   lzma = import ../tools/compression/lzma {
987     inherit fetchurl stdenv;
988   };
990   xz = import ../tools/compression/xz {
991     inherit fetchurl stdenv lib;
992   };
994   lzop = import ../tools/compression/lzop {
995     inherit fetchurl stdenv lzo;
996   };
998   mailutils = import ../tools/networking/mailutils {
999     inherit fetchurl stdenv gettext gdbm libtool pam readline ncurses
1000       gnutls mysql guile texinfo gnum4;
1001   };
1003   man = import ../tools/misc/man {
1004     inherit fetchurl stdenv groff less;
1005   };
1007   man_db = import ../tools/misc/man-db {
1008     inherit fetchurl stdenv db4 groff;
1009   };
1011   memtest86 = import ../tools/misc/memtest86 {
1012     inherit fetchurl stdenv;
1013   };
1015   mc = import ../tools/misc/mc {
1016     inherit fetchurl stdenv lib pkgconfig ncurses shebangfix perl zip unzip slang
1017       gettext e2fsprogs gpm glib;
1018     inherit (xlibs) libX11 libXt;
1019   };
1021   mcabber = import ../applications/networking/instant-messengers/mcabber {
1022     inherit fetchurl stdenv openssl ncurses pkgconfig glib;
1023   };
1025   mcron = import ../tools/system/mcron {
1026     inherit fetchurl stdenv guile which ed;
1027   };
1029   mdbtools = import ../tools/misc/mdbtools {
1030     inherit fetchurl stdenv readline pkgconfig bison glib;
1031     flex = flex2535;
1032   };
1034   mjpegtools = import ../tools/video/mjpegtools {
1035     inherit fetchurl stdenv libjpeg;
1036     inherit (xlibs) libX11;
1037   };
1039   mkisofs = import ../tools/cd-dvd/mkisofs {
1040     inherit fetchurl stdenv gettext;
1041   };
1043   mktemp = import ../tools/security/mktemp {
1044     inherit fetchurl stdenv;
1045   };
1047   mldonkey = import ../applications/networking/p2p/mldonkey {
1048     inherit fetchurl stdenv ocaml zlib bzip2 ncurses file gd libpng;
1049   };
1051   monit = builderDefsPackage ../tools/system/monit {
1052     flex = flex2535;
1053     bison = bison24;
1054     inherit openssl;
1055   };
1057   mpage = import ../tools/text/mpage {
1058     inherit fetchurl stdenv;
1059   };
1061   msf = builderDefsPackage (import ../tools/security/metasploit/3.1.nix) {
1062     inherit ruby makeWrapper;
1063   };
1065   mssys = import ../tools/misc/mssys {
1066     inherit fetchurl stdenv gettext;
1067   };
1069   multitran = recurseIntoAttrs (let
1070       inherit fetchurl stdenv help2man;
1071     in rec {
1072       multitrandata = import ../tools/text/multitran/data {
1073         inherit fetchurl stdenv;
1074       };
1076       libbtree = import ../tools/text/multitran/libbtree {
1077         inherit fetchurl stdenv;
1078       };
1080       libmtsupport = import ../tools/text/multitran/libmtsupport {
1081         inherit fetchurl stdenv;
1082       };
1084       libfacet = import ../tools/text/multitran/libfacet {
1085         inherit fetchurl stdenv libmtsupport;
1086       };
1088       libmtquery = import ../tools/text/multitran/libmtquery {
1089         inherit fetchurl stdenv libmtsupport libfacet libbtree multitrandata;
1090       };
1092       mtutils = import ../tools/text/multitran/mtutils {
1093         inherit fetchurl stdenv libmtsupport libfacet libbtree libmtquery help2man;
1094       };
1095     });
1097   muscleframework = import ../tools/security/muscleframework {
1098     inherit fetchurl stdenv libmusclecard pkgconfig pcsclite;
1099   };
1101   muscletool = import ../tools/security/muscletool {
1102     inherit fetchurl stdenv pkgconfig libmusclecard pcsclite;
1103   };
1105   mysql2pgsql = import ../tools/misc/mysql2pgsql {
1106     inherit fetchurl stdenv perl shebangfix;
1107   };
1109   namazu = import ../tools/text/namazu {
1110     inherit fetchurl stdenv perl;
1111   };
1113   nbd = import ../tools/networking/nbd {
1114     inherit fetchurl stdenv pkgconfig glib;
1115   };
1117   nc6 = composedArgsAndFun (import ../tools/networking/nc6/1.0.nix) {
1118     inherit builderDefs;
1119   };
1121   ncat = import ../tools/networking/ncat {
1122     inherit fetchurl stdenv openssl;
1123   };
1125   ncftp = import ../tools/networking/ncftp {
1126     inherit fetchurl stdenv ncurses coreutils;
1127   };
1129   ncompress = import ../tools/compression/ncompress {
1130     inherit fetchurl stdenv;
1131   };
1133   netcat = import ../tools/networking/netcat {
1134     inherit fetchurl stdenv;
1135   };
1137   netkittftp = import ../tools/networking/netkit/tftp {
1138     inherit fetchurl stdenv;
1139   };
1141   netpbm = import ../tools/graphics/netpbm {
1142     inherit stdenv fetchsvn libjpeg libpng zlib flex perl libxml2 makeWrapper;
1143   };
1145   netselect = import ../tools/networking/netselect {
1146     inherit fetchurl stdenv;
1147   };
1149   nmap = import ../tools/security/nmap {
1150     inherit fetchurl stdenv libpcap pkgconfig openssl
1151       python pygtk makeWrapper pygobject pycairo;
1152     inherit (pythonPackages) pysqlite;
1153     inherit (xlibs) libX11;
1154     inherit (gtkLibs) gtk;
1155   };
1157   ntfs3g = import ../tools/filesystems/ntfs-3g {
1158     inherit fetchurl stdenv utillinux;
1159   };
1161   ntfsprogs = import ../tools/filesystems/ntfsprogs {
1162     inherit fetchurl stdenv libuuid;
1163   };
1165   ntp = import ../tools/networking/ntp {
1166     inherit fetchurl stdenv libcap;
1167   };
1169   nssmdns = import ../tools/networking/nss-mdns {
1170     inherit fetchurl stdenv avahi;
1171   };
1173   nylon = import ../tools/networking/nylon {
1174     inherit fetchurl stdenv libevent;
1175   };
1177   obexd = import ../tools/bluetooth/obexd {
1178     inherit fetchurl stdenv pkgconfig dbus openobex bluez glib;
1179   };
1181   obexfs = import ../tools/bluetooth/obexfs {
1182     inherit fetchurl stdenv pkgconfig fuse obexftp;
1183   };
1185   obexftp = import ../tools/bluetooth/obexftp {
1186     inherit fetchurl stdenv pkgconfig openobex bluez;
1187   };
1189   openjade = import ../tools/text/sgml/openjade {
1190     inherit fetchurl opensp perl;
1191     stdenv = overrideGCC stdenv gcc33;
1192   };
1194   openobex = import ../tools/bluetooth/openobex {
1195     inherit fetchurl stdenv pkgconfig bluez libusb;
1196   };
1198   opensc_0_11_7 = import ../tools/security/opensc/0.11.7.nix {
1199     inherit fetchurl stdenv libtool readline zlib openssl libiconv pcsclite
1200       libassuan pkgconfig pinentry;
1201     inherit (xlibs) libXt;
1202   };
1204   opensc = opensc_0_11_7;
1206   opensc_dnie_wrapper = import ../tools/security/opensc-dnie-wrapper {
1207     inherit stdenv makeWrapper ed libopensc_dnie;
1208   };
1210   openssh = import ../tools/networking/openssh {
1211     inherit fetchurl stdenv zlib openssl pam perl;
1212     pamSupport = getPkgConfig "openssh" "pam" true;
1213     hpnSupport = getConfig [ "openssh" "hpn" ] false;
1214     etcDir = getConfig [ "openssh" "etcDir" ] "/etc/ssh";
1215   };
1217   opensp = import ../tools/text/sgml/opensp {
1218     inherit fetchurl xmlto docbook_xml_dtd_412 libxslt docbook_xsl;
1219     inherit stdenv;
1220   };
1222   openvpn = import ../tools/networking/openvpn {
1223     inherit fetchurl stdenv iproute lzo openssl nettools;
1224   };
1226   p7zip = import ../tools/archivers/p7zip {
1227     inherit fetchurl stdenv;
1228   };
1230   panomatic = import ../tools/graphics/panomatic {
1231     inherit fetchurl stdenv boost zlib;
1232   };
1234   par2cmdline = import ../tools/networking/par2cmdline {
1235     inherit fetchurl stdenv;
1236   };
1238   patchutils = import ../tools/text/patchutils {
1239     inherit fetchurl stdenv;
1240   };
1242   parted = import ../tools/misc/parted {
1243     inherit fetchurl stdenv devicemapper libuuid gettext readline
1244       utillinuxng;
1245   };
1247   patch = gnupatch;
1249   pbzip2 = import ../tools/compression/pbzip2 {
1250     inherit fetchurl stdenv bzip2;
1251   };
1253   pciutils = import ../tools/system/pciutils {
1254     inherit fetchurl stdenv zlib;
1255   };
1257   pcsclite = import ../tools/security/pcsclite {
1258     inherit fetchurl stdenv hal pkgconfig dbus;
1259   };
1261   pdf2djvu = import ../tools/typesetting/pdf2djvu {
1262     inherit fetchurl stdenv pkgconfig djvulibre poppler fontconfig libjpeg;
1263   };
1265   pdfjam = import ../tools/typesetting/pdfjam {
1266     inherit fetchurl stdenv;
1267   };
1269   pg_top = import ../tools/misc/pg_top {
1270     inherit fetchurl stdenv ncurses postgresql;
1271   };
1273   pdsh = import ../tools/networking/pdsh {
1274     inherit fetchurl stdenv perl;
1275     readline = if getPkgConfig "pdsh" "readline" true then readline else null;
1276     rsh = getPkgConfig "pdsh" "rsh" true;
1277     ssh = if getPkgConfig "pdsh" "ssh" true then openssh else null;
1278     pam = if getPkgConfig "pdsh" "pam" true then pam else null;
1279   };
1281   pfstools = import ../tools/graphics/pfstools {
1282     inherit fetchurl stdenv imagemagick libjpeg libtiff mesa freeglut bzip2 libpng expat;
1283     openexr = openexr_1_6_1;
1284     qt = qt3;
1285     inherit (xlibs) libX11;
1286   };
1288   pinentry = import ../tools/misc/pinentry {
1289     inherit fetchurl stdenv pkgconfig ncurses;
1290     inherit (gnome) glib gtk;
1291   };
1293   plan9port = import ../tools/system/plan9port {
1294     inherit fetchurl stdenv;
1295     inherit (xlibs) libX11 xproto libXt xextproto;
1296   };
1298   ploticus = import ../tools/graphics/ploticus {
1299     inherit fetchurl stdenv zlib libpng;
1300     inherit (xlibs) libX11;
1301   };
1303   plotutils = import ../tools/graphics/plotutils {
1304     inherit fetchurl stdenv libpng;
1305   };
1307   povray = import ../tools/graphics/povray {
1308     inherit fetchurl stdenv;
1309   };
1311   ppl = import ../development/libraries/ppl {
1312     inherit fetchurl stdenv gmpxx perl gnum4;
1313   };
1315   /* WARNING: this version is unsuitable for using with a setuid wrapper */
1316   ppp = builderDefsPackage (import ../tools/networking/ppp) {
1317   };
1319   proxychains = import ../tools/networking/proxychains {
1320     inherit fetchurl stdenv;
1321   };
1323   proxytunnel = import ../tools/misc/proxytunnel {
1324     inherit fetchurl stdenv openssl;
1325   };
1327   psmisc = import ../tools/misc/psmisc {
1328     inherit stdenv fetchurl ncurses;
1329   };
1331   pstoedit = import ../tools/graphics/pstoedit {
1332     inherit fetchurl stdenv lib pkgconfig ghostscript gd zlib plotutils;
1333   };
1335   pv = import ../tools/misc/pv {
1336     inherit fetchurl stdenv;
1337   };
1339   pwgen = import ../tools/security/pwgen {
1340     inherit stdenv fetchurl;
1341   };
1343   pydb = import ../tools/pydb {
1344     inherit fetchurl stdenv python emacs;
1345   };
1347   pystringtemplate = import ../development/python-modules/stringtemplate {
1348     inherit stdenv fetchurl python antlr;
1349   };
1351   pythonDBus = builderDefsPackage (import ../development/python-modules/dbus) {
1352     inherit python pkgconfig dbus_glib;
1353     dbus = dbus.libs;
1354   };
1356   pythonIRClib = builderDefsPackage (import ../development/python-modules/irclib) {
1357     inherit python;
1358   };
1360   pythonSexy = builderDefsPackage (import ../development/python-modules/libsexy) {
1361     inherit python libsexy pkgconfig libxml2 pygtk;
1362     inherit (gtkLibs) pango gtk glib;
1363   };
1365   openmpi = import ../development/libraries/openmpi {
1366     inherit fetchurl stdenv;
1367   };
1369   qhull = import ../development/libraries/qhull {
1370     inherit stdenv fetchurl;
1371   };
1373   reiser4progs = import ../tools/filesystems/reiser4progs {
1374     inherit fetchurl stdenv libaal;
1375   };
1377   reiserfsprogs = import ../tools/filesystems/reiserfsprogs {
1378     inherit fetchurl stdenv;
1379   };
1381   relfs = composedArgsAndFun (import ../tools/filesystems/relfs) {
1382     inherit fetchcvs stdenv ocaml postgresql fuse pcre
1383       builderDefs pkgconfig libuuid;
1384     inherit (gnome) gnomevfs GConf;
1385   };
1387   remind = import ../tools/misc/remind {
1388     inherit fetchurl stdenv;
1389   };
1391   replace = import ../tools/text/replace {
1392     inherit fetchurl stdenv;
1393   };
1395   /*
1396   rdiff_backup = import ../tools/backup/rdiff-backup {
1397     inherit fetchurl stdenv librsync gnused;
1398     python=python;
1399   };
1400   */
1402   rsnapshot = import ../tools/backup/rsnapshot {
1403     inherit fetchurl stdenv perl openssh rsync;
1405     # For the `logger' command, we can use either `utillinux' or
1406     # GNU Inetutils.  The latter is more portable.
1407     logger = inetutils;
1408   };
1410   rlwrap = composedArgsAndFun (import ../tools/misc/rlwrap/0.28.nix) {
1411     inherit builderDefs readline;
1412   };
1414   rpPPPoE = builderDefsPackage (import ../tools/networking/rp-pppoe) {
1415     inherit ppp;
1416   };
1418   rpm = import ../tools/package-management/rpm {
1419     inherit fetchurl stdenv cpio zlib bzip2 xz file elfutils nspr nss popt;
1420     db4 = db45;
1421   };
1423   rrdtool = import ../tools/misc/rrdtool {
1424     inherit stdenv fetchurl gettext perl pkgconfig libxml2 cairo;
1425     inherit (gtkLibs) pango;
1426   };
1428   rtorrent = import ../tools/networking/p2p/rtorrent {
1429     inherit fetchurl stdenv libtorrent ncurses pkgconfig libsigcxx curl zlib openssl;
1430   };
1432   rubber = import ../tools/typesetting/rubber {
1433     inherit fetchurl stdenv python texinfo;
1434   };
1436   rxp = import ../tools/text/xml/rxp {
1437     inherit fetchurl stdenv;
1438   };
1440   rzip = import ../tools/compression/rzip {
1441     inherit fetchurl stdenv bzip2;
1442   };
1444   s3backer = import ../tools/filesystems/s3backer {
1445     inherit fetchurl stdenv pkgconfig fuse curl expat;
1446   };
1448   sablotron = import ../tools/text/xml/sablotron {
1449     inherit fetchurl stdenv expat;
1450   };
1452   screen = import ../tools/misc/screen {
1453     inherit fetchurl stdenv ncurses;
1454   };
1456   scrot = import ../tools/graphics/scrot {
1457     inherit fetchurl stdenv giblib x11;
1458   };
1460   seccure = import ../tools/security/seccure/0.4.nix {
1461     inherit fetchurl stdenv libgcrypt;
1462   };
1464   setserial = builderDefsPackage (import ../tools/system/setserial) {
1465     inherit groff;
1466   };
1468   sharutils = import ../tools/archivers/sharutils/4.6.3.nix {
1469     inherit fetchurl stdenv;
1470   };
1472   shebangfix = import ../tools/misc/shebangfix {
1473     inherit stdenv perl;
1474   };
1476   slsnif = import ../tools/misc/slsnif {
1477     inherit fetchurl stdenv;
1478   };
1480   smartmontools = import ../tools/system/smartmontools {
1481     inherit fetchurl stdenv;
1482   };
1484   smbfsFuse = composedArgsAndFun (import ../tools/filesystems/smbfs-fuse) {
1485     inherit builderDefs samba fuse;
1486   };
1488   socat = import ../tools/networking/socat {
1489     inherit fetchurl stdenv openssl;
1490   };
1492   socat2pre = builderDefsPackage ../tools/networking/socat/2.0.0-b3.nix {
1493     inherit fetchurl stdenv openssl;
1494   };
1496   squashfsTools = import ../tools/filesystems/squashfs {
1497     inherit fetchurl stdenv zlib;
1498   };
1500   sshfsFuse = import ../tools/filesystems/sshfs-fuse {
1501     inherit fetchurl stdenv pkgconfig fuse glib;
1502   };
1504   sudo = import ../tools/security/sudo {
1505     inherit fetchurl stdenv coreutils pam groff;
1506   };
1508   suidChroot = builderDefsPackage (import ../tools/system/suid-chroot) {
1509   };
1511   superkaramba = import ../desktops/superkaramba {
1512     inherit stdenv fetchurl kdebase kdelibs zlib libjpeg
1513       perl qt3 python libpng freetype expat;
1514     inherit (xlibs) libX11 libXext libXt libXaw libXpm;
1515   };
1517   ssmtp = import ../tools/networking/ssmtp {
1518     inherit fetchurl stdenv openssl;
1519     tlsSupport = true;
1520   };
1522   ssss = composedArgsAndFun (import ../tools/security/ssss/0.5.nix) {
1523     inherit builderDefs gmp;
1524   };
1526   stun = import ../tools/networking/stun {
1527     inherit fetchurl stdenv lib;
1528   };
1530   stunnel = import ../tools/networking/stunnel {
1531     inherit fetchurl stdenv openssl;
1532   };
1534   su = import ../tools/misc/su {
1535     inherit fetchurl stdenv pam;
1536   };
1538   swec = import ../tools/networking/swec {
1539     inherit fetchurl stdenv makeWrapper perl;
1540     inherit (perlPackages) LWP URI HTMLParser HTTPServerSimple Parent;
1541   };
1543   system_config_printer = import ../tools/misc/system-config-printer {
1544     inherit stdenv fetchurl perl perlXMLParser desktop_file_utils;
1545   };
1547   sitecopy = import ../tools/networking/sitecopy {
1548     inherit fetchurl stdenv neon openssl;
1549   };
1551   privoxy = import ../tools/networking/privoxy {
1552     inherit fetchurl stdenv autoconf automake ;
1553   };
1555   tcpdump = import ../tools/networking/tcpdump {
1556     inherit fetchurl stdenv libpcap;
1557   };
1559   tcng = import ../tools/networking/tcng {
1560     inherit fetchurl stdenv iproute bison flex db4 perl;
1561     kernel = kernel_2_6_28;
1562   };
1564   telnet = import ../tools/networking/telnet {
1565     inherit fetchurl stdenv ncurses;
1566   };
1568   ttf2pt1 = import ../tools/misc/ttf2pt1 {
1569     inherit fetchurl stdenv perl freetype;
1570   };
1572   ucl = import ../development/libraries/ucl {
1573     inherit fetchurl stdenv;
1574   };
1576   ufraw = import ../applications/graphics/ufraw {
1577     inherit fetchurl stdenv pkgconfig gettext bzip2 zlib
1578       libjpeg libtiff cfitsio exiv2 lcms gtkimageview;
1579     inherit (gnome) gtk;
1580   };
1582   upx = import ../tools/compression/upx {
1583     inherit fetchurl stdenv ucl zlib;
1584   };
1586   vbetool = builderDefsPackage ../tools/system/vbetool {
1587     inherit pciutils libx86 zlib;
1588   };
1590   viking = import ../applications/misc/viking {
1591     inherit fetchurl stdenv pkgconfig intltool gettext expat curl
1592       gpsd bc file;
1593     inherit (gtkLibs) gtk;
1594   };
1596   vncrec = builderDefsPackage ../tools/video/vncrec {
1597     inherit (xlibs) imake libX11 xproto gccmakedep libXt
1598       libXmu libXaw libXext xextproto libSM libICE libXpm
1599       libXp;
1600   };
1602   vpnc = import ../tools/networking/vpnc {
1603     inherit fetchurl stdenv libgcrypt perl gawk
1604       nettools makeWrapper;
1605   };
1607   vtun = import ../tools/networking/vtun {
1608     inherit fetchurl stdenv lzo openssl zlib yacc flex;
1609   };
1611   testdisk = import ../tools/misc/testdisk {
1612     inherit fetchurl stdenv ncurses libjpeg e2fsprogs zlib openssl;
1613   };
1615   htmlTidy = import ../tools/text/html-tidy {
1616     inherit fetchcvs stdenv autoconf automake libtool;
1617   };
1619   tightvnc = import ../tools/admin/tightvnc {
1620     inherit fetchurl stdenv x11 zlib libjpeg perl;
1621     inherit (xlibs) imake gccmakedep libXmu libXaw libXpm libXp xauth;
1622     fontDirectories = [ xorg.fontadobe75dpi xorg.fontmiscmisc xorg.fontcursormisc
1623       xorg.fontbhlucidatypewriter75dpi ];
1624   };
1626   time = import ../tools/misc/time {
1627     inherit fetchurl stdenv;
1628   };
1630   tm = import ../tools/system/tm {
1631     inherit fetchurl stdenv;
1632   };
1634   trang = import ../tools/text/xml/trang {
1635     inherit fetchurl stdenv unzip jre;
1636   };
1638   ts = import ../tools/system/ts {
1639     inherit fetchurl stdenv;
1640   };
1642   transfig = import ../tools/graphics/transfig {
1643     inherit fetchurl stdenv libpng libjpeg zlib;
1644     inherit (xlibs) imake;
1645   };
1647   truecrypt = import ../applications/misc/truecrypt {
1648     inherit fetchurl stdenv pkgconfig fuse devicemapper;
1649     inherit wxGTK;
1650     wxGUI = getConfig [ "truecrypt" "wxGUI" ] true;
1651   };
1653   ttmkfdir = import ../tools/misc/ttmkfdir {
1654     inherit stdenv fetchurl freetype fontconfig libunwind libtool bison;
1655     flex = flex2534;
1656   };
1658   units = import ../tools/misc/units {
1659     inherit fetchurl stdenv;
1660   };
1662   unrar = import ../tools/archivers/unrar {
1663     inherit fetchurl stdenv;
1664   };
1666   unshield = import ../tools/archivers/unshield {
1667     inherit fetchurl stdenv zlib;
1668   };
1670   unzip = unzip552;
1672   # TODO: remove in the next stdenv update.
1673   unzip552 = import ../tools/archivers/unzip/5.52.nix {
1674     inherit fetchurl stdenv;
1675   };
1677   unzip60 = import ../tools/archivers/unzip/6.0.nix {
1678     inherit fetchurl stdenv bzip2;
1679   };
1681   uptimed = import ../tools/system/uptimed {
1682     inherit fetchurl stdenv automake autoconf libtool;
1683   };
1685   w3cCSSValidator = import ../tools/misc/w3c-css-validator {
1686     inherit fetchurl stdenv apacheAnt jre sourceFromHead lib;
1687     tomcat = tomcat6;
1688   };
1690   wdfs = import ../tools/filesystems/wdfs {
1691     inherit stdenv fetchurl neon fuse pkgconfig glib;
1692   };
1694   webdruid = builderDefsPackage ../tools/admin/webdruid {
1695     inherit zlib libpng freetype gd which
1696       libxml2 geoip;
1697   };
1699   wget = import ../tools/networking/wget {
1700     inherit fetchurl stdenv gettext openssl;
1701   };
1703   which = import ../tools/system/which {
1704     inherit fetchurl stdenv readline;
1705   };
1707   wicd = import ../tools/networking/wicd {
1708     inherit stdenv fetchurl python pygobject pycairo pyGtkGlade pythonDBus
1709             wpa_supplicant dhcp wirelesstools nettools iproute;
1710   };
1712   wv = import ../tools/misc/wv {
1713     inherit fetchurl stdenv libpng zlib imagemagick
1714       pkgconfig libgsf libxml2 bzip2 glib;
1715   };
1717   wv2 = import ../tools/misc/wv2 {
1718     inherit stdenv fetchurl pkgconfig libgsf libxml2 glib;
1719   };
1721   x11_ssh_askpass = import ../tools/networking/x11-ssh-askpass {
1722     inherit fetchurl stdenv x11;
1723     inherit (xorg) imake;
1724   };
1726   xclip = import ../tools/misc/xclip {
1727     inherit fetchurl stdenv x11;
1728     inherit (xlibs) libXmu;
1729   };
1731   xfsprogs = import ../tools/filesystems/xfsprogs {
1732     inherit fetchurl stdenv libtool gettext libuuid;
1733   };
1735   xmlroff = import ../tools/typesetting/xmlroff {
1736     inherit fetchurl stdenv pkgconfig libxml2 libxslt popt;
1737     inherit (gtkLibs) glib pango gtk;
1738     inherit (gnome) libgnomeprint;
1739     inherit pangoxsl;
1740   };
1742   xmlto = import ../tools/typesetting/xmlto {
1743     inherit fetchurl stdenv flex libxml2 libxslt
1744             docbook_xml_dtd_42 docbook_xsl w3m
1745             bash getopt mktemp findutils makeWrapper;
1746   };
1748   xmltv = import ../tools/misc/xmltv {
1749     inherit fetchurl perl perlPackages;
1750   };
1752   xmpppy = builderDefsPackage (import ../development/python-modules/xmpppy) {
1753     inherit python setuptools;
1754   };
1756   xpf = import ../tools/text/xml/xpf {
1757     inherit fetchurl stdenv python;
1758     libxml2 = libxml2Python;
1759   };
1761   xsel = import ../tools/misc/xsel {
1762     inherit fetchurl stdenv x11;
1763   };
1765   zdelta = import ../tools/compression/zdelta {
1766     inherit fetchurl stdenv;
1767   };
1769   zile = import ../applications/editors/zile {
1770     inherit fetchurl stdenv ncurses help2man;
1771   };
1773   zip = import ../tools/archivers/zip {
1774     inherit fetchurl stdenv;
1775   };
1778   ### SHELLS
1781   bash = lowPrio (useFromStdenv "bash" bashReal);
1783   bashReal = makeOverridable (import ../shells/bash) {
1784     inherit fetchurl stdenv bison;
1785   };
1787   bashInteractive = appendToName "interactive" (bashReal.override {
1788     inherit readline texinfo;
1789     interactive = true;
1790   });
1792   tcsh = import ../shells/tcsh {
1793     inherit fetchurl stdenv ncurses;
1794   };
1796   zsh = import ../shells/zsh {
1797     inherit fetchurl stdenv ncurses coreutils;
1798   };
1801   ### DEVELOPMENT / COMPILERS
1804   abc =
1805     abcPatchable [];
1807   abcPatchable = patches :
1808     import ../development/compilers/abc/default.nix {
1809       inherit stdenv fetchurl patches jre apacheAnt;
1810       javaCup = import ../development/libraries/java/cup {
1811         inherit stdenv fetchurl jdk;
1812       };
1813     };
1815   aspectj =
1816     import ../development/compilers/aspectj {
1817       inherit stdenv fetchurl jre;
1818     };
1820   bigloo = import ../development/compilers/bigloo {
1821     inherit fetchurl stdenv;
1822   };
1824   dylan = import ../development/compilers/gwydion-dylan {
1825     inherit fetchurl stdenv perl boehmgc yacc flex readline;
1826     dylan =
1827       import ../development/compilers/gwydion-dylan/binary.nix {
1828         inherit fetchurl stdenv;
1829       };
1830   };
1832   ecl = builderDefsPackage ../development/compilers/ecl {
1833     inherit gmp mpfr;
1834   };
1836   adobeFlexSDK33 = import ../development/compilers/adobe-flex-sdk {
1837     inherit fetchurl stdenv unzip jre;
1838   };
1840   fpc = import ../development/compilers/fpc {
1841     inherit fetchurl stdenv gawk system;
1842   };
1844   gcc = gcc43;
1846   gcc295 = wrapGCC (import ../development/compilers/gcc-2.95 {
1847     inherit fetchurl stdenv noSysDirs;
1848   });
1850   gcc33 = wrapGCC (import ../development/compilers/gcc-3.3 {
1851     inherit fetchurl stdenv noSysDirs;
1852   });
1854   gcc34 = wrapGCC (import ../development/compilers/gcc-3.4 {
1855     inherit fetchurl stdenv noSysDirs;
1856   });
1858   # XXX: GCC 4.2 (and possibly others) misdetects `makeinfo' when
1859   # using Texinfo >= 4.10, just because it uses a stupid regexp that
1860   # expects a single digit after the dot.  As a workaround, we feed
1861   # GCC with Texinfo 4.9.  Stupid bug, hackish workaround.
1863   gcc40 = wrapGCC (makeOverridable (import ../development/compilers/gcc-4.0) {
1864     inherit fetchurl stdenv noSysDirs;
1865     texinfo = texinfo49;
1866     profiledCompiler = true;
1867   });
1869   gcc41 = wrapGCC (makeOverridable (import ../development/compilers/gcc-4.1) {
1870     inherit fetchurl stdenv noSysDirs;
1871     texinfo = texinfo49;
1872     profiledCompiler = false;
1873   });
1875   gcc42 = wrapGCC (makeOverridable (import ../development/compilers/gcc-4.2) {
1876     inherit fetchurl stdenv noSysDirs;
1877     profiledCompiler = false;
1878   });
1880   gcc43 = useFromStdenv "gcc" gcc43_real;
1882   gcc43_wrapper2 = wrapGCC2 gcc43.gcc;
1884   gcc43_real = lowPrio (wrapGCC (makeOverridable (import ../development/compilers/gcc-4.3) {
1885     inherit fetchurl stdenv texinfo gmp mpfr noSysDirs;
1886     profiledCompiler = true;
1887   }));
1889   gcc43_multi = lowPrio (wrapGCCWith (import ../build-support/gcc-wrapper) glibc_multi (gcc43_real.gcc.override {
1890     stdenv = overrideGCC stdenv (wrapGCCWith (import ../build-support/gcc-wrapper) glibc_multi gcc);
1891     profiledCompiler = false;
1892     enableMultilib = true;
1893   }));
1895   gcc44 = lowPrio (wrapGCC (makeOverridable (import ../development/compilers/gcc-4.4) {
1896     inherit fetchurl stdenv texinfo gmp mpfr ppl cloogppl
1897       gettext which noSysDirs;
1898     profiledCompiler = true;
1899   }));
1901   gccApple =
1902     wrapGCC ( (if stdenv.system == "i686-darwin" then import ../development/compilers/gcc-apple else import ../development/compilers/gcc-apple64) {
1903       inherit fetchurl stdenv noSysDirs;
1904       profiledCompiler = true;
1905     }) ;
1907   gccupc40 = wrapGCCUPC (import ../development/compilers/gcc-upc-4.0 {
1908     inherit fetchurl stdenv bison autoconf gnum4 noSysDirs;
1909     texinfo = texinfo49;
1910   });
1912   gfortran = gfortran43;
1914   gfortran40 = wrapGCC (gcc40.gcc.override {
1915     name = "gfortran";
1916     langFortran = true;
1917     langCC = false;
1918     inherit gmp mpfr;
1919   });
1921   gfortran41 = wrapGCC (gcc41.gcc.override {
1922     name = "gfortran";
1923     langFortran = true;
1924     langCC = false;
1925     langC = false;
1926     inherit gmp mpfr;
1927   });
1929   gfortran42 = wrapGCC (gcc42.gcc.override {
1930     name = "gfortran";
1931     langFortran = true;
1932     langCC = false;
1933     langC = false;
1934     inherit gmp mpfr;
1935   });
1937   gfortran43 = wrapGCC (gcc43_real.gcc.override {
1938     name = "gfortran";
1939     langFortran = true;
1940     langCC = false;
1941     langC = false;
1942     profiledCompiler = false;
1943   });
1945   gfortran44 = wrapGCC (gcc44.gcc.override {
1946     name = "gfortran";
1947     langFortran = true;
1948     langCC = false;
1949     langC = false;
1950     profiledCompiler = false;
1951   });
1953   gcj = gcj44;
1955   gcj44 = wrapGCC (gcc44.gcc.override {
1956     name = "gcj";
1957     langJava = true;
1958     langFortran = false;
1959     langCC = true;
1960     langC = false;
1961     profiledCompiler = false;
1962     inherit zip unzip zlib boehmgc gettext pkgconfig;
1963     inherit (gtkLibs) gtk;
1964     inherit (gnome) libart_lgpl;
1965     inherit (xlibs) libX11 libXt libSM libICE libXtst libXi libXrender
1966       libXrandr xproto renderproto xextproto inputproto randrproto;
1967   });
1969   /*
1970   Broken; fails because of unability to find its own symbols during linking
1972   gcl = builderDefsPackage ../development/compilers/gcl {
1973     inherit mpfr m4 binutils fetchcvs emacs;
1974     inherit (xlibs) libX11 xproto inputproto libXi
1975       libXext xextproto libXt libXaw libXmu;
1976     stdenv = (overrideGCC stdenv gcc34) // {gcc = gcc33;};
1977   };
1978   */
1980   # GHC
1982   # GHC binaries are around for bootstrapping purposes
1984   #ghc = haskellPackages.ghc;
1986   /*
1987   ghc642Binary = lowPrio (import ../development/compilers/ghc/6.4.2-binary.nix {
1988     inherit fetchurl stdenv ncurses gmp;
1989     readline = if stdenv.system == "i686-linux" then readline4 else readline5;
1990     perl = perl58;
1991   });
1992   */
1994   ghc6101Binary = lowPrio (import ../development/compilers/ghc/6.10.1-binary.nix {
1995     inherit fetchurl stdenv perl ncurses gmp libedit;
1996   });
1998   ghc6102Binary = lowPrio (import ../development/compilers/ghc/6.10.2-binary.nix {
1999     inherit fetchurl stdenv perl ncurses gmp libedit;
2000   });
2002   # For several compiler versions, we export a large set of Haskell-related
2003   # packages.
2005   haskellPackages = haskellPackages_ghc6104;
2007   /*
2008   haskellPackages_ghc642 = import ./haskell-packages.nix {
2009     inherit pkgs;
2010     ghc = import ../development/compilers/ghc/6.4.2.nix {
2011       inherit fetchurl stdenv perl ncurses readline m4 gmp;
2012       ghc = ghc642Binary;
2013     };
2014   };
2016   haskellPackages_ghc661 = import ./haskell-packages.nix {
2017     inherit pkgs;
2018     ghc = import ../development/compilers/ghc/6.6.1.nix {
2019       inherit fetchurl stdenv readline perl58 gmp ncurses m4;
2020       ghc = ghc642Binary;
2021     };
2022   };
2024   haskellPackages_ghc682 = import ./haskell-packages.nix {
2025     inherit pkgs;
2026     ghc = import ../development/compilers/ghc/6.8.2.nix {
2027       inherit fetchurl stdenv perl gmp ncurses m4;
2028       readline = readline5;
2029       ghc = ghc642Binary;
2030     };
2031   };
2033   haskellPackages_ghc683 = recurseIntoAttrs (import ./haskell-packages.nix {
2034     inherit pkgs;
2035     ghc = import ../development/compilers/ghc/6.8.3.nix {
2036       inherit fetchurl stdenv readline perl gmp ncurses m4;
2037       ghc = ghc642Binary;
2038       haddock = import ../development/tools/documentation/haddock/boot.nix {
2039         inherit gmp;
2040         cabal = import ../development/libraries/haskell/cabal/cabal.nix {
2041           inherit stdenv fetchurl lib;
2042           ghc = ghc642Binary;
2043         };
2044       };
2045     };
2046   });
2047   */
2049   haskellPackages_ghc6101 = import ./haskell-packages.nix {
2050     inherit pkgs;
2051     ghc = import ../development/compilers/ghc/6.10.1.nix {
2052       inherit fetchurl stdenv perl ncurses gmp libedit;
2053       ghc = ghc6101Binary;
2054     };
2055   };
2057   haskellPackages_ghc6102 = import ./haskell-packages.nix {
2058     inherit pkgs;
2059     ghc = import ../development/compilers/ghc/6.10.2.nix {
2060       inherit fetchurl stdenv perl ncurses gmp libedit;
2061       ghc = ghc6101Binary;
2062     };
2063   };
2065   haskellPackages_ghc6103 = recurseIntoAttrs (import ./haskell-packages.nix {
2066     inherit pkgs;
2067     ghc = import ../development/compilers/ghc/6.10.3.nix {
2068       inherit fetchurl stdenv perl ncurses gmp libedit;
2069       ghc = ghc6101Binary;
2070     };
2071   });
2073   haskellPackages_ghc6104 = recurseIntoAttrs (import ./haskell-packages.nix {
2074     inherit pkgs;
2075     ghc = import ../development/compilers/ghc/6.10.4.nix {
2076       inherit fetchurl stdenv perl ncurses gmp libedit;
2077       ghc = ghc6101Binary;
2078     };
2079   });
2081   # make this ghc default when it's supported by the Haskell Platform
2082   haskellPackages_ghc6121 = lowPrio (import ./haskell-packages.nix {
2083     inherit pkgs;
2084     ghc = import ../development/compilers/ghc/6.12.1.nix {
2085       inherit fetchurl stdenv perl ncurses gmp;
2086       ghc = ghc6101Binary;
2087     };
2088   });
2090   haskellPackages_ghcHEAD = import ./haskell-packages.nix {
2091     inherit pkgs;
2092     ghc = import ../development/compilers/ghc/6.11.nix {
2093       inherit fetchurl stdenv perl ncurses gmp libedit;
2094       inherit (haskellPackages) happy alex; # hope these aren't required for the final version
2095       ghc = ghc6101Binary;
2096     };
2097   };
2099   haxe = import ../development/compilers/haxe {
2100     inherit fetchurl sourceFromHead stdenv lib ocaml zlib makeWrapper;
2101   };
2103   falcon = builderDefsPackage (import ../development/interpreters/falcon) {
2104     inherit cmake;
2105   };
2107   go = import ../development/compilers/go {
2108     inherit stdenv fetchhg glibc bison ed which bash makeWrapper;
2109   };
2111   gprolog = import ../development/compilers/gprolog {
2112     inherit fetchurl stdenv;
2113   };
2115   gwt = import ../development/compilers/gwt {
2116     inherit stdenv fetchurl jdk;
2117     inherit (gtkLibs) glib gtk pango atk;
2118     inherit (xlibs) libX11 libXt;
2119     libstdcpp5 = gcc33.gcc;
2120   };
2122   ikarus = import ../development/compilers/ikarus {
2123     inherit stdenv fetchurl gmp;
2124   };
2126   #TODO add packages http://cvs.haskell.org/Hugs/downloads/2006-09/packages/ and test
2127   # commented out because it's using the new configuration style proposal which is unstable
2128   hugs = import ../development/compilers/hugs {
2129     inherit lib fetchurl stdenv composableDerivation;
2130   };
2132   openjdkDarwin = import ../development/compilers/openjdk-darwin {
2133     inherit fetchurl stdenv;
2134   };
2136   j2sdk14x = (
2137     assert system == "i686-linux";
2138     import ../development/compilers/jdk/default-1.4.nix {
2139       inherit fetchurl stdenv;
2140     });
2142   jdk5 = (
2143     assert system == "i686-linux" || system == "x86_64-linux";
2144     import ../development/compilers/jdk/default-5.nix {
2145       inherit fetchurl stdenv unzip;
2146     });
2148   jdk       = jdkdistro true  false;
2149   jre       = jdkdistro false false;
2151   jdkPlugin = jdkdistro true true;
2152   jrePlugin = jdkdistro false true;
2154   supportsJDK =
2155     system == "i686-linux" ||
2156     system == "x86_64-linux" ||
2157     system == "powerpc-linux";
2159   jdkdistro = installjdk: pluginSupport:
2160        (assert supportsJDK;
2161     (if pluginSupport then appendToName "plugin" else x: x) (import ../development/compilers/jdk {
2162       inherit fetchurl stdenv unzip installjdk xlibs pluginSupport makeWrapper;
2163     }));
2165   jikes = import ../development/compilers/jikes {
2166     inherit fetchurl stdenv;
2167   };
2169   lazarus = builderDefsPackage (import ../development/compilers/fpc/lazarus.nix) {
2170     inherit fpc makeWrapper;
2171     inherit (gtkLibs) gtk glib pango atk;
2172     inherit (xlibs) libXi inputproto libX11 xproto libXext xextproto;
2173   };
2175   llvm = import ../development/compilers/llvm {
2176     inherit fetchurl stdenv gcc flex perl libtool;
2177   };
2179   llvmGCC = builderDefsPackage (import ../development/compilers/llvm/llvm-gcc.nix) {
2180     flex=flex2535;
2181     inherit llvm perl libtool bison;
2182   };
2184   mono = import ../development/compilers/mono {
2185     inherit fetchurl stdenv bison pkgconfig gettext perl glib;
2186   };
2188   monoDLLFixer = import ../build-support/mono-dll-fixer {
2189     inherit stdenv perl;
2190   };
2192   mozart = import ../development/compilers/mozart {
2193     inherit fetchurl stdenv flex bison perl gmp zlib tcl tk gdbm m4 x11 emacs;
2194   };
2196   neko = import ../development/compilers/neko {
2197     inherit sourceFromHead fetchurl stdenv lib pkgconfig composableDerivation
2198       boehmgc apacheHttpd mysql zlib sqlite pcre apr makeWrapper;
2199     inherit (gtkLibs) gtk;
2200   };
2202   nasm = import ../development/compilers/nasm {
2203     inherit fetchurl stdenv;
2204   };
2206   ocaml = ocaml_3_11_1;
2208   ocaml_3_08_0 = import ../development/compilers/ocaml/3.08.0.nix {
2209     inherit fetchurl stdenv x11 ncurses;
2210   };
2212   ocaml_3_09_1 = import ../development/compilers/ocaml/3.09.1.nix {
2213     inherit fetchurl stdenv x11 ncurses;
2214   };
2216   ocaml_3_10_0 = import ../development/compilers/ocaml/3.10.0.nix {
2217     inherit fetchurl stdenv x11 ncurses;
2218   };
2220   ocaml_3_11_1 = import ../development/compilers/ocaml/3.11.1.nix {
2221     inherit fetchurl stdenv x11 ncurses;
2222   };
2224   opencxx = import ../development/compilers/opencxx {
2225     inherit fetchurl stdenv libtool;
2226     gcc = gcc33;
2227   };
2229   qcmm = import ../development/compilers/qcmm {
2230     lua   = lua4;
2231     ocaml = ocaml_3_08_0;
2232     inherit fetchurl stdenv mk noweb groff;
2233   };
2235   roadsend = import ../development/compilers/roadsend {
2236     inherit fetchurl stdenv flex bison bigloo lib curl composableDerivation;
2237     # optional features
2238     # all features pcre, fcgi xml mysql, sqlite3, (not implemented: odbc gtk gtk2)
2239     flags = ["pcre" "xml" "mysql"];
2240     inherit mysql libxml2 fcgi;
2241   };
2243   sbcl = builderDefsPackage (import ../development/compilers/sbcl) {
2244     inherit makeWrapper;
2245     clisp = clisp_2_44_1;
2246   };
2248   scala = import ../development/compilers/scala {
2249     inherit stdenv fetchurl;
2250   };
2252   stalin = import ../development/compilers/stalin {
2253     inherit stdenv fetchurl;
2254     inherit (xlibs) libX11;
2255   };
2257   strategoPackages = strategoPackages017;
2259   strategoPackages016 = import ../development/compilers/strategoxt/0.16.nix {
2260     inherit fetchurl pkgconfig aterm getopt;
2261     stdenv = overrideInStdenv stdenv [gnumake380];
2262   };
2264   strategoPackages017 = import ../development/compilers/strategoxt/0.17.nix {
2265     inherit fetchurl stdenv pkgconfig aterm getopt jdk ncurses;
2266     readline = readline5;
2267   };
2269   strategoPackages018 = import ../development/compilers/strategoxt/0.18.nix {
2270     inherit fetchurl stdenv pkgconfig aterm getopt jdk makeStaticBinaries ncurses;
2271     readline = readline5;
2272   };
2274   metaBuildEnv = import ../development/compilers/meta-environment/meta-build-env {
2275     inherit fetchurl stdenv;
2276   };
2278   swiProlog = import ../development/compilers/swi-prolog {
2279     inherit fetchurl stdenv gmp readline openssl libjpeg unixODBC zlib;
2280     inherit (xlibs) libXinerama libXft libXpm libSM libXt;
2281   };
2283   tinycc = import ../development/compilers/tinycc {
2284     inherit fetchurl stdenv perl texinfo;
2285   };
2287   visualcpp = (import ../development/compilers/visual-c++ {
2288     inherit fetchurl stdenv cabextract;
2289   });
2291   webdsl = import ../development/compilers/webdsl {
2292     inherit stdenv fetchurl pkgconfig strategoPackages;
2293   };
2295   win32hello = import ../development/compilers/visual-c++/test {
2296     inherit fetchurl stdenv visualcpp windowssdk;
2297   };
2299   wrapGCCWith = gccWrapper: glibc: baseGCC: gccWrapper {
2300     nativeTools = stdenv ? gcc && stdenv.gcc.nativeTools;
2301     nativeLibc = stdenv ? gcc && stdenv.gcc.nativeLibc;
2302     nativePrefix = if stdenv ? gcc then stdenv.gcc.nativePrefix else "";
2303     gcc = baseGCC;
2304     libc = glibc;
2305     inherit stdenv binutils;
2306   };
2308   wrapGCC = wrapGCCWith (import ../build-support/gcc-wrapper) glibc;
2309   wrapGCC2 = wrapGCCWith (import ../build-support/gcc-wrapper2) glibc;
2311   # FIXME: This is a specific hack for GCC-UPC.  Eventually, we may
2312   # want to merge `gcc-upc-wrapper' and `gcc-wrapper'.
2313   wrapGCCUPC = baseGCC: import ../build-support/gcc-upc-wrapper {
2314     nativeTools = stdenv ? gcc && stdenv.gcc.nativeTools;
2315     nativeLibc = stdenv ? gcc && stdenv.gcc.nativeLibc;
2316     gcc = baseGCC;
2317     libc = glibc;
2318     inherit stdenv binutils;
2319   };
2321   # prolog
2322   yap = import ../development/compilers/yap {
2323     inherit fetchurl stdenv;
2324   };
2327   ### DEVELOPMENT / INTERPRETERS
2329   acl2 = builderDefsPackage ../development/interpreters/acl2 {
2330     inherit sbcl;
2331   };
2333   clisp = import ../development/interpreters/clisp {
2334     inherit fetchurl stdenv libsigsegv gettext
2335       readline ncurses coreutils pcre zlib libffi libffcall;
2336     inherit (xlibs) libX11 libXau libXt xproto
2337       libXpm libXext xextproto;
2338   };
2340   # compatibility issues in 2.47 - at list 2.44.1 is known good
2341   # for sbcl bootstrap
2342   clisp_2_44_1 = import ../development/interpreters/clisp/2.44.1.nix {
2343     inherit fetchurl stdenv gettext
2344       readline ncurses coreutils pcre zlib libffi libffcall;
2345     inherit (xlibs) libX11 libXau libXt xproto
2346       libXpm libXext xextproto;
2347     libsigsegv = libsigsegv_25;
2348   };
2350   erlang = import ../development/interpreters/erlang {
2351     inherit fetchurl stdenv perl gnum4 ncurses openssl;
2352   };
2354   guile = import ../development/interpreters/guile {
2355     inherit fetchurl stdenv readline libtool gmp gawk makeWrapper;
2356   };
2358   guile_1_9 = import ../development/interpreters/guile/1.9.nix {
2359     inherit fetchurl stdenv readline libtool gmp gawk makeWrapper
2360       libunistring pkgconfig boehmgc;
2361   };
2363   guile_1_9_coverage = import ../development/interpreters/guile/1.9.nix {
2364     inherit fetchurl stdenv readline libtool gmp gawk makeWrapper
2365       libunistring pkgconfig boehmgc;
2366     inherit (releaseTools) coverageAnalysis;
2367   };
2369   io = builderDefsPackage (import ../development/interpreters/io) {
2370     inherit sqlite zlib gmp libffi cairo ncurses freetype mesa
2371       libpng libtiff libjpeg readline libsndfile libxml2
2372       freeglut e2fsprogs libsamplerate pcre libevent libedit;
2373   };
2375   kaffe =  import ../development/interpreters/kaffe {
2376     inherit fetchurl stdenv jikes alsaLib xlibs;
2377   };
2379   lua4 = import ../development/interpreters/lua-4 {
2380     inherit fetchurl stdenv;
2381   };
2383   lua5 = import ../development/interpreters/lua-5 {
2384     inherit fetchurl stdenv ncurses readline;
2385   };
2387   maude = import ../development/interpreters/maude {
2388     inherit fetchurl stdenv flex bison ncurses buddy tecla gmpxx libsigsegv makeWrapper;
2389   };
2391   octave = import ../development/interpreters/octave {
2392     inherit stdenv fetchurl gfortran readline ncurses perl flex qhull texinfo;
2393   };
2395   # mercurial (hg) bleeding edge version
2396   octaveHG = import ../development/interpreters/octave/hg.nix {
2397     inherit fetchurl sourceFromHead readline ncurses perl flex atlas getConfig glibc qhull gfortran;
2398     inherit automake autoconf bison gperf lib python gnuplot texinfo texLive; # for dev Version
2399     inherit stdenv;
2400     inherit (xlibs) libX11;
2401     #stdenv = overrideGCC stdenv gcc40;
2402   };
2404   perl58 = import ../development/interpreters/perl-5.8 {
2405       inherit fetchurl stdenv;
2406       impureLibcPath = if stdenv.isLinux then null else "/usr";
2407     };
2409   perl510 = import ../development/interpreters/perl-5.10 {
2410     inherit stdenv;
2411     fetchurl = fetchurlBoot;
2412     impureLibcPath = if stdenv.isLinux then null else "/usr";
2413   };
2415   perl = if system != "i686-cygwin" then perl510 else sysPerl;
2417   # FIXME: unixODBC needs patching on Darwin (see darwinports)
2418   phpOld = import ../development/interpreters/php {
2419     inherit stdenv fetchurl flex bison libxml2 apacheHttpd;
2420     unixODBC =
2421       if stdenv.isDarwin then null else unixODBC;
2422   };
2424   php = makeOverridable (import ../development/interpreters/php_configurable) {
2425     inherit
2426       stdenv fetchurl lib composableDerivation autoconf automake
2427       flex bison apacheHttpd mysql libxml2 # gettext
2428       zlib curl gd postgresql openssl pkgconfig sqlite getConfig;
2429   };
2431   phpXdebug = import ../development/interpreters/php-xdebug {
2432     inherit stdenv fetchurl php autoconf automake;
2433   };
2435   phpIniBuilder = makeOverridable (import ../development/interpreters/php/ini-bulider.nix) {
2436     inherit php runCommand;
2437   };
2439   pltScheme = builderDefsPackage (import ../development/interpreters/plt-scheme) {
2440     inherit cairo fontconfig freetype libjpeg libpng openssl
2441       perl mesa zlib which;
2442     inherit (xorg) libX11 libXaw libXft libXrender libICE xproto
2443       renderproto pixman libSM libxcb libXext xextproto libXmu
2444       libXt;
2445   };
2447   polyml = import ../development/compilers/polyml {
2448     inherit stdenv fetchurl;
2449   };
2451   python = if getConfig ["python" "full"] false then pythonFull else pythonBase;
2452   python25 = if getConfig ["python" "full"] false then python25Full else python25Base;
2453   python26 = if getConfig ["python" "full"] false then python26Full else python26Base;
2454   pythonBase = python25Base;
2455   pythonFull = python25Full;
2457   python24 = import ../development/interpreters/python/2.4 {
2458     inherit fetchurl stdenv zlib bzip2;
2459   };
2461   python25Base = composedArgsAndFun (import ../development/interpreters/python/2.5) {
2462     inherit fetchurl stdenv zlib bzip2 gdbm;
2463   };
2465   python25Full = python25Base.passthru.function {
2466     # FIXME: We lack ncurses support, needed, e.g., for `gpsd'.
2467     db4 = if getConfig ["python" "db4Support"] true then db4 else null;
2468     sqlite = if getConfig ["python" "sqliteSupport"] true then sqlite else null;
2469     readline = if getConfig ["python" "readlineSupport"] true then readline else null;
2470     openssl = if getConfig ["python" "opensslSupport"] true then openssl else null;
2471     tk = if getConfig ["python" "tkSupport"] true then tk else null;
2472     tcl = if getConfig ["python" "tkSupport"] true then tcl else null;
2473     libX11 = if getConfig ["python" "tkSupport"] true then xlibs.libX11 else null;
2474     xproto = if getConfig ["python" "tkSupport"] true then xlibs.xproto else null;
2475   };
2477   python26Base = composedArgsAndFun (import ../development/interpreters/python/2.6) {
2478     inherit fetchurl stdenv zlib bzip2 gdbm;
2479     arch = if stdenv.isDarwin then darwinArchUtility else null;
2480     sw_vers = if stdenv.isDarwin then darwinSwVersUtility else null;
2481   };
2483   python26Full = python26Base.passthru.function {
2484     # FIXME: We lack ncurses support, needed, e.g., for `gpsd'.
2485     db4 = if getConfig ["python" "db4Support"] true then db4 else null;
2486     sqlite = if getConfig ["python" "sqliteSupport"] true then sqlite else null;
2487     readline = if getConfig ["python" "readlineSupport"] true then readline else null;
2488     openssl = if getConfig ["python" "opensslSupport"] true then openssl else null;
2489     tk = if getConfig ["python" "tkSupport"] true then tk else null;
2490     tcl = if getConfig ["python" "tkSupport"] true then tcl else null;
2491     libX11 = if getConfig ["python" "tkSupport"] true then xlibs.libX11 else null;
2492     xproto = if getConfig ["python" "tkSupport"] true then xlibs.xproto else null;
2493   };
2495   # new python and lib proposal
2496   # - adding a python lib to buildinputs should be enough
2497   #   (handles .pth files by patching site.py
2498   #    while introducing NIX_PYTHON_SITES describing list of modules)
2499   # - adding pyCheck = "import foo" test scripts to ensure libraries can be imported
2500   # - providing pythonWrapper so that you can run python and import the selected libraries
2501   # feel free to comment on this (experimental)
2502   python25New = recurseIntoAttrs ((import ../development/interpreters/python-new/2.5) pkgs);
2503   pythonNew = python25New; # the default python
2505   pyrex = pyrex095;
2507   pyrex095 = import ../development/interpreters/pyrex/0.9.5.nix {
2508     inherit fetchurl stdenv stringsWithDeps lib builderDefs python;
2509   };
2511   pyrex096 = import ../development/interpreters/pyrex/0.9.6.nix {
2512     inherit fetchurl stdenv stringsWithDeps lib builderDefs python;
2513   };
2515   Qi = composedArgsAndFun (import ../development/compilers/qi/9.1.nix) {
2516     inherit clisp stdenv fetchurl builderDefs unzip;
2517   };
2519   ruby18 = import ../development/interpreters/ruby {
2520     inherit fetchurl stdenv readline ncurses zlib openssl gdbm;
2521   };
2522   #ruby19 = import ../development/interpreters/ruby/ruby-19.nix { inherit ruby18 fetchurl; };
2523   ruby = ruby18;
2525   rubyLibs = recurseIntoAttrs (import ../development/interpreters/ruby/libs.nix {
2526     inherit pkgs stdenv;
2527   });
2529   rake = import ../development/ruby-modules/rake {
2530     inherit fetchurl stdenv ruby ;
2531   };
2533   rubySqlite3 = import ../development/ruby-modules/sqlite3 {
2534     inherit fetchurl stdenv ruby sqlite;
2535   };
2537   rLang = import ../development/interpreters/r-lang {
2538     inherit fetchurl stdenv readline perl gfortran libpng zlib;
2539     inherit (xorg) libX11 libXt;
2540     withBioconductor = getConfig ["rLang" "withBioconductor"] false;
2541   };
2543   rubygemsFun = ruby: builderDefsPackage (import ../development/interpreters/ruby/gems.nix) {
2544     inherit ruby makeWrapper;
2545   };
2546   rubygems = rubygemsFun ruby;
2548   rq = import ../applications/networking/cluster/rq {
2549     inherit fetchurl stdenv sqlite ruby ;
2550   };
2552   scsh = import ../development/interpreters/scsh {
2553     inherit stdenv fetchurl;
2554   };
2556   spidermonkey = import ../development/interpreters/spidermonkey {
2557     inherit fetchurl stdenv readline;
2558   };
2560   sysPerl = import ../development/interpreters/sys-perl {
2561     inherit stdenv;
2562   };
2564   tcl = import ../development/interpreters/tcl {
2565     inherit fetchurl stdenv;
2566   };
2568   xulrunnerWrapper = {application, launcher}:
2569     import ../development/interpreters/xulrunner/wrapper {
2570       inherit stdenv application launcher;
2571       xulrunner = xulrunner35;
2572     };
2575   ### DEVELOPMENT / MISC
2577   avrgcclibc = import ../development/misc/avr-gcc-with-avr-libc {
2578     inherit fetchurl stdenv writeTextFile gnumake coreutils gnutar bzip2
2579       gnugrep gnused gawk;
2580     gcc = gcc40;
2581   };
2583   avr8burnomat = import ../development/misc/avr8-burn-omat {
2584     inherit fetchurl stdenv unzip;
2585   };
2587   /*
2588   toolbus = import ../development/interpreters/toolbus {
2589     inherit stdenv fetchurl atermjava toolbuslib aterm yacc flex;
2590   };
2591   */
2593   sourceFromHead = import ../build-support/source-from-head-fun.nix {
2594     inherit getConfig;
2595   };
2597   ecj = import ../development/eclipse/ecj {
2598     inherit fetchurl stdenv unzip ant gcj;
2599   };
2601   jdtsdk = import ../development/eclipse/jdt-sdk {
2602     inherit fetchurl stdenv unzip;
2603   };
2605   jruby116 = import ../development/interpreters/jruby {
2606     inherit fetchurl stdenv;
2607   };
2609   guileCairo = import ../development/guile-modules/guile-cairo {
2610     inherit fetchurl stdenv guile pkgconfig cairo guileLib;
2611   };
2613   guileGnome = import ../development/guile-modules/guile-gnome {
2614     inherit fetchurl stdenv guile guileLib gwrap pkgconfig guileCairo;
2615     gconf = gnome.GConf;
2616     inherit (gnome) glib gnomevfs gtk libglade libgnome libgnomecanvas
2617       libgnomeui pango;
2618   };
2620   guileLib = import ../development/guile-modules/guile-lib {
2621     inherit fetchurl stdenv guile texinfo;
2622   };
2624   windowssdk = (
2625     import ../development/misc/windows-sdk {
2626       inherit fetchurl stdenv cabextract;
2627     });
2630   ### DEVELOPMENT / TOOLS
2633   antlr = import ../development/tools/parsing/antlr/2.7.7.nix {
2634     inherit fetchurl stdenv jdk python;
2635   };
2637   antlr3 = import ../development/tools/parsing/antlr {
2638     inherit fetchurl stdenv jre;
2639   };
2641   antDarwin = apacheAnt.override rec { jdk = openjdkDarwin ; name = "ant-" + jdk.name ; } ;
2643   ant = apacheAnt;
2644   apacheAnt = makeOverridable (import ../development/tools/build-managers/apache-ant) {
2645     inherit fetchurl stdenv jdk;
2646     name = "ant-" + jdk.name;
2647   };
2649   apacheAnt14 = import ../development/tools/build-managers/apache-ant {
2650     inherit fetchurl stdenv;
2651     jdk = j2sdk14x;
2652     name = "ant-" + j2sdk14x.name;
2653   };
2655   apacheAntGcj = import ../development/tools/build-managers/apache-ant/from-source.nix {
2656     inherit fetchurl stdenv;
2657     inherit junit; # must be either pre-built or built with GCJ *alone*
2658     javac = gcj;
2659     jvm = gcj;
2660   };
2662   autobuild = import ../development/tools/misc/autobuild {
2663     inherit fetchurl stdenv makeWrapper perl openssh rsync;
2664   };
2666   autoconf = import ../development/tools/misc/autoconf {
2667     inherit fetchurl stdenv perl m4;
2668   };
2670   autoconf213 = import ../development/tools/misc/autoconf/2.13.nix {
2671     inherit fetchurl stdenv perl m4 lzma;
2672   };
2674   automake = automake110x;
2676   automake17x = import ../development/tools/misc/automake/automake-1.7.x.nix {
2677     inherit fetchurl stdenv perl autoconf makeWrapper;
2678   };
2680   automake19x = import ../development/tools/misc/automake/automake-1.9.x.nix {
2681     inherit fetchurl stdenv perl autoconf makeWrapper;
2682   };
2684   automake110x = import ../development/tools/misc/automake/automake-1.10.x.nix {
2685     inherit fetchurl stdenv perl autoconf makeWrapper;
2686   };
2688   automake111x = import ../development/tools/misc/automake/automake-1.11.x.nix {
2689     inherit fetchurl stdenv perl autoconf makeWrapper;
2690   };
2692   avrdude = import ../development/tools/misc/avrdude {
2693     inherit lib fetchurl stdenv flex yacc composableDerivation texLive;
2694   };
2696   binutils = useFromStdenv "binutils"
2697     (import ../development/tools/misc/binutils {
2698       inherit fetchurl stdenv noSysDirs;
2699     });
2701   bison = bison23;
2703   bison1875 = import ../development/tools/parsing/bison/bison-1.875.nix {
2704     inherit fetchurl stdenv m4;
2705   };
2707   bison23 = import ../development/tools/parsing/bison/bison-2.3.nix {
2708     inherit fetchurl stdenv m4;
2709   };
2711   bison24 = import ../development/tools/parsing/bison/bison-2.4.nix {
2712     inherit fetchurl stdenv m4;
2713   };
2715   buildbot = import ../development/tools/build-managers/buildbot {
2716     inherit fetchurl stdenv buildPythonPackage texinfo;
2717     inherit (pythonPackages) twisted;
2718   };
2720   byacc = import ../development/tools/parsing/byacc {
2721     inherit fetchurl stdenv;
2722   };
2724   camlp5_strict = import ../development/tools/ocaml/camlp5 {
2725     inherit stdenv fetchurl ocaml;
2726   };
2728   camlp5_transitional = import ../development/tools/ocaml/camlp5 {
2729     inherit stdenv fetchurl ocaml;
2730     transitional = true;
2731   };
2733   ccache = import ../development/tools/misc/ccache {
2734     inherit fetchurl stdenv;
2735   };
2737   ctags = import ../development/tools/misc/ctags {
2738     inherit fetchurl sourceFromHead stdenv automake autoconf;
2739   };
2741   ctagsWrapped = import ../development/tools/misc/ctags/wrapped.nix {
2742     inherit pkgs ctags writeScriptBin;
2743   };
2745   cmake = import ../development/tools/build-managers/cmake {
2746     inherit fetchurl stdenv replace ncurses;
2747   };
2749   coccinelle = import ../development/tools/misc/coccinelle {
2750     inherit fetchurl stdenv perl python ocaml ncurses makeWrapper;
2751   };
2753   cproto = import ../development/tools/misc/cproto {
2754     inherit fetchurl stdenv flex bison;
2755   };
2757   cflow = import ../development/tools/misc/cflow {
2758     inherit fetchurl stdenv gettext emacs;
2759   };
2761   cscope = import ../development/tools/misc/cscope {
2762     inherit fetchurl stdenv ncurses pkgconfig emacs;
2763   };
2765   dejagnu = import ../development/tools/misc/dejagnu {
2766     inherit fetchurl stdenv expect makeWrapper;
2767   };
2769   ddd = import ../development/tools/misc/ddd {
2770     inherit fetchurl stdenv lesstif ncurses;
2771     inherit (xlibs) libX11 libXt;
2772   };
2774   distcc = import ../development/tools/misc/distcc {
2775     inherit fetchurl stdenv popt;
2776     python = if getPkgConfig "distcc" "python" true then python else null;
2777     avahi = if getPkgConfig "distcc" "avahi" false then avahi else null;
2778     pkgconfig = if getPkgConfig "distcc" "gtk" false then pkgconfig else null;
2779     gtk = if getPkgConfig "distcc" "gtk" false then gtkLibs.gtk else null;
2780     static = getPkgConfig "distcc" "static" false;
2781   };
2783   docutils = builderDefsPackage (import ../development/tools/documentation/docutils) {
2784     inherit python pil makeWrapper;
2785   };
2787   doxygen = import ../development/tools/documentation/doxygen {
2788     inherit fetchurl stdenv graphviz perl flex bison gnumake;
2789     inherit (xlibs) libX11 libXext;
2790     qt = if getPkgConfig "doxygen" "qt4" true then qt4 else null;
2791   };
2793   eggdbus = import ../development/tools/misc/eggdbus {
2794     inherit stdenv fetchurl pkgconfig dbus dbus_glib glib;
2795   };
2797   elfutils = import ../development/tools/misc/elfutils {
2798     inherit fetchurl stdenv m4;
2799   };
2801   epm = import ../development/tools/misc/epm {
2802     inherit fetchurl stdenv rpm;
2803   };
2805   emma = import ../development/tools/analysis/emma {
2806     inherit fetchurl stdenv unzip;
2807   };
2809   findbugs = import ../development/tools/analysis/findbugs {
2810     inherit fetchurl stdenv;
2811   };
2813   pmd = import ../development/tools/analysis/pmd {
2814     inherit fetchurl stdenv unzip;
2815   };
2817   jdepend = import ../development/tools/analysis/jdepend {
2818     inherit fetchurl stdenv unzip;
2819   };
2821   checkstyle = import ../development/tools/analysis/checkstyle {
2822     inherit fetchurl stdenv unzip;
2823   };
2825   flex = flex254a;
2827   flex2535 = import ../development/tools/parsing/flex/flex-2.5.35.nix {
2828     inherit fetchurl stdenv yacc m4;
2829   };
2831   flex2534 = import ../development/tools/parsing/flex/flex-2.5.34.nix {
2832     inherit fetchurl stdenv yacc m4;
2833   };
2835   flex2533 = import ../development/tools/parsing/flex/flex-2.5.33.nix {
2836     inherit fetchurl stdenv yacc m4;
2837   };
2839   # Note: 2.5.4a is much older than 2.5.35 but happens first when sorting
2840   # alphabetically, hence the low priority.
2841   flex254a = lowPrio (import ../development/tools/parsing/flex/flex-2.5.4a.nix {
2842     inherit fetchurl stdenv yacc;
2843   });
2845   m4 = gnum4;
2847   global = import ../development/tools/misc/global {
2848     inherit fetchurl stdenv;
2849   };
2851   gnum4 = import ../development/tools/misc/gnum4 {
2852     inherit fetchurl stdenv;
2853   };
2855   gnumake = useFromStdenv "gnumake"
2856     (import ../development/tools/build-managers/gnumake {
2857       inherit fetchurl stdenv;
2858     });
2860   gnumake380 = import ../development/tools/build-managers/gnumake-3.80 {
2861     inherit fetchurl stdenv;
2862   };
2864   gperf = import ../development/tools/misc/gperf {
2865     inherit fetchurl stdenv;
2866   };
2868   gtkdialog = import ../development/tools/misc/gtkdialog {
2869     inherit fetchurl stdenv pkgconfig;
2870     inherit (gtkLibs) gtk;
2871   };
2873   guileLint = import ../development/tools/guile/guile-lint {
2874     inherit fetchurl stdenv guile;
2875   };
2877   gwrap = import ../development/tools/guile/g-wrap {
2878     inherit fetchurl stdenv guile libffi pkgconfig guileLib glib;
2879   };
2881   help2man = import ../development/tools/misc/help2man {
2882     inherit fetchurl stdenv perl gettext;
2883     inherit (perlPackages) LocaleGettext;
2884   };
2886   iconnamingutils = import ../development/tools/misc/icon-naming-utils {
2887     inherit fetchurl stdenv perl;
2888     inherit (perlPackages) XMLSimple;
2889   };
2891   indent = import ../development/tools/misc/indent {
2892     inherit fetchurl stdenv;
2893   };
2895   inotifyTools = import ../development/tools/misc/inotify-tools {
2896     inherit fetchurl stdenv lib;
2897   };
2899   jikespg = import ../development/tools/parsing/jikespg {
2900     inherit fetchurl stdenv;
2901   };
2903   kcachegrind = import ../development/tools/misc/kcachegrind {
2904     inherit fetchurl stdenv kdelibs zlib perl expat libpng libjpeg;
2905     inherit (xlibs) libX11 libXext libSM;
2906     qt = qt3;
2907   };
2909   lcov = import ../development/tools/analysis/lcov {
2910     inherit fetchurl stdenv perl;
2911   };
2913   libtool = libtool_2;
2915   libtool_1_5 = import ../development/tools/misc/libtool {
2916     inherit fetchurl stdenv perl m4;
2917   };
2919   libtool_2 = import ../development/tools/misc/libtool/libtool2.nix {
2920     inherit fetchurl stdenv lzma perl m4;
2921   };
2923   lsof = import ../development/tools/misc/lsof {
2924     inherit fetchurl stdenv;
2925   };
2927   ltrace = composedArgsAndFun (import ../development/tools/misc/ltrace/0.5-3deb.nix) {
2928     inherit fetchurl stdenv builderDefs stringsWithDeps lib elfutils;
2929   };
2931   mk = import ../development/tools/build-managers/mk {
2932     inherit fetchurl stdenv;
2933   };
2935   noweb = import ../development/tools/literate-programming/noweb {
2936     inherit fetchurl stdenv;
2937   };
2939   openocd = import ../development/tools/misc/openocd {
2940     inherit fetchurl stdenv libftdi;
2941   };
2943   oprofile = import ../development/tools/profiling/oprofile {
2944     inherit fetchurl stdenv binutils popt;
2945     inherit makeWrapper gawk which gnugrep;
2946   };
2948   patchelf = useFromStdenv "patchelf"
2949     (import ../development/tools/misc/patchelf {
2950       inherit fetchurl stdenv;
2951     });
2953   patchelf05 = import ../development/tools/misc/patchelf/0.5.nix {
2954     inherit fetchurl stdenv;
2955   };
2957   pmccabe = import ../development/tools/misc/pmccabe {
2958     inherit fetchurl stdenv;
2959   };
2961   /**
2962    * pkgconfig is optionally taken from the stdenv to allow bootstrapping
2963    * of glib and pkgconfig itself on MinGW.
2964    */
2965   pkgconfig = useFromStdenv "pkgconfig"
2966     (import ../development/tools/misc/pkgconfig {
2967       inherit fetchurl stdenv;
2968     });
2970   radare = import ../development/tools/analysis/radare {
2971     inherit stdenv fetchurl pkgconfig libusb readline gtkdialog python
2972       ruby libewf perl;
2973     inherit (gtkLibs) gtk;
2974     inherit (gnome) vte;
2975     lua = lua5;
2976     useX11 = getConfig ["radare" "useX11"] false;
2977     pythonBindings = getConfig ["radare" "pythonBindings"] false;
2978     rubyBindings = getConfig ["radare" "rubyBindings"] false;
2979     luaBindings = getConfig ["radare" "luaBindings"] false;
2980   };
2982   ragel = import ../development/tools/parsing/ragel {
2983     inherit composableDerivation fetchurl transfig texLive;
2984   };
2986   remake = import ../development/tools/build-managers/remake {
2987       inherit fetchurl stdenv;
2988     };
2990   # couldn't find the source yet
2991   seleniumRCBin = import ../development/tools/selenium/remote-control {
2992     inherit fetchurl stdenv unzip;
2993     jre = jdk;
2994   };
2996   scons = import ../development/tools/build-managers/scons {
2997     inherit fetchurl stdenv python makeWrapper;
2998   };
3000   sloccount = import ../development/tools/misc/sloccount {
3001     inherit fetchurl stdenv perl;
3002   };
3004   sparse = import ../development/tools/analysis/sparse {
3005     inherit fetchurl stdenv pkgconfig;
3006   };
3008   spin = import ../development/tools/analysis/spin {
3009     inherit fetchurl stdenv flex yacc tk;
3010   };
3012   splint = import ../development/tools/analysis/splint {
3013     inherit fetchurl stdenv flex;
3014   };
3016   strace = import ../development/tools/misc/strace {
3017     inherit fetchurl stdenv;
3018   };
3020   swig = import ../development/tools/misc/swig {
3021     inherit fetchurl stdenv boost;
3022   };
3024   swigWithJava = swig;
3026   swftools = import ../tools/video/swftools {
3027     inherit fetchurl stdenv x264 zlib libjpeg freetype giflib;
3028   };
3030   texinfo49 = import ../development/tools/misc/texinfo/4.9.nix {
3031     inherit fetchurl stdenv ncurses;
3032   };
3034   texinfo = import ../development/tools/misc/texinfo {
3035     inherit fetchurl stdenv ncurses lzma;
3036   };
3038   texi2html = import ../development/tools/misc/texi2html {
3039     inherit fetchurl stdenv perl;
3040   };
3042   uisp = import ../development/tools/misc/uisp {
3043     inherit fetchurl stdenv;
3044   };
3046   gdb = import ../development/tools/misc/gdb {
3047     inherit fetchurl stdenv ncurses gmp mpfr expat texinfo;
3048     readline = readline5;
3049   };
3051   valgrind = import ../development/tools/analysis/valgrind {
3052     inherit fetchurl stdenv perl gdb;
3053   };
3055   xxdiff = builderDefsPackage (import ../development/tools/misc/xxdiff/3.2.nix) {
3056     flex = flex2535;
3057     qt = qt3;
3058     inherit pkgconfig makeWrapper bison python;
3059     inherit (xlibs) libXext libX11;
3060   };
3062   yacc = bison;
3064   yodl = import ../development/tools/misc/yodl {
3065     inherit stdenv fetchurl perl;
3066   };
3069   ### DEVELOPMENT / LIBRARIES
3072   a52dec = import ../development/libraries/a52dec {
3073     inherit fetchurl stdenv;
3074   };
3076   aalib = import ../development/libraries/aalib {
3077     inherit fetchurl stdenv ncurses;
3078   };
3080   acl = useFromStdenv "acl"
3081     (import ../development/libraries/acl {
3082       inherit stdenv fetchurl gettext attr libtool;
3083     });
3085   adns = import ../development/libraries/adns/1.4.nix {
3086     inherit stdenv fetchurl;
3087     static = getPkgConfig "adns" "static" (stdenv ? isStatic || stdenv ? isDietLibC);
3088   };
3090   agg = import ../development/libraries/agg {
3091     inherit fetchurl stdenv autoconf automake libtool pkgconfig
3092       freetype SDL;
3093     inherit (xlibs) libX11;
3094   };
3096   amrnb = import ../development/libraries/amrnb {
3097     inherit fetchurl stdenv unzip;
3098   };
3100   amrwb = import ../development/libraries/amrwb {
3101     inherit fetchurl stdenv unzip;
3102   };
3104   apr = makeOverridable (import ../development/libraries/apr) {
3105     inherit (pkgsOverriden) fetchurl stdenv;
3106   };
3108   aprutil = makeOverridable (import ../development/libraries/apr-util) {
3109     inherit (pkgsOverriden) fetchurl stdenv apr expat db4;
3110     bdbSupport = true;
3111   };
3113   arts = import ../development/libraries/arts {
3114     inherit fetchurl stdenv pkgconfig;
3115     inherit (xlibs) libX11 libXext;
3116     inherit kdelibs zlib libjpeg libpng perl;
3117     qt = qt3;
3118     inherit (gnome) glib;
3119   };
3121   aspell = import ../development/libraries/aspell {
3122     inherit fetchurl stdenv perl;
3123   };
3125   aspellDicts = recurseIntoAttrs (import ../development/libraries/aspell/dictionaries.nix {
3126     inherit fetchurl stdenv aspell which;
3127   });
3129   aterm = aterm25;
3131   aterm242fixes = lowPrio (import ../development/libraries/aterm/2.4.2-fixes.nix {
3132     inherit fetchurl stdenv;
3133   });
3135   aterm25 = makeOverridable (import ../development/libraries/aterm/2.5.nix) {
3136     inherit fetchurl stdenv;
3137   };
3139   aterm28 = lowPrio (import ../development/libraries/aterm/2.8.nix {
3140     inherit fetchurl stdenv;
3141   });
3143   attr = useFromStdenv "attr"
3144     (import ../development/libraries/attr {
3145       inherit stdenv fetchurl gettext libtool;
3146     });
3148   aubio = import ../development/libraries/aubio {
3149     inherit fetchurl stdenv pkgconfig fftw libsndfile libsamplerate python
3150       alsaLib jackaudio;
3151   };
3153   axis = import ../development/libraries/axis {
3154     inherit fetchurl stdenv;
3155   };
3157   babl = import ../development/libraries/babl {
3158     inherit fetchurl stdenv;
3159   };
3161   beecrypt = import ../development/libraries/beecrypt {
3162     inherit fetchurl stdenv m4;
3163   };
3165   boehmgc = import ../development/libraries/boehm-gc {
3166     inherit fetchurl stdenv;
3167   };
3169   boolstuff = import ../development/libraries/boolstuff {
3170     inherit fetchurl stdenv lib pkgconfig;
3171   };
3173   boost_1_36_0 = import ../development/libraries/boost/1.36.0.nix {
3174     inherit fetchurl stdenv icu expat zlib bzip2 python;
3175   };
3177   boost = makeOverridable (import ../development/libraries/boost/1.41.0.nix) {
3178     inherit fetchurl stdenv icu expat zlib bzip2 python;
3179   };
3181   # A Boost build with all library variants enabled.  Very large (about 250 MB).
3182   boostFull = appendToName "full" (boost.override {
3183     enableDebug = true;
3184     enableSingleThreaded = true;
3185     enableStatic = true;
3186   });
3188   botan = builderDefsPackage (import ../development/libraries/botan) {
3189     inherit perl;
3190   };
3192   buddy = import ../development/libraries/buddy {
3193     inherit fetchurl stdenv bison;
3194   };
3196   cairo = import ../development/libraries/cairo {
3197     inherit fetchurl stdenv pkgconfig x11 fontconfig freetype zlib libpng;
3198     inherit (xlibs) pixman libxcb xcbutil;
3199   };
3201   cairomm = import ../development/libraries/cairomm {
3202     inherit fetchurl stdenv pkgconfig cairo x11 fontconfig freetype libsigcxx;
3203   };
3205   scmccid = import ../development/libraries/scmccid {
3206     inherit fetchurl stdenv libusb patchelf;
3207   };
3209   ccrtp = import ../development/libraries/ccrtp {
3210     inherit fetchurl stdenv lib pkgconfig openssl libgcrypt commoncpp2;
3211   };
3213   chipmunk = builderDefsPackage (import ../development/libraries/chipmunk) {
3214     inherit cmake freeglut mesa;
3215     inherit (xlibs) libX11 xproto inputproto libXi libXmu;
3216   };
3218   chmlib = import ../development/libraries/chmlib {
3219     inherit fetchurl stdenv;
3220   };
3222   cil = import ../development/libraries/cil {
3223     inherit stdenv fetchurl ocaml perl;
3224   };
3226   cilaterm = import ../development/libraries/cil-aterm {
3227     stdenv = overrideInStdenv stdenv [gnumake380];
3228     inherit fetchurl perl ocaml;
3229   };
3231   clanlib = import ../development/libraries/clanlib {
3232     inherit fetchurl stdenv zlib libpng libjpeg libvorbis libogg mesa;
3233     inherit (xlibs) libX11 xf86vidmodeproto libXmu libXxf86vm;
3234   };
3236   classads = import ../development/libraries/classads {
3237     inherit fetchurl stdenv;
3238   };
3240   classpath = import ../development/libraries/java/classpath {
3241     javac = gcj;
3242     jvm = gcj;
3243     inherit fetchurl stdenv pkgconfig antlr;
3244     inherit (gtkLibs) gtk;
3245     gconf = gnome.GConf;
3246   };
3248   clearsilver = import ../development/libraries/clearsilver {
3249     inherit fetchurl stdenv python;
3250   };
3252   clppcre = builderDefsPackage (import ../development/libraries/cl-ppcre) {
3253   };
3255   cluceneCore = (import ../development/libraries/clucene-core) {
3256     inherit fetchurl stdenv;
3257   };
3259   commoncpp2 = import ../development/libraries/commoncpp2 {
3260     inherit stdenv fetchurl lib;
3261   };
3263   consolekit = makeOverridable (import ../development/libraries/consolekit) {
3264     inherit stdenv fetchurl pkgconfig dbus_glib zlib pam policykit expat glib;
3265     inherit (xlibs) libX11;
3266   };
3268   coredumper = import ../development/libraries/coredumper {
3269     inherit fetchurl stdenv;
3270   };
3272   ctl = import ../development/libraries/ctl {
3273     inherit fetchurl stdenv ilmbase;
3274   };
3276   cppunit = import ../development/libraries/cppunit {
3277     inherit fetchurl stdenv;
3278   };
3280   cracklib = import ../development/libraries/cracklib {
3281     inherit fetchurl stdenv;
3282   };
3284   cryptopp = import ../development/libraries/crypto++ {
3285     inherit fetchurl stdenv unzip libtool;
3286   };
3288   cyrus_sasl = import ../development/libraries/cyrus-sasl {
3289     inherit fetchurl stdenv openssl db4 gettext;
3290   };
3292   db4 = db45;
3294   db44 = import ../development/libraries/db4/db4-4.4.nix {
3295     inherit fetchurl stdenv;
3296   };
3298   db45 = import ../development/libraries/db4/db4-4.5.nix {
3299     inherit fetchurl stdenv;
3300   };
3302   dbus = import ../development/libraries/dbus {
3303     inherit fetchurl stdenv pkgconfig expat;
3304     inherit (xlibs) libX11 libICE libSM;
3305     useX11 = true; # !!! `false' doesn't build
3306   };
3308   dbus_glib = makeOverridable (import ../development/libraries/dbus-glib) {
3309     inherit fetchurl stdenv pkgconfig gettext dbus expat glib;
3310   };
3312   dbus_java = import ../development/libraries/java/dbus-java {
3313     inherit stdenv fetchurl gettext jdk libmatthew_java;
3314   };
3316   dclib = import ../development/libraries/dclib {
3317     inherit fetchurl stdenv libxml2 openssl bzip2;
3318   };
3320   directfb = import ../development/libraries/directfb {
3321     inherit fetchurl stdenv perl zlib libjpeg freetype
3322       SDL libpng giflib;
3323     inherit (xlibs) libX11 libXext xproto xextproto renderproto
3324       libXrender;
3325   };
3327   enchant = makeOverridable (import ../development/libraries/enchant) {
3328     inherit fetchurl stdenv aspell pkgconfig;
3329     inherit (gnome) glib;
3330   };
3332   enginepkcs11 = import ../development/libraries/enginepkcs11 {
3333     inherit fetchurl stdenv libp11 pkgconfig openssl;
3334   };
3336   exiv2 = import ../development/libraries/exiv2 {
3337     inherit fetchurl stdenv zlib;
3338   };
3340   expat = import ../development/libraries/expat {
3341     inherit fetchurl stdenv;
3342   };
3344   extremetuxracer = builderDefsPackage (import ../games/extremetuxracer) {
3345     inherit mesa tcl freeglut SDL SDL_mixer pkgconfig
3346         libpng gettext intltool;
3347     inherit (xlibs) libX11 xproto libXi inputproto
3348         libXmu libXext xextproto libXt libSM libICE;
3349   };
3351   eventlog = import ../development/libraries/eventlog {
3352     inherit fetchurl stdenv;
3353   };
3355   facile = import ../development/libraries/facile {
3356     inherit fetchurl stdenv;
3357     # Actually, we don't need this version but we need native-code compilation
3358     ocaml = ocaml_3_10_0;
3359   };
3361   faac = import ../development/libraries/faac {
3362     inherit fetchurl stdenv autoconf automake libtool;
3363   };
3365   faad2 = import ../development/libraries/faad2 {
3366     inherit fetchurl stdenv;
3367   };
3369   farsight2 = import ../development/libraries/farsight2 {
3370     inherit fetchurl stdenv libnice pkgconfig python;
3371     inherit (gnome) glib;
3372     inherit (gst_all) gstreamer gstPluginsBase;
3373   };
3375   fcgi = import ../development/libraries/fcgi {
3376       inherit fetchurl stdenv;
3377   };
3379   ffmpeg = import ../development/libraries/ffmpeg {
3380     inherit fetchurl stdenv faad2;
3381   };
3383   fftw = import ../development/libraries/fftw {
3384     inherit fetchurl stdenv builderDefs stringsWithDeps;
3385     singlePrecision = false;
3386   };
3388   fftwSinglePrec = import ../development/libraries/fftw {
3389     inherit fetchurl stdenv builderDefs stringsWithDeps;
3390     singlePrecision = true;
3391   };
3393   fltk11 = (import ../development/libraries/fltk/fltk11.nix) {
3394     inherit composableDerivation x11 lib pkgconfig freeglut;
3395     inherit fetchurl stdenv mesa libpng libjpeg zlib ;
3396     inherit (xlibs) inputproto libXi libXinerama libXft;
3397     flags = [ "useNixLibs" "threads" "shared" "gl" ];
3398   };
3400   fltk20 = (import ../development/libraries/fltk) {
3401     inherit composableDerivation x11 lib pkgconfig freeglut;
3402     inherit fetchurl stdenv mesa libpng libjpeg zlib ;
3403     inherit (xlibs) inputproto libXi libXinerama libXft;
3404     flags = [ "useNixLibs" "threads" "shared" "gl" ];
3405   };
3407   fmod = import ../development/libraries/fmod {
3408     inherit stdenv fetchurl;
3409   };
3411   freeimage = import ../development/libraries/freeimage {
3412     inherit fetchurl stdenv unzip;
3413   };
3415   freetts = import ../development/libraries/freetts {
3416     inherit stdenv fetchurl apacheAnt unzip sharutils lib;
3417   };
3419   cfitsio = import ../development/libraries/cfitsio {
3420     inherit fetchurl stdenv;
3421   };
3423   fontconfig = import ../development/libraries/fontconfig {
3424     inherit fetchurl stdenv freetype expat;
3425   };
3427   makeFontsConf = let fontconfig_ = fontconfig; in {fontconfig ? fontconfig_, fontDirectories}:
3428     import ../development/libraries/fontconfig/make-fonts-conf.nix {
3429       inherit runCommand libxslt fontconfig fontDirectories;
3430     };
3432   freealut = import ../development/libraries/freealut {
3433     inherit fetchurl stdenv openal;
3434   };
3436   freeglut = import ../development/libraries/freeglut {
3437     inherit fetchurl stdenv x11 mesa;
3438   };
3440   freetype = import ../development/libraries/freetype {
3441     inherit fetchurl stdenv;
3442   };
3444   fribidi = import ../development/libraries/fribidi {
3445     inherit fetchurl stdenv;
3446   };
3448   fam = gamin;
3450   gamin = import ../development/libraries/gamin {
3451     inherit fetchurl stdenv python pkgconfig glib;
3452   };
3454   gav = import ../games/gav {
3455     inherit fetchurl SDL SDL_image SDL_mixer SDL_net;
3456     stdenv = overrideGCC stdenv gcc41;
3457   };
3459   gdbm = import ../development/libraries/gdbm {
3460     inherit fetchurl stdenv;
3461   };
3463   gdk_pixbuf = import ../development/libraries/gdk-pixbuf {
3464     inherit fetchurl stdenv libtiff libjpeg libpng;
3465     inherit (gtkLibs1x) gtk;
3466   };
3468   gegl = import ../development/libraries/gegl {
3469     inherit fetchurl stdenv libpng pkgconfig babl;
3470     openexr = openexr_1_6_1;
3471     #  avocodec avformat librsvg
3472     inherit cairo libjpeg librsvg;
3473     inherit (gtkLibs) pango glib gtk;
3474   };
3476   geoip = builderDefsPackage ../development/libraries/geoip {
3477     inherit zlib;
3478   };
3480   geos = import ../development/libraries/geos {
3481     inherit fetchurl fetchsvn stdenv autoconf
3482       automake libtool swig which lib composableDerivation python ruby;
3483     use_svn = stdenv.system == "x86_64-linux";
3484   };
3486   gettext = import ../development/libraries/gettext {
3487     inherit fetchurl stdenv libiconv;
3488   };
3490   gd = import ../development/libraries/gd {
3491     inherit fetchurl stdenv zlib libpng freetype libjpeg fontconfig;
3492   };
3494   gdal = stdenv.mkDerivation {
3495     name = "gdal-1.6.1-rc1";
3496     src = fetchurl {
3497       url = ftp://ftp.remotesensing.org/gdal/gdal-1.6.1-RC1.tar.gz;
3498       sha256 = "0f7da588yvb1d3l3gk5m0hrqlhg8m4gw93aip3dwkmnawz9r0qcw";
3499     };
3500   };
3502   giblib = import ../development/libraries/giblib {
3503     inherit fetchurl stdenv x11 imlib2;
3504   };
3506   glew = import ../development/libraries/glew {
3507     inherit fetchurl stdenv mesa x11 libtool;
3508     inherit (xlibs) libXmu libXi;
3509   };
3511   glefw = import ../development/libraries/glefw {
3512     inherit fetchurl stdenv lib mesa;
3513     inherit (xlibs) libX11 libXext xextproto;
3514   };
3516   glibc =
3517     let haveRedHatKernel       = system == "i686-linux" || system == "x86_64-linux";
3518         haveBrokenRedHatKernel = haveRedHatKernel && getConfig ["brokenRedHatKernel"] false;
3519     in
3520     useFromStdenv "glibc" (if haveBrokenRedHatKernel then glibc25 else glibc29);
3522   glibc25 = import ../development/libraries/glibc-2.5 {
3523     inherit fetchurl stdenv kernelHeaders;
3524     installLocales = getPkgConfig "glibc" "locales" false;
3525   };
3527   glibc27 = import ../development/libraries/glibc-2.7 {
3528     inherit fetchurl stdenv kernelHeaders;
3529     #installLocales = false;
3530   };
3532   glibc29 = import ../development/libraries/glibc-2.9 {
3533     inherit fetchurl stdenv kernelHeaders;
3534     installLocales = getPkgConfig "glibc" "locales" false;
3535   };
3537   glibcLocales = makeOverridable (import ../development/libraries/glibc-2.9/locales.nix) {
3538     inherit fetchurl stdenv;
3539   };
3541   glibcInfo = import ../development/libraries/glibc-2.9/info.nix {
3542     inherit fetchurl stdenv texinfo perl;
3543   };
3545   glibc_multi =
3546       runCommand "${glibc.name}-multi"
3547         { glibc64 = glibc;
3548           glibc32 = (import ./all-packages.nix {system = "i686-linux";}).glibc;
3549         }
3550         ''
3551           ensureDir $out
3552           ln -s $glibc64/* $out/
3554           rm $out/lib $out/lib64
3555           ensureDir $out/lib
3556           ln -s $glibc64/lib/* $out/lib
3557           ln -s $glibc32/lib $out/lib/32
3558           ln -s lib $out/lib64
3560           rm $out/include
3561           cp -rs $glibc32/include $out
3562           chmod -R u+w $out/include
3563           cp -rsf $glibc64/include $out
3564         '' # */
3565         ;
3567   gmime = import ../development/libraries/gmime {
3568     inherit fetchurl stdenv pkgconfig zlib glib;
3569   };
3571   gmm = import ../development/libraries/gmm {
3572     inherit fetchurl stdenv;
3573   };
3575   gmp = import ../development/libraries/gmp {
3576     inherit fetchurl stdenv m4;
3577     cxx = false;
3578   };
3580   gmpxx = import ../development/libraries/gmp {
3581     inherit fetchurl stdenv m4;
3582     cxx = true;
3583   };
3585   goffice = import ../development/libraries/goffice {
3586     inherit fetchurl stdenv pkgconfig libgsf libxml2 cairo
3587       intltool gettext bzip2;
3588     inherit (gnome) glib gtk libglade libgnomeui pango;
3589     gconf = gnome.GConf;
3590     libart = gnome.libart_lgpl;
3591   };
3593   goocanvas = import ../development/libraries/goocanvas {
3594     inherit fetchurl stdenv pkgconfig cairo;
3595     inherit (gnome) gtk glib;
3596   };
3598   #GMP ex-satellite, so better keep it near gmp
3599   mpfr = import ../development/libraries/mpfr {
3600     inherit fetchurl stdenv gmp;
3601   };
3603   gst_all = recurseIntoAttrs (import ../development/libraries/gstreamer {
3604     inherit lib stdenv fetchurl perl bison pkgconfig libxml2
3605       python alsaLib cdparanoia libogg libvorbis libtheora freetype liboil
3606       libjpeg zlib speex libpng libdv aalib cairo libcaca flac hal libiec61883
3607       dbus libavc1394 ladspaH taglib pulseaudio gdbm bzip2 which makeOverridable
3608       libcap libtasn1;
3609     flex = flex2535;
3610     inherit (xorg) libX11 libXv libXext;
3611     inherit (gtkLibs) glib pango gtk;
3612     inherit (gnome) gnomevfs /* <- only passed for the no longer used older versions
3613              it is deprecated and didn't build on amd64 due to samba dependency */ gtkdoc
3614              libsoup;
3615   });
3617   gnet = import ../development/libraries/gnet {
3618     inherit fetchurl stdenv pkgconfig glib;
3619   };
3621   gnutls = import ../development/libraries/gnutls {
3622     inherit fetchurl stdenv libgcrypt zlib lzo libtasn1 guile;
3623     guileBindings = getConfig ["gnutls" "guile"] true;
3624   };
3626   gpgme = import ../development/libraries/gpgme {
3627     inherit fetchurl stdenv libgpgerror pkgconfig pth gnupg gnupg2 glib;
3628   };
3630   gsl = import ../development/libraries/gsl {
3631     inherit fetchurl stdenv;
3632   };
3634   gsoap = import ../development/libraries/gsoap {
3635     inherit fetchurl stdenv m4 bison flex openssl zlib;
3636   };
3638   gtkimageview = import ../development/libraries/gtkimageview {
3639     inherit fetchurl stdenv pkgconfig;
3640     inherit (gnome) gtk;
3641   };
3643   gtkLibs = recurseIntoAttrs gtkLibs218;
3645   glib = gtkLibs.glib;
3647   gtkLibs1x = rec {
3649     glib = import ../development/libraries/glib/1.2.x.nix {
3650       inherit fetchurl stdenv;
3651     };
3653     gtk = import ../development/libraries/gtk+/1.2.x.nix {
3654       inherit fetchurl stdenv x11 glib;
3655     };
3657   };
3659   gtkLibs216 = rec {
3661     glib = import ../development/libraries/glib/2.20.x.nix {
3662       inherit fetchurl stdenv pkgconfig gettext perl;
3663     };
3665     glibmm = import ../development/libraries/glibmm/2.18.x.nix {
3666       inherit fetchurl stdenv pkgconfig glib libsigcxx;
3667     };
3669     atk = import ../development/libraries/atk/1.24.x.nix {
3670       inherit fetchurl stdenv pkgconfig perl glib;
3671     };
3673     pango = import ../development/libraries/pango/1.24.x.nix {
3674       inherit fetchurl stdenv pkgconfig gettext x11 glib cairo libpng;
3675     };
3677     pangomm = import ../development/libraries/pangomm/2.14.x.nix {
3678       inherit fetchurl stdenv pkgconfig pango glibmm cairomm libpng;
3679     };
3681     gtk = import ../development/libraries/gtk+/2.16.x.nix {
3682       inherit fetchurl stdenv pkgconfig perl jasper x11 glib atk pango
3683         libtiff libjpeg libpng cairo xlibs;
3684     };
3686     gtkmm = import ../development/libraries/gtkmm/2.14.x.nix {
3687       inherit fetchurl stdenv pkgconfig gtk atk glibmm cairomm pangomm;
3688     };
3690   };
3692   gtkLibs218 = rec {
3694     glib = import ../development/libraries/glib/2.22.x.nix {
3695       inherit fetchurl stdenv pkgconfig gettext perl;
3696     };
3698     glibmm = import ../development/libraries/glibmm/2.22.x.nix {
3699       inherit fetchurl stdenv pkgconfig glib libsigcxx;
3700     };
3702     atk = import ../development/libraries/atk/1.28.x.nix {
3703       inherit fetchurl stdenv pkgconfig perl glib;
3704     };
3706     pango = import ../development/libraries/pango/1.26.x.nix {
3707       inherit fetchurl stdenv pkgconfig gettext x11 glib cairo libpng;
3708     };
3710     pangomm = import ../development/libraries/pangomm/2.26.x.nix {
3711       inherit fetchurl stdenv pkgconfig pango glibmm cairomm libpng;
3712     };
3714     gtk = import ../development/libraries/gtk+/2.18.x.nix {
3715       inherit fetchurl stdenv pkgconfig perl jasper glib atk pango
3716         libtiff libjpeg libpng cairo xlibs cups;
3717     };
3719     gtkmm = import ../development/libraries/gtkmm/2.18.x.nix {
3720       inherit fetchurl stdenv pkgconfig gtk atk glibmm cairomm pangomm;
3721     };
3723   };
3725   gtkmozembedsharp = import ../development/libraries/gtkmozembed-sharp {
3726     inherit fetchurl stdenv mono pkgconfig monoDLLFixer;
3727     inherit (gnome) gtk;
3728     gtksharp = gtksharp2;
3729   };
3731   gtksharp1 = import ../development/libraries/gtk-sharp-1 {
3732     inherit fetchurl stdenv mono pkgconfig libxml2 monoDLLFixer;
3733     inherit (gnome) gtk glib pango libglade libgtkhtml gtkhtml
3734               libgnomecanvas libgnomeui libgnomeprint
3735               libgnomeprintui GConf;
3736   };
3738   gtksharp2 = import ../development/libraries/gtk-sharp-2 {
3739     inherit fetchurl stdenv mono pkgconfig libxml2 monoDLLFixer;
3740     inherit (gnome) gtk glib pango libglade libgtkhtml gtkhtml
3741               libgnomecanvas libgnomeui libgnomeprint
3742               libgnomeprintui GConf gnomepanel;
3743   };
3745   gtksourceviewsharp = import ../development/libraries/gtksourceview-sharp {
3746     inherit fetchurl stdenv mono pkgconfig monoDLLFixer;
3747     inherit (gnome) gtksourceview;
3748     gtksharp = gtksharp2;
3749   };
3751   gtkspell = import ../development/libraries/gtkspell {
3752     inherit fetchurl stdenv pkgconfig;
3753     inherit (gtkLibs) gtk;
3754     inherit aspell;
3755   };
3757   # TODO : Add MIT Kerberos and let admin choose.
3758   kerberos = heimdal;
3760   heimdal = import ../development/libraries/kerberos/heimdal.nix {
3761     inherit fetchurl stdenv readline db4 openssl openldap cyrus_sasl;
3762   };
3764   hsqldb = import ../development/libraries/java/hsqldb {
3765     inherit stdenv fetchurl unzip;
3766   };
3768   hwloc = import ../development/libraries/hwloc {
3769     inherit fetchurl stdenv pkgconfig cairo expat;
3770   };
3772   icu = import ../development/libraries/icu {
3773     inherit fetchurl stdenv;
3774   };
3776   id3lib = import ../development/libraries/id3lib {
3777     inherit fetchurl stdenv;
3778   };
3780   ilbc = import ../development/libraries/ilbc {
3781     inherit stdenv msilbc;
3782   };
3784   ilmbase = import ../development/libraries/ilmbase {
3785     inherit fetchurl stdenv;
3786   };
3788   imlib = import ../development/libraries/imlib {
3789     inherit fetchurl stdenv libjpeg libtiff libungif libpng;
3790     inherit (xlibs) libX11 libXext xextproto;
3791   };
3793   imlib2 = import ../development/libraries/imlib2 {
3794     inherit fetchurl stdenv x11 libjpeg libtiff libungif libpng bzip2;
3795   };
3797   indilib = import ../development/libraries/indilib {
3798     inherit fetchurl stdenv cfitsio libusb zlib;
3799   };
3801   iniparser = import ../development/libraries/iniparser {
3802     inherit fetchurl stdenv;
3803   };
3805   intltool = gnome.intltool;
3807   isocodes = import ../development/libraries/iso-codes {
3808     inherit stdenv fetchurl gettext python;
3809   };
3811   jamp = builderDefsPackage ../games/jamp {
3812     inherit mesa SDL SDL_image SDL_mixer;
3813   };
3815   jasper = import ../development/libraries/jasper {
3816     inherit fetchurl stdenv unzip xlibs libjpeg;
3817   };
3819   jetty_gwt = import ../development/libraries/java/jetty-gwt {
3820     inherit stdenv fetchurl;
3821   };
3823   jetty_util = import ../development/libraries/java/jetty-util {
3824     inherit stdenv fetchurl;
3825   };
3827   krb5 = import ../development/libraries/kerberos/krb5.nix {
3828     inherit stdenv fetchurl perl ncurses yacc;
3829   };
3831   lablgtk = import ../development/libraries/lablgtk {
3832     inherit fetchurl stdenv ocaml pkgconfig;
3833     inherit (gtkLibs) gtk;
3834     inherit (gnome) libgnomecanvas;
3835   };
3837   lcms = import ../development/libraries/lcms {
3838     inherit fetchurl stdenv;
3839   };
3841   lesstif = import ../development/libraries/lesstif {
3842     inherit fetchurl stdenv x11;
3843     inherit (xlibs) libXp libXau;
3844   };
3846   lesstif93 = import ../development/libraries/lesstif-0.93 {
3847     inherit fetchurl stdenv x11;
3848     inherit (xlibs) libXp libXau;
3849   };
3851   levmar = import ../development/libraries/levmar {
3852     inherit fetchurl stdenv;
3853   };
3855   lib3ds = import ../development/libraries/lib3ds {
3856     inherit fetchurl stdenv unzip;
3857   };
3859   libaal = import ../development/libraries/libaal {
3860     inherit fetchurl stdenv;
3861   };
3863   libao = import ../development/libraries/libao {
3864     inherit stdenv fetchurl pkgconfig pulseaudio;
3865   };
3867   libarchive = import ../development/libraries/libarchive {
3868     inherit fetchurl stdenv zlib bzip2 e2fsprogs sharutils;
3869   };
3871   libassuan = import ../development/libraries/libassuan {
3872     inherit fetchurl stdenv pth;
3873   };
3875   libavc1394 = import ../development/libraries/libavc1394 {
3876     inherit fetchurl stdenv pkgconfig libraw1394;
3877   };
3879   libcaca = import ../development/libraries/libcaca {
3880     inherit fetchurl stdenv ncurses;
3881   };
3883   libcanberra = import ../development/libraries/libcanberra {
3884     inherit fetchurl stdenv pkgconfig libtool alsaLib pulseaudio libvorbis;
3885     inherit (gtkLibs) gtk gthread;
3886     gstreamer = gst_all.gstreamer;
3887   };
3889   libcdaudio = import ../development/libraries/libcdaudio {
3890     inherit fetchurl stdenv;
3891   };
3893   libcddb = import ../development/libraries/libcddb {
3894     inherit fetchurl stdenv;
3895   };
3897   libcdio = import ../development/libraries/libcdio {
3898     inherit fetchurl stdenv libcddb pkgconfig ncurses help2man;
3899   };
3901   libcm = import ../development/libraries/libcm {
3902     inherit fetchurl stdenv pkgconfig xlibs mesa glib;
3903   };
3905   libcv = builderDefsPackage (import ../development/libraries/libcv) {
3906     inherit libtiff libjpeg libpng pkgconfig;
3907     inherit (gtkLibs) gtk glib;
3908   };
3910   libdaemon = import ../development/libraries/libdaemon {
3911     inherit fetchurl stdenv;
3912   };
3914   libdbi = composedArgsAndFun (import ../development/libraries/libdbi/0.8.2.nix) {
3915     inherit stdenv fetchurl builderDefs;
3916   };
3918   libdbiDriversBase = composedArgsAndFun (import ../development/libraries/libdbi-drivers/0.8.2-1.nix) {
3919     inherit stdenv fetchurl builderDefs libdbi;
3920   };
3922   libdbiDrivers = libdbiDriversBase.passthru.function {
3923     inherit sqlite mysql;
3924   };
3926   libdv = import ../development/libraries/libdv {
3927     inherit fetchurl stdenv lib composableDerivation;
3928   };
3930   libdrm = import ../development/libraries/libdrm {
3931     inherit fetchurl stdenv pkgconfig;
3932     inherit (xorg) libpthreadstubs;
3933   };
3935   libdvdcss = import ../development/libraries/libdvdcss {
3936     inherit fetchurl stdenv;
3937   };
3939   libdvdnav = import ../development/libraries/libdvdnav {
3940     inherit fetchurl stdenv libdvdread;
3941   };
3943   libdvdread = import ../development/libraries/libdvdread {
3944     inherit fetchurl stdenv libdvdcss;
3945   };
3947   libedit = import ../development/libraries/libedit {
3948     inherit fetchurl stdenv ncurses;
3949   };
3951   liblo = import ../development/libraries/liblo {
3952     inherit fetchurl stdenv;
3953   };
3955   libev = builderDefsPackage ../development/libraries/libev {
3956   };
3958   libevent = import ../development/libraries/libevent {
3959     inherit fetchurl stdenv;
3960   };
3962   libewf = import ../development/libraries/libewf {
3963     inherit fetchurl stdenv zlib openssl libuuid;
3964   };
3966   libexif = import ../development/libraries/libexif {
3967     inherit fetchurl stdenv gettext;
3968   };
3970   libextractor = import ../development/libraries/libextractor {
3971     inherit fetchurl stdenv libtool gettext zlib bzip2 flac libvorbis
3972      exiv2 ffmpeg libgsf glib rpm pkgconfig;
3973     inherit (gnome) gtk;
3974     libmpeg2 = mpeg2dec;
3975   };
3977   libffcall = builderDefsPackage (import ../development/libraries/libffcall) {
3978     inherit fetchcvs;
3979   };
3981   libffi = import ../development/libraries/libffi {
3982     inherit fetchurl stdenv;
3983   };
3985   libftdi = import ../development/libraries/libftdi {
3986     inherit fetchurl stdenv libusb;
3987   };
3989   libgcrypt = import ../development/libraries/libgcrypt {
3990     inherit fetchurl stdenv libgpgerror;
3991   };
3993   libgpgerror = import ../development/libraries/libgpg-error {
3994     inherit fetchurl stdenv;
3995   };
3997   libgphoto2 = import ../development/libraries/libgphoto2 {
3998     inherit fetchurl stdenv pkgconfig libusb libtool libexif libjpeg gettext;
3999   };
4001   libgpod = import ../development/libraries/libgpod {
4002     inherit fetchurl stdenv gettext perl perlXMLParser pkgconfig libxml2 glib;
4003   };
4005   libharu = import ../development/libraries/libharu {
4006     inherit fetchurl stdenv lib zlib libpng;
4007   };
4009   libical = import ../development/libraries/libical {
4010     inherit stdenv fetchurl perl;
4011   };
4013   libnice = import ../development/libraries/libnice {
4014     inherit stdenv fetchurl pkgconfig;
4015     inherit (gnome) glib;
4016   };
4018   libQGLViewer = import ../development/libraries/libqglviewer {
4019     inherit fetchurl stdenv;
4020     inherit qt4;
4021   };
4023   libsamplerate = import ../development/libraries/libsamplerate {
4024     inherit fetchurl stdenv pkgconfig lib;
4025   };
4027   libspectre = import ../development/libraries/libspectre {
4028     inherit fetchurl stdenv;
4029     ghostscript = ghostscriptX;
4030   };
4032   libgsf = import ../development/libraries/libgsf {
4033     inherit fetchurl stdenv perl perlXMLParser pkgconfig libxml2
4034       intltool gettext bzip2 python;
4035     inherit (gnome) glib gnomevfs libbonobo;
4036   };
4038   libiconv = import ../development/libraries/libiconv {
4039     inherit fetchurl stdenv;
4040   };
4042   libid3tag = import ../development/libraries/libid3tag {
4043     inherit fetchurl stdenv zlib;
4044   };
4046   libidn = import ../development/libraries/libidn {
4047     inherit fetchurl stdenv;
4048   };
4050   libiec61883 = import ../development/libraries/libiec61883 {
4051     inherit fetchurl stdenv pkgconfig libraw1394;
4052   };
4054   libiptcdata = import ../development/libraries/libiptcdata {
4055     inherit fetchurl stdenv;
4056   };
4058   libjingle = import ../development/libraries/libjingle/0.3.11.nix {
4059     inherit fetchurl stdenv mediastreamer;
4060   };
4062   libjpeg = makeOverridable (import ../development/libraries/libjpeg) {
4063     inherit fetchurl stdenv;
4064     libtool = libtool_1_5;
4065   };
4067   libjpeg62 = makeOverridable (import ../development/libraries/libjpeg/62.nix) {
4068     inherit fetchurl stdenv;
4069     libtool = libtool_1_5;
4070   };
4072   libjpegStatic = lowPrio (appendToName "static" (libjpeg.override {
4073     static = true;
4074   }));
4076   libksba = import ../development/libraries/libksba {
4077     inherit fetchurl stdenv libgpgerror;
4078   };
4080   libmad = import ../development/libraries/libmad {
4081     inherit fetchurl stdenv;
4082   };
4084   libmatthew_java = import ../development/libraries/java/libmatthew-java {
4085     inherit stdenv fetchurl jdk;
4086   };
4088   libmcs = import ../development/libraries/libmcs {
4089     inherit fetchurl stdenv pkgconfig libmowgli;
4090   };
4092   libmicrohttpd = import ../development/libraries/libmicrohttpd {
4093     inherit fetchurl stdenv curl;
4094   };
4096   libmowgli = import ../development/libraries/libmowgli {
4097     inherit fetchurl stdenv;
4098   };
4100   libmng = import ../development/libraries/libmng {
4101     inherit fetchurl stdenv lib zlib libpng libjpeg lcms automake autoconf libtool;
4102   };
4104   libmpcdec = import ../development/libraries/libmpcdec {
4105     inherit fetchurl stdenv;
4106   };
4108   libmsn = import ../development/libraries/libmsn {
4109     inherit stdenv fetchurl cmake openssl;
4110   };
4112   libmspack = import ../development/libraries/libmspack {
4113     inherit fetchurl stdenv;
4114   };
4116   libmusclecard = import ../development/libraries/libmusclecard {
4117     inherit fetchurl stdenv pkgconfig pcsclite;
4118   };
4120   libnova = import ../development/libraries/libnova {
4121     inherit fetchurl stdenv;
4122   };
4124   libofx = import ../development/libraries/libofx {
4125     inherit fetchurl stdenv opensp pkgconfig libxml2 curl;
4126   };
4128   libogg = import ../development/libraries/libogg {
4129     inherit fetchurl stdenv;
4130   };
4132   liboil = makeOverridable (import ../development/libraries/liboil) {
4133     inherit fetchurl stdenv pkgconfig glib;
4134   };
4136   liboop = import ../development/libraries/liboop {
4137     inherit fetchurl stdenv;
4138   };
4140   libotr = import ../development/libraries/libotr {
4141     inherit fetchurl stdenv libgcrypt;
4142   };
4144   libp11 = import ../development/libraries/libp11 {
4145     inherit fetchurl stdenv libtool openssl pkgconfig;
4146   };
4148   libpcap = import ../development/libraries/libpcap {
4149     inherit fetchurl stdenv flex bison;
4150   };
4152   libpng = import ../development/libraries/libpng {
4153     inherit fetchurl stdenv zlib;
4154   };
4156   libproxy = import ../development/libraries/libproxy {
4157     inherit stdenv fetchurl;
4158   };
4160   libpseudo = import ../development/libraries/libpseudo {
4161     inherit fetchurl stdenv pkgconfig ncurses glib;
4162   };
4164   libsigcxx = import ../development/libraries/libsigcxx {
4165     inherit fetchurl stdenv pkgconfig;
4166   };
4168   libsigsegv = import ../development/libraries/libsigsegv {
4169     inherit fetchurl stdenv;
4170   };
4172   # To bootstrap SBCL, I need CLisp 2.44.1; it needs libsigsegv 2.5
4173   libsigsegv_25 =  import ../development/libraries/libsigsegv/2.5.nix {
4174     inherit fetchurl stdenv;
4175   };
4177   libsndfile = import ../development/libraries/libsndfile {
4178     inherit fetchurl stdenv;
4179   };
4181   libtasn1 = import ../development/libraries/libtasn1 {
4182     inherit fetchurl stdenv;
4183   };
4185   libtheora = import ../development/libraries/libtheora {
4186     inherit fetchurl stdenv libogg libvorbis;
4187   };
4189   libtiff = import ../development/libraries/libtiff {
4190     inherit fetchurl stdenv zlib libjpeg;
4191   };
4193   libtommath = import ../development/libraries/libtommath {
4194     inherit fetchurl stdenv libtool;
4195   };
4197   libunistring = import ../development/libraries/libunistring {
4198     inherit fetchurl stdenv libiconv;
4199   };
4201   libupnp = import ../development/libraries/pupnp {
4202     inherit fetchurl stdenv;
4203   };
4205   giflib = import ../development/libraries/giflib {
4206     inherit fetchurl stdenv;
4207   };
4209   libungif = import ../development/libraries/giflib/libungif.nix {
4210     inherit fetchurl stdenv;
4211   };
4213   libusb = import ../development/libraries/libusb {
4214     inherit fetchurl stdenv;
4215   };
4217   libunwind = import ../development/libraries/libunwind {
4218     inherit fetchurl stdenv;
4219   };
4221   libvirt = import ../development/libraries/libvirt {
4222     inherit stdenv fetchurl libxml2 gnutls devicemapper perl;
4223   };
4225   libvncserver = builderDefsPackage (import ../development/libraries/libvncserver) {
4226     inherit libtool libjpeg openssl zlib;
4227     inherit (xlibs) xproto libX11 damageproto libXdamage
4228       libXext xextproto fixesproto libXfixes xineramaproto
4229       libXinerama libXrandr randrproto libXtst;
4230   };
4232   libviper = import ../development/libraries/libviper {
4233     inherit fetchurl stdenv pkgconfig ncurses gpm glib;
4234   };
4236   libvterm = import ../development/libraries/libvterm {
4237     inherit fetchurl stdenv pkgconfig ncurses glib;
4238   };
4240   libvorbis = import ../development/libraries/libvorbis {
4241     inherit fetchurl stdenv libogg;
4242   };
4244   libwmf = import ../development/libraries/libwmf {
4245     inherit fetchurl stdenv pkgconfig imagemagick
4246       zlib libpng freetype libjpeg libxml2 glib;
4247   };
4249   libwpd = import ../development/libraries/libwpd {
4250     inherit fetchurl stdenv pkgconfig libgsf libxml2 bzip2;
4251     inherit (gnome) glib;
4252   };
4254   libx86 = builderDefsPackage ../development/libraries/libx86 {};
4256   libxcrypt = import ../development/libraries/libxcrypt {
4257     inherit fetchurl stdenv;
4258   };
4260   libxklavier = import ../development/libraries/libxklavier {
4261     inherit fetchurl stdenv xkeyboard_config pkgconfig libxml2 isocodes glib;
4262     inherit (xorg) libX11 libICE libXi libxkbfile;
4263   };
4265   libxmi = import ../development/libraries/libxmi {
4266     inherit fetchurl stdenv libtool;
4267   };
4269   libxml2 = makeOverridable (import ../development/libraries/libxml2) {
4270     inherit fetchurl stdenv zlib python;
4271     pythonSupport = false;
4272   };
4274   libxml2Python = libxml2.override {
4275     pythonSupport = true;
4276   };
4278   libxslt = makeOverridable (import ../development/libraries/libxslt) {
4279     inherit fetchurl stdenv libxml2;
4280   };
4282   libixp_for_wmii = lowPrio (import ../development/libraries/libixp_for_wmii {
4283     inherit fetchurl stdenv;
4284   });
4286   libyaml = import ../development/libraries/libyaml {
4287     inherit fetchurl stdenv;
4288   };
4290   libzip = import ../development/libraries/libzip {
4291     inherit fetchurl stdenv zlib;
4292   };
4294   libzrtpcpp = import ../development/libraries/libzrtpcpp {
4295     inherit fetchurl stdenv lib commoncpp2 openssl pkgconfig ccrtp;
4296   };
4298   lightning = import ../development/libraries/lightning {
4299     inherit fetchurl stdenv;
4300   };
4302   liquidwar = builderDefsPackage ../games/liquidwar {
4303     inherit (xlibs) xproto libX11 libXrender;
4304     inherit gmp guile mesa libjpeg libpng
4305       expat gettext perl
4306       SDL SDL_image SDL_mixer SDL_ttf
4307       curl sqlite
4308       libogg libvorbis
4309       ;
4310   };
4312   log4cxx = import ../development/libraries/log4cxx {
4313     inherit fetchurl stdenv automake autoconf libtool cppunit libxml2 boost;
4314     inherit apr aprutil db45 expat;
4315   };
4317   loudmouth = import ../development/libraries/loudmouth {
4318     inherit fetchurl stdenv libidn openssl pkgconfig zlib glib;
4319   };
4321   lzo = import ../development/libraries/lzo {
4322     inherit fetchurl stdenv;
4323   };
4325   # failed to build
4326   mediastreamer = composedArgsAndFun (import ../development/libraries/mediastreamer/2.2.0-cvs20080207.nix) {
4327     inherit fetchurl stdenv automake libtool autoconf alsaLib pkgconfig speex
4328       ortp ffmpeg;
4329   };
4331   mesaSupported =
4332     system == "i686-linux" ||
4333     system == "x86_64-linux" ||
4334     system == "x86_64-darwin" ||
4335     system == "i686-darwin";
4337   mesa = import ../development/libraries/mesa {
4338     inherit fetchurl stdenv pkgconfig expat x11 xlibs libdrm;
4339   };
4341   ming = import ../development/libraries/ming {
4342     inherit fetchurl stdenv flex bison freetype zlib libpng perl;
4343   };
4345   mpeg2dec = import ../development/libraries/mpeg2dec {
4346     inherit fetchurl stdenv;
4347   };
4349   msilbc = import ../development/libraries/msilbc {
4350     inherit fetchurl stdenv ilbc mediastreamer pkgconfig;
4351   };
4353   mpich2 = import ../development/libraries/mpich2 {
4354     inherit fetchurl stdenv python perl;
4355   };
4357   muparser = import ../development/libraries/muparser {
4358     inherit fetchurl stdenv;
4359   };
4361   ncurses = composedArgsAndFun (import ../development/libraries/ncurses) {
4362     inherit fetchurl stdenv;
4363     unicode = (system != "i686-cygwin");
4364   };
4366   neon = neon026;
4368   neon026 = import ../development/libraries/neon/0.26.nix {
4369     inherit fetchurl stdenv libxml2 zlib openssl;
4370     compressionSupport = true;
4371     sslSupport = true;
4372   };
4374   neon028 = import ../development/libraries/neon/0.28.nix {
4375     inherit fetchurl stdenv libxml2 zlib openssl;
4376     compressionSupport = true;
4377     sslSupport = true;
4378   };
4380   nethack = builderDefsPackage (import ../games/nethack) {
4381     inherit ncurses flex bison;
4382   };
4384   nettle = import ../development/libraries/nettle {
4385     inherit fetchurl stdenv gmp gnum4;
4386   };
4388   nspr = import ../development/libraries/nspr {
4389     inherit fetchurl stdenv;
4390   };
4392   nss = import ../development/libraries/nss {
4393     inherit fetchurl stdenv nspr perl zlib;
4394   };
4396   ode = builderDefsPackage (import ../development/libraries/ode) {
4397   };
4399   openal = import ../development/libraries/openal {
4400     inherit fetchurl cmake alsaLib;
4401     stdenv = overrideGCC stdenv gcc43_wrapper2;
4402   };
4404   # added because I hope that it has been easier to compile on x86 (for blender)
4405   openalSoft = import ../development/libraries/openalSoft {
4406     inherit fetchurl stdenv alsaLib libtool cmake;
4407   };
4409   openbabel = import ../development/libraries/openbabel {
4410     inherit fetchurl stdenv zlib libxml2;
4411   };
4413   opencascade = import ../development/libraries/opencascade {
4414     inherit fetchurl stdenv mesa qt4 tcl tk;
4415   };
4417   openct = import ../development/libraries/openct {
4418     inherit fetchurl stdenv libtool pcsclite libusb pkgconfig;
4419   };
4421   # this ctl version is needed by openexr_viewers
4422   openexr_ctl = import ../development/libraries/openexr_ctl {
4423     inherit fetchurl stdenv ilmbase ctl;
4424     openexr = openexr_1_6_1;
4425   };
4427   openexr_1_6_1 = import ../development/libraries/openexr {
4428     inherit fetchurl stdenv ilmbase zlib pkgconfig lib;
4429     version = "1.6.1";
4430     # optional features:
4431     inherit ctl;
4432   };
4434   # This older version is needed by blender (it complains about missing half.h )
4435   openexr_1_4_0 = import ../development/libraries/openexr {
4436     inherit fetchurl stdenv ilmbase zlib pkgconfig lib;
4437     version = "1.4.0";
4438   };
4440   openldap = import ../development/libraries/openldap {
4441     inherit fetchurl stdenv openssl cyrus_sasl db4 groff;
4442   };
4444   openlierox = builderDefsPackage ../games/openlierox {
4445     inherit (xlibs) libX11 xproto;
4446     inherit gd SDL SDL_image SDL_mixer zlib libxml2
4447       pkgconfig;
4448   };
4450   libopensc_dnie = import ../development/libraries/libopensc-dnie {
4451     inherit fetchurl stdenv patchelf writeScript openssl openct
4452       libtool pcsclite zlib;
4453     inherit (gtkLibs) glib;
4454     opensc = opensc_0_11_7;
4455   };
4457   openssl = import ../development/libraries/openssl {
4458     fetchurl = fetchurlBoot;
4459     inherit stdenv perl;
4460   };
4462   ortp = import ../development/libraries/ortp {
4463     inherit fetchurl stdenv;
4464   };
4466   pangoxsl = import ../development/libraries/pangoxsl {
4467     inherit fetchurl stdenv pkgconfig;
4468     inherit (gtkLibs) glib pango;
4469   };
4471   pcre = makeOverridable (import ../development/libraries/pcre) {
4472     inherit fetchurl stdenv;
4473     unicodeSupport = getConfig ["pcre" "unicode"] false;
4474     cplusplusSupport = !stdenv ? isDietLibC;
4475   };
4477   physfs = import ../development/libraries/physfs {
4478     inherit fetchurl stdenv cmake;
4479   };
4481   plib = import ../development/libraries/plib {
4482     inherit fetchurl stdenv mesa freeglut SDL;
4483     inherit (xlibs) libXi libSM libXmu libXext libX11;
4484   };
4486   podofo = import ../development/libraries/podofo {
4487     inherit fetchurl stdenv cmake zlib freetype libjpeg libtiff
4488       fontconfig openssl;
4489   };
4491   polkit = import ../development/libraries/polkit {
4492     inherit stdenv fetchurl pkgconfig eggdbus expat pam intltool gettext glib;
4493   };
4495   policykit = makeOverridable (import ../development/libraries/policykit) {
4496     inherit stdenv fetchurl pkgconfig dbus dbus_glib expat pam
4497       intltool gettext libxslt docbook_xsl glib;
4498   };
4500   poppler = makeOverridable (import ../development/libraries/poppler) {
4501     inherit fetchurl stdenv cairo freetype fontconfig zlib libjpeg pkgconfig;
4502     inherit (gtkLibs) glib gtk;
4503     qt4Support = false;
4504   };
4506   popplerQt44 = poppler.override {
4507     qt4Support = true;
4508     qt4 = qt44;
4509   };
4511   popplerQt45 = poppler.override {
4512     qt4Support = true;
4513     qt4 = qt45;
4514   };
4516   popt = import ../development/libraries/popt {
4517     inherit fetchurl stdenv;
4518   };
4520   proj = import ../development/libraries/proj.4 {
4521     inherit fetchurl stdenv;
4522   };
4524   pth = import ../development/libraries/pth {
4525     inherit fetchurl stdenv;
4526   };
4528   qt3 = makeOverridable (import ../development/libraries/qt-3) {
4529     inherit fetchurl stdenv x11 zlib libjpeg libpng which mysql mesa;
4530     inherit (xlibs) xextproto libXft libXrender libXrandr randrproto
4531       libXmu libXinerama libXcursor;
4532     openglSupport = mesaSupported;
4533     mysqlSupport = getConfig ["qt" "mysql"] false;
4534   };
4536   qt3mysql = qt3.override {
4537     mysqlSupport = true;
4538   };
4540   qt4 = qt44;
4542   qt44 = import ../development/libraries/qt-4.4 {
4543     inherit fetchurl stdenv fetchsvn zlib libjpeg libpng which mysql mesa openssl cups dbus
4544       fontconfig freetype pkgconfig libtiff;
4545     inherit (xlibs) xextproto libXft libXrender libXrandr randrproto
4546       libXmu libXinerama xineramaproto libXcursor libICE libSM libX11 libXext
4547       inputproto fixesproto libXfixes;
4548     inherit (gnome) glib;
4549   };
4551   qt45 = import ../development/libraries/qt-4.5 {
4552     inherit fetchurl stdenv lib zlib libjpeg libpng which mysql mesa openssl cups dbus
4553       fontconfig freetype pkgconfig libtiff;
4554     inherit (xlibs) xextproto libXft libXrender libXrandr randrproto
4555       libXmu libXinerama xineramaproto libXcursor libXext
4556       inputproto fixesproto libXfixes;
4557     inherit (gnome) glib;
4558   };
4560   qt46 = import ../development/libraries/qt-4.6 {
4561     inherit fetchurl stdenv lib zlib libjpeg libpng which mysql mesa openssl cups dbus
4562       fontconfig freetype pkgconfig libtiff;
4563     inherit (xlibs) xextproto libXft libXrender libXrandr randrproto
4564       libXmu libXinerama xineramaproto libXcursor libXext
4565       inputproto fixesproto libXfixes;
4566     inherit (gnome) glib;
4567   };
4569   qtscriptgenerator = makeOverridable (import ../development/libraries/qtscriptgenerator) {
4570     inherit stdenv fetchurl;
4571     qt4 = qt45;
4572   };
4574   readline = readline6;
4576   readline4 = import ../development/libraries/readline/readline4.nix {
4577     inherit fetchurl stdenv ncurses;
4578   };
4580   readline5 = import ../development/libraries/readline/readline5.nix {
4581     inherit fetchurl stdenv ncurses;
4582   };
4584   readline6 = import ../development/libraries/readline/readline6.nix {
4585     inherit fetchurl stdenv ncurses;
4586   };
4588   librdf_raptor = import ../development/libraries/librdf/raptor.nix {
4589     inherit fetchurl stdenv lib libxml2 curl;
4590   };
4591   librdf_rasqal = import ../development/libraries/librdf/rasqal.nix {
4592     inherit fetchurl stdenv lib pcre libxml2 gmp librdf_raptor;
4593   };
4594   librdf = import ../development/libraries/librdf {
4595     inherit fetchurl stdenv lib pkgconfig librdf_raptor ladspaH openssl zlib;
4596   };
4598   # Also known as librdf, includes raptor and rasqal
4599   redland = composedArgsAndFun (import ../development/libraries/redland/1.0.9.nix) {
4600     inherit fetchurl stdenv openssl libxml2 pkgconfig perl postgresql sqlite
4601       mysql libxslt curl pcre librdf_rasqal librdf_raptor;
4602     bdb = db4;
4603   };
4605   redland_1_0_8 = composedArgsAndFun (import ../development/libraries/redland/1.0.8.nix) {
4606     inherit fetchurl stdenv openssl libxml2 pkgconfig perl postgresql sqlite
4607       mysql libxslt curl pcre librdf_rasqal librdf_raptor;
4608     bdb = db4;
4609   };
4611   rhino = import ../development/libraries/java/rhino {
4612     inherit fetchurl stdenv unzip;
4613     ant = apacheAntGcj;
4614     javac = gcj;
4615     jvm = gcj;
4616   };
4618   rte = import ../development/libraries/rte {
4619     inherit fetchurl stdenv;
4620   };
4622   rubberband = import ../development/libraries/rubberband {
4623     inherit fetchurl stdenv lib pkgconfig libsamplerate libsndfile ladspaH;
4624     fftw = fftwSinglePrec;
4625     inherit (vamp) vampSDK;
4626   };
4628   schroedinger = import ../development/libraries/schroedinger {
4629     inherit fetchurl stdenv liboil pkgconfig;
4630   };
4632   SDL = makeOverridable (import ../development/libraries/SDL) {
4633     inherit fetchurl stdenv pkgconfig x11 mesa alsaLib pulseaudio;
4634     inherit (xlibs) libXrandr;
4635     openglSupport = mesaSupported;
4636     alsaSupport = true;
4637     pulseaudioSupport = false; # better go through ALSA
4638   };
4640   SDL_image = import ../development/libraries/SDL_image {
4641     inherit fetchurl stdenv SDL libjpeg libungif libtiff libpng;
4642     inherit (xlibs) libXpm;
4643   };
4645   SDL_mixer = import ../development/libraries/SDL_mixer {
4646     inherit fetchurl stdenv SDL libogg libvorbis;
4647   };
4649   SDL_net = import ../development/libraries/SDL_net {
4650     inherit fetchurl stdenv SDL;
4651   };
4653   SDL_ttf = import ../development/libraries/SDL_ttf {
4654     inherit fetchurl stdenv SDL freetype;
4655   };
4657   slang = import ../development/libraries/slang {
4658     inherit fetchurl stdenv ncurses pcre libpng zlib readline;
4659   };
4661   slibGuile = import ../development/libraries/slib {
4662     inherit fetchurl stdenv unzip texinfo;
4663     scheme = guile;
4664   };
4666   snack = import ../development/libraries/snack {
4667     inherit fetchurl stdenv tcl tk pkgconfig x11;
4668         # optional
4669     inherit alsaLib vorbisTools python;
4670   };
4672   speex = import ../development/libraries/speex {
4673     inherit fetchurl stdenv libogg;
4674   };
4676   sqlite = import ../development/libraries/sqlite {
4677     inherit fetchurl stdenv readline tcl;
4678   };
4680   stlport =  import ../development/libraries/stlport {
4681     inherit fetchurl stdenv;
4682   };
4684   t1lib = import ../development/libraries/t1lib {
4685     inherit fetchurl stdenv x11;
4686     inherit (xlibs) libXaw libXpm;
4687   };
4689   taglib = import ../development/libraries/taglib {
4690     inherit fetchurl stdenv zlib;
4691   };
4693   taglib_extras = import ../development/libraries/taglib-extras {
4694     inherit stdenv fetchurl cmake taglib;
4695   };
4697   tapioca_qt = import ../development/libraries/tapioca-qt {
4698     inherit stdenv fetchurl cmake qt4 telepathy_qt;
4699   };
4701   tecla = import ../development/libraries/tecla {
4702     inherit fetchurl stdenv;
4703   };
4705   telepathy_gabble = import ../development/libraries/telepathy-gabble {
4706     inherit fetchurl stdenv pkgconfig libxslt telepathy_glib loudmouth;
4707   };
4709   telepathy_glib = import ../development/libraries/telepathy-glib {
4710     inherit fetchurl stdenv dbus_glib pkgconfig libxslt python glib;
4711   };
4713   telepathy_qt = import ../development/libraries/telepathy-qt {
4714     inherit stdenv fetchurl cmake qt4;
4715   };
4717   tk = import ../development/libraries/tk/8.5.7.nix {
4718     inherit fetchurl stdenv tcl x11;
4719   };
4721   unixODBC = import ../development/libraries/unixODBC {
4722     inherit fetchurl stdenv;
4723   };
4725   unixODBCDrivers = recurseIntoAttrs (import ../development/libraries/unixODBCDrivers {
4726     inherit fetchurl stdenv unixODBC glibc libtool openssl zlib;
4727     inherit postgresql mysql sqlite;
4728   });
4730   vamp = import ../development/libraries/audio/vamp {
4731     inherit fetchurl stdenv lib pkgconfig libsndfile;
4732   };
4734   vtk = import ../development/libraries/vtk {
4735     inherit stdenv fetchurl cmake mesa;
4736     inherit (xlibs) libX11 xproto libXt;
4737   };
4739   vxl = import ../development/libraries/vxl {
4740    inherit fetchurl stdenv cmake unzip libtiff expat zlib libpng libjpeg;
4741   };
4743   webkit = builderDefsPackage (import ../development/libraries/webkit) {
4744     inherit (gnome28) gtkdoc libsoup;
4745     inherit (gtkLibs) gtk atk pango glib;
4746     inherit freetype fontconfig gettext gperf curl
4747       libjpeg libtiff libpng libxml2 libxslt sqlite
4748       icu cairo perl intltool automake libtool
4749       pkgconfig autoconf bison libproxy enchant;
4750     inherit (gst_all) gstreamer gstPluginsBase gstFfmpeg
4751       gstPluginsGood;
4752     flex = flex2535;
4753     inherit (xlibs) libXt;
4754   };
4756   wxGTK = wxGTK28;
4758   wxGTK26 = import ../development/libraries/wxGTK-2.6 {
4759     inherit fetchurl stdenv pkgconfig;
4760     inherit (gtkLibs216) gtk;
4761     inherit (xlibs) libXinerama libSM libXxf86vm xf86vidmodeproto;
4762   };
4764   wxGTK28 = makeOverridable (import ../development/libraries/wxGTK-2.8) {
4765     inherit fetchurl stdenv pkgconfig mesa;
4766     inherit (gtkLibs216) gtk;
4767     inherit (xlibs) libXinerama libSM libXxf86vm xf86vidmodeproto;
4768   };
4770   wtk = import ../development/libraries/wtk {
4771       inherit fetchurl stdenv unzip xlibs;
4772     };
4774   x264 = import ../development/libraries/x264 {
4775     inherit fetchurl stdenv;
4776   };
4778   xapian = makeOverridable (import ../development/libraries/xapian) {
4779     inherit fetchurl stdenv zlib;
4780   };
4782   xapianBindings = (import ../development/libraries/xapian/bindings/1.0.14.nix) {
4783     inherit fetchurl stdenv xapian composableDerivation pkgconfig;
4784     inherit ruby perl php tcl python; # TODO perl php Java, tcl, C#, python
4785   };
4787   Xaw3d = import ../development/libraries/Xaw3d {
4788     inherit fetchurl stdenv x11 bison;
4789     flex = flex2533;
4790     inherit (xlibs) imake gccmakedep libXmu libXpm libXp;
4791   };
4793   xineLib = import ../development/libraries/xine-lib {
4794     inherit fetchurl stdenv zlib libdvdcss alsaLib pkgconfig mesa aalib
4795       libvorbis libtheora speex xlibs perl ffmpeg;
4796   };
4798   xautolock = import ../misc/screensavers/xautolock {
4799     inherit fetchurl stdenv x11;
4800     inherit (xorg) imake;
4801     inherit (xlibs) libXScrnSaver scrnsaverproto;
4802   };
4804   xercesJava = import ../development/libraries/java/xerces {
4805     inherit fetchurl stdenv;
4806     ant   = apacheAntGcj;  # for bootstrap purposes
4807     javac = gcj;
4808     jvm   = gcj;
4809   };
4811   xlibsWrapper = import ../development/libraries/xlibs-wrapper {
4812     inherit stdenv;
4813     packages = [
4814       freetype fontconfig xlibs.xproto xlibs.libX11 xlibs.libXt
4815       xlibs.libXft xlibs.libXext xlibs.libSM xlibs.libICE
4816       xlibs.xextproto
4817     ];
4818   };
4820   zangband = builderDefsPackage (import ../games/zangband) {
4821     inherit ncurses flex bison autoconf automake m4 coreutils;
4822   };
4824   zlib = import ../development/libraries/zlib {
4825     fetchurl = fetchurlBoot;
4826     inherit stdenv;
4827   };
4829   zlibStatic = lowPrio (appendToName "static" (import ../development/libraries/zlib {
4830     inherit fetchurl stdenv;
4831     static = true;
4832   }));
4834   zvbi = import ../development/libraries/zvbi {
4835     inherit fetchurl stdenv libpng x11;
4836     pngSupport = true;
4837   };
4840   ### DEVELOPMENT / LIBRARIES / JAVA
4843   atermjava = import ../development/libraries/java/aterm {
4844     inherit fetchurl sharedobjects jjtraveler jdk;
4845     stdenv = overrideInStdenv stdenv [gnumake380];
4846   };
4848   commonsFileUpload = import ../development/libraries/java/jakarta-commons/file-upload {
4849     inherit stdenv fetchurl;
4850   };
4852   fastjar = import ../development/tools/java/fastjar {
4853     inherit fetchurl stdenv zlib;
4854   };
4856   httpunit = import ../development/libraries/java/httpunit {
4857     inherit stdenv fetchurl unzip;
4858   };
4860   gwtdragdrop = import ../development/libraries/java/gwt-dragdrop {
4861     inherit stdenv fetchurl;
4862   };
4864   gwtwidgets = import ../development/libraries/java/gwt-widgets {
4865     inherit stdenv fetchurl;
4866   };
4868   jakartabcel = import ../development/libraries/java/jakarta-bcel {
4869     regexp = jakartaregexp;
4870     inherit fetchurl stdenv;
4871   };
4873   jakartaregexp = import ../development/libraries/java/jakarta-regexp {
4874     inherit fetchurl stdenv;
4875   };
4877   javaCup = import ../development/libraries/java/cup {
4878     inherit stdenv fetchurl jdk;
4879   };
4881   javasvn = import ../development/libraries/java/javasvn {
4882     inherit stdenv fetchurl unzip;
4883   };
4885   jclasslib = import ../development/tools/java/jclasslib {
4886     inherit fetchurl stdenv xpf jre;
4887     ant = apacheAnt14;
4888   };
4890   jdom = import ../development/libraries/java/jdom {
4891     inherit stdenv fetchurl;
4892   };
4894   jflex = import ../development/libraries/java/jflex {
4895     inherit stdenv fetchurl;
4896   };
4898   jjtraveler = import ../development/libraries/java/jjtraveler {
4899     inherit fetchurl jdk;
4900     stdenv = overrideInStdenv stdenv [gnumake380];
4901   };
4903   junit = import ../development/libraries/java/junit {
4904     inherit stdenv fetchurl unzip;
4905   };
4907   lucene = import ../development/libraries/java/lucene {
4908     inherit stdenv fetchurl;
4909   };
4911   mockobjects = import ../development/libraries/java/mockobjects {
4912     inherit stdenv fetchurl;
4913   };
4915   saxon = import ../development/libraries/java/saxon {
4916     inherit fetchurl stdenv unzip;
4917   };
4919   saxonb = import ../development/libraries/java/saxon/default8.nix {
4920     inherit fetchurl stdenv unzip jre;
4921   };
4923   sharedobjects = import ../development/libraries/java/shared-objects {
4924     inherit fetchurl jdk;
4925     stdenv = overrideInStdenv stdenv [gnumake380];
4926   };
4928   smack = import ../development/libraries/java/smack {
4929     inherit stdenv fetchurl;
4930   };
4932   swt = import ../development/libraries/java/swt {
4933     inherit stdenv fetchurl unzip jdk pkgconfig;
4934     inherit (gtkLibs) gtk;
4935     inherit (xlibs) libXtst;
4936   };
4938   xalanj = xalanJava;
4939   xalanJava = import ../development/libraries/java/xalanj {
4940     inherit fetchurl stdenv;
4941     ant    = apacheAntGcj;  # for bootstrap purposes
4942     javac  = gcj;
4943     jvm    = gcj;
4944     xerces = xercesJava;
4945   };
4947   zziplib = import ../development/libraries/zziplib {
4948     inherit fetchurl stdenv perl python zip xmlto zlib;
4949   };
4952   ### DEVELOPMENT / PERL MODULES
4954   buildPerlPackage = import ../development/perl-modules/generic perl;
4956   perlPackages = recurseIntoAttrs (import ./perl-packages.nix {
4957     inherit pkgs;
4958   });
4960   perlXMLParser = perlPackages.XMLParser;
4963   ### DEVELOPMENT / PYTHON MODULES
4965   buildPythonPackage =
4966     import ../development/python-modules/generic {
4967       inherit python setuptools makeWrapper lib;
4968     };
4970   buildPython26Package =
4971     import ../development/python-modules/generic {
4972       inherit makeWrapper lib;
4973       python = python26;
4974       setuptools = setuptools_python26;
4975     };
4977   pythonPackages = recurseIntoAttrs (import ./python-packages.nix {
4978     inherit pkgs python buildPythonPackage;
4979   });
4981   python26Packages = recurseIntoAttrs (import ./python-packages.nix {
4982     inherit pkgs;
4983     python = python26;
4984     buildPythonPackage = buildPython26Package;
4985   });
4987   foursuite = import ../development/python-modules/4suite {
4988     inherit fetchurl stdenv python;
4989   };
4991   bsddb3 = import ../development/python-modules/bsddb3 {
4992     inherit fetchurl stdenv python db4;
4993   };
4995   flup = builderDefsPackage ../development/python-modules/flup {
4996     inherit fetchurl stdenv;
4997     python = python25;
4998     setuptools = setuptools.passthru.function {python = python25;};
4999   };
5001   numeric = import ../development/python-modules/numeric {
5002     inherit fetchurl stdenv python;
5003   };
5005   pil = import ../development/python-modules/pil {
5006     inherit fetchurl stdenv python zlib libjpeg freetype;
5007   };
5009   pil_python26 = import ../development/python-modules/pil {
5010     inherit fetchurl stdenv zlib libjpeg freetype;
5011     python = python26;
5012   };
5014   psyco = import ../development/python-modules/psyco {
5015       inherit fetchurl stdenv python;
5016     };
5018   pycairo = import ../development/python-modules/pycairo {
5019     inherit fetchurl stdenv python pkgconfig cairo x11;
5020   };
5022   pycrypto = import ../development/python-modules/pycrypto {
5023     inherit fetchurl stdenv python gmp;
5024   };
5026   pycups = import ../development/python-modules/pycups {
5027     inherit stdenv fetchurl python cups;
5028   };
5030   pygame = import ../development/python-modules/pygame {
5031     inherit fetchurl stdenv python pkgconfig SDL SDL_image
5032       SDL_mixer SDL_ttf numeric;
5033   };
5035   pygobject = import ../development/python-modules/pygobject {
5036     inherit fetchurl stdenv python pkgconfig glib;
5037   };
5039   pygtk = import ../development/python-modules/pygtk {
5040     inherit fetchurl stdenv python pkgconfig pygobject pycairo;
5041     inherit (gtkLibs) glib gtk;
5042   };
5044   pyGtkGlade = import ../development/python-modules/pygtk {
5045     inherit fetchurl stdenv python pkgconfig pygobject pycairo;
5046     inherit (gtkLibs) glib gtk;
5047     inherit (gnome) libglade;
5048   };
5050   pyopengl = import ../development/python-modules/pyopengl {
5051     inherit fetchurl stdenv setuptools mesa freeglut pil python;
5052   };
5054   pyopenssl = builderDefsPackage (import ../development/python-modules/pyopenssl) {
5055     inherit python openssl;
5056   };
5058   pythonSip = builderDefsPackage (import ../development/python-modules/python-sip/4.7.4.nix) {
5059     inherit python;
5060   };
5062   rhpl = import ../development/python-modules/rhpl {
5063     inherit stdenv fetchurl rpm cpio python wirelesstools gettext;
5064   };
5066   sip = import ../development/python-modules/python-sip {
5067     inherit stdenv fetchurl lib python;
5068   };
5070   sip_python26 = import ../development/python-modules/python-sip {
5071     inherit stdenv fetchurl lib;
5072     python = python26;
5073   };
5075   pyqt = builderDefsPackage (import ../development/python-modules/pyqt/4.3.3.nix) {
5076     inherit pkgconfig python pythonSip glib;
5077     inherit (xlibs) libX11 libXext;
5078     qt = qt4;
5079   };
5081   pyqt4 = import ../development/python-modules/pyqt {
5082     inherit stdenv fetchurl lib python sip;
5083     qt4 = qt45;
5084   };
5086   pyqt4_python26 = import ../development/python-modules/pyqt {
5087     inherit stdenv fetchurl lib;
5088     qt4 = qt45;
5089     python = python26;
5090     sip = sip_python26;
5091   };
5093   pyx = import ../development/python-modules/pyx {
5094     inherit fetchurl stdenv python makeWrapper;
5095   };
5097   pyxml = import ../development/python-modules/pyxml {
5098     inherit fetchurl stdenv python makeWrapper;
5099   };
5101   setuptools = builderDefsPackage (import ../development/python-modules/setuptools) {
5102     inherit python makeWrapper;
5103   };
5105   setuptools_python26 = builderDefsPackage (import ../development/python-modules/setuptools) {
5106     inherit makeWrapper;
5107     python = python26;
5108   };
5110   wxPython = wxPython26;
5112   wxPython26 = import ../development/python-modules/wxPython/2.6.nix {
5113     inherit fetchurl stdenv pkgconfig python;
5114     wxGTK = wxGTK26;
5115   };
5117   wxPython28 = import ../development/python-modules/wxPython/2.8.nix {
5118     inherit fetchurl stdenv pkgconfig python;
5119     inherit wxGTK;
5120   };
5122   twisted = pythonPackages.twisted;
5124   ZopeInterface = import ../development/python-modules/ZopeInterface {
5125     inherit fetchurl stdenv python;
5126   };
5128   zope = import ../development/python-modules/zope {
5129     inherit fetchurl stdenv;
5130     python = python24;
5131   };
5133   ### SERVERS
5136   apacheHttpd = makeOverridable (import ../servers/http/apache-httpd) {
5137     inherit (pkgsOverriden) fetchurl stdenv perl openssl zlib apr aprutil pcre;
5138     sslSupport = true;
5139   };
5141   sabnzbd = import ../servers/sabnzbd {
5142     inherit fetchurl stdenv python cheetahTemplate makeWrapper par2cmdline unzip unrar;
5143   };
5145   bind = builderDefsPackage (import ../servers/dns/bind/9.5.0.nix) {
5146     inherit openssl libtool;
5147   };
5149   dico = import ../servers/dico {
5150     inherit fetchurl stdenv libtool gettext zlib readline guile python;
5151   };
5153   dict = composedArgsAndFun (import ../servers/dict/1.9.15.nix) {
5154     inherit builderDefs which bison;
5155     flex=flex2534;
5156   };
5158   dictdDBs = recurseIntoAttrs (import ../servers/dict/dictd-db.nix {
5159     inherit builderDefs;
5160   });
5162   dictDBCollector = import ../servers/dict/dictd-db-collector.nix {
5163     inherit stdenv lib dict;
5164   };
5166   dovecot = import ../servers/mail/dovecot {
5167     inherit fetchurl stdenv openssl pam;
5168   };
5169   dovecot_1_1_1 = import ../servers/mail/dovecot/1.1.1.nix {
5170     inherit fetchurl stdenv openssl pam;
5171   };
5173   ejabberd = import ../servers/xmpp/ejabberd {
5174     inherit fetchurl stdenv expat erlang zlib openssl pam lib;
5175   };
5177   couchdb = import ../servers/http/couchdb {
5178     inherit fetchurl stdenv erlang spidermonkey icu getopt
5179       curl;
5180   };
5182   fingerd_bsd = import ../servers/fingerd/bsd-fingerd {
5183     inherit fetchurl stdenv;
5184   };
5186   ircdHybrid = import ../servers/irc/ircd-hybrid {
5187     inherit fetchurl stdenv openssl zlib;
5188   };
5190   jboss = import ../servers/http/jboss {
5191     inherit fetchurl stdenv unzip jdk lib;
5192   };
5194   jboss_mysql_jdbc = import ../servers/http/jboss/jdbc/mysql {
5195     inherit stdenv jboss mysql_jdbc;
5196   };
5198   jetty = import ../servers/http/jetty {
5199     inherit fetchurl stdenv unzip;
5200   };
5202   jetty61 = import ../servers/http/jetty/6.1 {
5203     inherit fetchurl stdenv unzip;
5204   };
5206   lighttpd = import ../servers/http/lighttpd {
5207     inherit fetchurl stdenv pcre libxml2 zlib attr bzip2;
5208   };
5210   mod_python = makeOverridable (import ../servers/http/apache-modules/mod_python) {
5211     inherit (pkgsOverriden) fetchurl stdenv apacheHttpd python;
5212   };
5214   myserver = import ../servers/http/myserver {
5215     inherit fetchurl stdenv libgcrypt libevent libidn gnutls libxml2
5216       zlib texinfo cppunit;
5217   };
5219   nginx = builderDefsPackage (import ../servers/http/nginx) {
5220     inherit openssl pcre zlib libxml2 libxslt;
5221   };
5223   postfix = import ../servers/mail/postfix {
5224     inherit fetchurl stdenv db4 openssl cyrus_sasl glibc;
5225   };
5227   pulseaudio = makeOverridable (import ../servers/pulseaudio) {
5228     inherit fetchurl stdenv pkgconfig gnum4 gdbm
5229       dbus hal avahi liboil libsamplerate libsndfile speex
5230       intltool gettext libtool libcap;
5231     inherit (xlibs) libX11 libICE libSM libXtst libXi;
5232     inherit (gtkLibs) gtk glib;
5233     inherit alsaLib;    # Needs ALSA >= 1.0.17.
5234     gconf = gnome.GConf;
5235   };
5237   tomcat_connectors = import ../servers/http/apache-modules/tomcat-connectors {
5238     inherit fetchurl stdenv apacheHttpd jdk;
5239   };
5241   portmap = makeOverridable (import ../servers/portmap) {
5242     inherit fetchurl stdenv lib tcpWrapper;
5243   };
5245   monetdb = import ../servers/sql/monetdb {
5246     inherit composableDerivation getConfig;
5247     inherit fetchurl stdenv pcre openssl readline libxml2 geos apacheAnt jdk5;
5248   };
5250   mysql4 = import ../servers/sql/mysql {
5251     inherit fetchurl stdenv ncurses zlib perl;
5252     ps = procps; /* !!! Linux only */
5253   };
5255   mysql5 = import ../servers/sql/mysql5 {
5256     inherit fetchurl stdenv ncurses zlib perl openssl;
5257     ps = procps; /* !!! Linux only */
5258   };
5260   mysql51 = import ../servers/sql/mysql51 {
5261     inherit fetchurl ncurses zlib perl openssl stdenv;
5262     ps = procps; /* !!! Linux only */
5263   };
5265   mysql = mysql5;
5267   mysql_jdbc = import ../servers/sql/mysql/jdbc {
5268     inherit fetchurl stdenv ant;
5269   };
5271   nagios = import ../servers/monitoring/nagios {
5272     inherit fetchurl stdenv perl gd libpng zlib;
5273     gdSupport = true;
5274   };
5276   nagiosPluginsOfficial = import ../servers/monitoring/nagios/plugins/official {
5277     inherit fetchurl stdenv openssh;
5278   };
5280   openfire = composedArgsAndFun (import ../servers/xmpp/openfire) {
5281     inherit builderDefs jre;
5282   };
5284   postgresql = postgresql83;
5286   postgresql83 = import ../servers/sql/postgresql/8.3.x.nix {
5287     inherit fetchurl stdenv readline ncurses zlib;
5288   };
5290   postgresql84 = import ../servers/sql/postgresql/8.4.x.nix {
5291     inherit fetchurl stdenv readline ncurses zlib;
5292   };
5294   postgresql_jdbc = import ../servers/sql/postgresql/jdbc {
5295     inherit fetchurl stdenv ant;
5296   };
5298   pyIRCt = builderDefsPackage (import ../servers/xmpp/pyIRCt) {
5299     inherit xmpppy pythonIRClib python makeWrapper;
5300   };
5302   pyMAILt = builderDefsPackage (import ../servers/xmpp/pyMAILt) {
5303     inherit xmpppy python makeWrapper fetchcvs;
5304   };
5306   samba = makeOverridable (import ../servers/samba) {
5307     inherit stdenv fetchurl readline openldap pam kerberos popt iniparser
5308   libunwind acl fam;
5309   };
5311   squids = recurseIntoAttrs( import ../servers/squid/squids.nix {
5312     inherit fetchurl stdenv perl lib composableDerivation;
5313   });
5314   squid = squids.squid3Beta; # has ipv6 support
5316   tomcat5 = import ../servers/http/tomcat {
5317     inherit fetchurl stdenv jdk;
5318   };
5320   tomcat6 = import ../servers/http/tomcat/6.0.nix {
5321     inherit fetchurl stdenv jdk;
5322   };
5324   tomcat_mysql_jdbc = import ../servers/http/tomcat/jdbc/mysql {
5325     inherit stdenv tomcat6 mysql_jdbc;
5326   };
5328   axis2 = import ../servers/http/tomcat/axis2 {
5329     inherit fetchurl stdenv jdk apacheAnt unzip;
5330   };
5332   vsftpd = import ../servers/ftp/vsftpd {
5333     inherit fetchurl openssl stdenv libcap pam;
5334   };
5336   xinetd = import ../servers/xinetd {
5337     inherit fetchurl stdenv;
5338   };
5340   xorg = recurseIntoAttrs (import ../servers/x11/xorg/default.nix {
5341     inherit fetchurl fetchsvn stdenv pkgconfig freetype fontconfig
5342       libxslt expat libdrm libpng zlib perl mesa
5343       xkeyboard_config dbus hal libuuid openssl gperf m4
5344       automake autoconf libtool;
5346     # !!! pythonBase is use instead of python because this cause an infinite
5347     # !!! recursion when the flag python.full is set to true.  Packages
5348     # !!! contained in the loop are python, tk, xlibs-wrapper, libX11,
5349     # !!! libxcd (and xcb-proto).
5350     python =  pythonBase;
5351   });
5353   xorgReplacements = composedArgsAndFun (import ../servers/x11/xorg/replacements.nix) {
5354     inherit fetchurl stdenv automake autoconf libtool xorg composedArgsAndFun;
5355   };
5357   xorgVideoUnichrome = import ../servers/x11/xorg/unichrome/default.nix {
5358     inherit stdenv fetchgit pkgconfig libdrm mesa automake autoconf libtool;
5359     inherit (xorg) fontsproto libpciaccess randrproto renderproto videoproto
5360       libX11 xextproto xf86driproto xorgserver xproto libXvMC glproto
5361       libXext utilmacros;
5362   };
5364   zabbixAgent = import ../servers/monitoring/zabbix {
5365     inherit fetchurl stdenv;
5366     enableServer = false;
5367   };
5369   zabbixServer = import ../servers/monitoring/zabbix {
5370     inherit fetchurl stdenv postgresql curl;
5371     enableServer = true;
5372   };
5375   ### OS-SPECIFIC
5377   afuse = import ../os-specific/linux/afuse {
5378     inherit fetchurl stdenv lib pkgconfig fuse;
5379   };
5381   autofs5 = import ../os-specific/linux/autofs/autofs-v5.nix {
5382     inherit sourceFromHead fetchurl stdenv flex bison kernelHeaders;
5383   };
5385   _915resolution = import ../os-specific/linux/915resolution {
5386     inherit fetchurl stdenv;
5387   };
5389   nfsUtils = import ../os-specific/linux/nfs-utils {
5390     inherit fetchurl stdenv tcpWrapper libuuid;
5391   };
5393   acpi = import ../os-specific/linux/acpi {
5394     inherit fetchurl stdenv;
5395   };
5397   acpid = import ../os-specific/linux/acpid {
5398     inherit fetchurl stdenv;
5399   };
5401   acpitool = import ../os-specific/linux/acpitool {
5402     inherit fetchurl stdenv;
5403   };
5405   alsaLib = import ../os-specific/linux/alsa-lib {
5406     inherit stdenv fetchurl;
5407   };
5409   alsaPlugins = import ../os-specific/linux/alsa-plugins {
5410     inherit fetchurl stdenv lib pkgconfig alsaLib pulseaudio jackaudio;
5411   };
5412   alsaPluginWrapper = import ../os-specific/linux/alsa-plugins/wrapper.nix {
5413     inherit stdenv alsaPlugins writeScriptBin;
5414   };
5416   alsaUtils = import ../os-specific/linux/alsa-utils {
5417     inherit stdenv fetchurl alsaLib gettext ncurses;
5418   };
5420   bluez = import ../os-specific/linux/bluez {
5421     inherit fetchurl stdenv pkgconfig dbus libusb alsaLib glib;
5422   };
5424   bridge_utils = import ../os-specific/linux/bridge_utils {
5425     inherit fetchurl stdenv autoconf automake;
5426   };
5428   cpufrequtils = (
5429     import ../os-specific/linux/cpufrequtils {
5430     inherit fetchurl stdenv libtool gettext;
5431     glibc = stdenv.gcc.libc;
5432     kernelHeaders = stdenv.gcc.libc.kernelHeaders;
5433   });
5435   cryopid = import ../os-specific/linux/cryopid {
5436     inherit fetchurl stdenv zlibStatic;
5437   };
5439   cryptsetup = import ../os-specific/linux/cryptsetup {
5440     inherit stdenv fetchurl libuuid popt devicemapper udev;
5441   };
5443   cramfsswap = import ../os-specific/linux/cramfsswap {
5444     inherit fetchurl stdenv zlib;
5445   };
5447   darwinArchUtility = import ../os-specific/darwin/arch {
5448     inherit stdenv;
5449   };
5451   darwinSwVersUtility = import ../os-specific/darwin/sw_vers {
5452     inherit stdenv;
5453   };
5455   devicemapper = lvm2;
5457   dmidecode = import ../os-specific/linux/dmidecode {
5458     inherit fetchurl stdenv;
5459   };
5461   dietlibc = import ../os-specific/linux/dietlibc {
5462     inherit fetchurl glibc;
5463     # Dietlibc 0.30 doesn't compile on PPC with GCC 4.1, bus GCC 3.4 works.
5464     stdenv = if stdenv.system == "powerpc-linux" then overrideGCC stdenv gcc34 else stdenv;
5465   };
5467   directvnc = builderDefsPackage ../os-specific/linux/directvnc {
5468     inherit libjpeg pkgconfig zlib directfb;
5469     inherit (xlibs) xproto;
5470   };
5472   dmraid = builderDefsPackage ../os-specific/linux/dmraid {
5473     inherit devicemapper;
5474   };
5476   libuuid = if ! stdenv.isDarwin then utillinuxng else null;
5478   e3cfsprogs = import ../os-specific/linux/e3cfsprogs {
5479     inherit stdenv fetchurl gettext;
5480   };
5482   eject = import ../os-specific/linux/eject {
5483     inherit fetchurl stdenv gettext;
5484   };
5486   fbterm = builderDefsPackage (import ../os-specific/linux/fbterm) {
5487     inherit fontconfig gpm freetype pkgconfig ncurses;
5488   };
5490   fuse = import ../os-specific/linux/fuse {
5491     inherit fetchurl stdenv utillinux;
5492   };
5494   fxload = import ../os-specific/linux/fxload {
5495     inherit fetchurl stdenv;
5496   };
5498   gpm = import ../servers/gpm {
5499     inherit fetchurl stdenv ncurses bison;
5500     flex = flex2535;
5501   };
5503   hal = makeOverridable (import ../os-specific/linux/hal) {
5504     inherit fetchurl stdenv pkgconfig python pciutils usbutils expat
5505       libusb dbus dbus_glib libuuid perl perlXMLParser
5506       gettext zlib eject libsmbios udev gperf dmidecode utillinuxng
5507       consolekit policykit pmutils glib;
5508   };
5510   halevt = import ../os-specific/linux/hal/hal-evt.nix {
5511     inherit fetchurl stdenv lib libxml2 pkgconfig boolstuff hal dbus_glib;
5512   };
5514   hal_info = import ../os-specific/linux/hal/info.nix {
5515     inherit fetchurl stdenv pkgconfig;
5516   };
5518   hal_info_synaptics = import ../os-specific/linux/hal/synaptics.nix {
5519     inherit stdenv;
5520   };
5522   hdparm = import ../os-specific/linux/hdparm {
5523     inherit fetchurl stdenv;
5524   };
5526   hibernate = import ../os-specific/linux/hibernate {
5527     inherit fetchurl stdenv gawk;
5528   };
5530   htop = import ../os-specific/linux/htop {
5531     inherit fetchurl stdenv ncurses;
5532   };
5534   hwdata = import ../os-specific/linux/hwdata {
5535     inherit fetchurl stdenv;
5536   };
5538   ifplugd = import ../os-specific/linux/ifplugd {
5539     inherit fetchurl stdenv pkgconfig libdaemon;
5540   };
5542   iproute = import ../os-specific/linux/iproute {
5543     inherit fetchurl stdenv flex bison db4;
5544   };
5546   iputils = (
5547     import ../os-specific/linux/iputils {
5548     inherit fetchurl stdenv;
5549     glibc = stdenv.gcc.libc;
5550     kernelHeaders = stdenv.gcc.libc.kernelHeaders;
5551   });
5553   iptables = import ../os-specific/linux/iptables {
5554     inherit fetchurl stdenv;
5555   };
5557   ipw2200fw = import ../os-specific/linux/firmware/ipw2200 {
5558     inherit fetchurl stdenv;
5559   };
5561   iwlwifi1000ucode = import ../os-specific/linux/firmware/iwlwifi-1000-ucode {
5562     inherit fetchurl stdenv;
5563   };
5565   iwlwifi3945ucode = import ../os-specific/linux/firmware/iwlwifi-3945-ucode {
5566     inherit fetchurl stdenv;
5567   };
5569   iwlwifi4965ucodeV1 = import ../os-specific/linux/firmware/iwlwifi-4965-ucode {
5570     inherit fetchurl stdenv;
5571   };
5573   iwlwifi4965ucodeV2 = import ../os-specific/linux/firmware/iwlwifi-4965-ucode/version-2.nix {
5574     inherit fetchurl stdenv;
5575   };
5577   iwlwifi5000ucode = import ../os-specific/linux/firmware/iwlwifi-5000-ucode {
5578     inherit fetchurl stdenv;
5579   };
5581   kbd = import ../os-specific/linux/kbd {
5582     inherit fetchurl stdenv bison flex autoconf automake;
5583   };
5585   kernelHeaders = kernelHeaders_2_6_28;
5587   kernelHeaders_2_6_18 = import ../os-specific/linux/kernel-headers/2.6.18.5.nix {
5588     inherit fetchurl stdenv unifdef;
5589   };
5591   kernelHeaders_2_6_28 = import ../os-specific/linux/kernel-headers/2.6.28.nix {
5592     inherit fetchurl stdenv perl;
5593   };
5595   kernelHeadersArm = import ../os-specific/linux/kernel-headers-cross {
5596     inherit fetchurl stdenv;
5597     cross = "arm-linux";
5598   };
5600   kernelHeadersMips = import ../os-specific/linux/kernel-headers-cross {
5601     inherit fetchurl stdenv;
5602     cross = "mips-linux";
5603   };
5605   kernelHeadersSparc = import ../os-specific/linux/kernel-headers-cross {
5606     inherit fetchurl stdenv;
5607     cross = "sparc-linux";
5608   };
5610   kernelPatches = import ../os-specific/linux/kernel/patches.nix {
5611     inherit fetchurl;
5612   };
5614   kernel_2_6_25 = makeOverridable (import ../os-specific/linux/kernel/linux-2.6.25.nix) {
5615     inherit fetchurl stdenv perl mktemp module_init_tools;
5616     kernelPatches =
5617       [ kernelPatches.fbcondecor_2_6_25
5618         kernelPatches.sec_perm_2_6_24
5619       ];
5620   };
5622   kernel_2_6_27 = makeOverridable (import ../os-specific/linux/kernel/linux-2.6.27.nix) {
5623     inherit fetchurl stdenv perl mktemp module_init_tools;
5624     kernelPatches =
5625       [ kernelPatches.fbcondecor_2_6_27
5626         kernelPatches.sec_perm_2_6_24
5627       ];
5628   };
5630   kernel_2_6_28 = makeOverridable (import ../os-specific/linux/kernel/linux-2.6.28.nix) {
5631     inherit fetchurl stdenv perl mktemp module_init_tools;
5632     kernelPatches =
5633       [ kernelPatches.fbcondecor_2_6_28
5634         kernelPatches.sec_perm_2_6_24
5635         kernelPatches.ext4_softlockups_2_6_28
5636       ];
5637   };
5639   kernel_2_6_29 = makeOverridable (import ../os-specific/linux/kernel/linux-2.6.29.nix) {
5640     inherit fetchurl stdenv perl mktemp module_init_tools;
5641     kernelPatches =
5642       [ kernelPatches.fbcondecor_2_6_29
5643         kernelPatches.sec_perm_2_6_24
5644       ];
5645   };
5647   kernel_2_6_31 = makeOverridable (import ../os-specific/linux/kernel/linux-2.6.31.nix) {
5648     inherit fetchurl stdenv perl mktemp module_init_tools;
5649     kernelPatches = [];
5650   };
5652   kernel_2_6_32 = makeOverridable (import ../os-specific/linux/kernel/linux-2.6.32.nix) {
5653     inherit fetchurl stdenv perl mktemp module_init_tools;
5654     kernelPatches =
5655       [ kernelPatches.fbcondecor_2_6_31
5656         kernelPatches.sec_perm_2_6_24
5657       ];
5658   };
5660   kernel_2_6_32_zen4 = makeOverridable (import ../os-specific/linux/zen-kernel/2.6.32-zen4.nix) {
5661     inherit fetchurl stdenv perl mktemp module_init_tools runCommand xz;
5662   };
5664   kernel_2_6_32_zen4_oldi686 = kernel_2_6_32_zen4.override {
5665     features = {
5666       oldI686 = true;
5667     };
5668   };
5670   kernel_2_6_32_zen4_bfs = kernel_2_6_32_zen4.override {
5671     features = {
5672       ckSched = true;
5673     };
5674   };
5676   /* Kernel modules are inherently tied to a specific kernel.  So
5677      rather than provide specific instances of those packages for a
5678      specific kernel, we have a function that builds those packages
5679      for a specific kernel.  This function can then be called for
5680      whatever kernel you're using. */
5682   kernelPackagesFor = kernel: rec {
5684     inherit kernel;
5686     aufs = import ../os-specific/linux/aufs {
5687       inherit fetchurl stdenv kernel;
5688     };
5690     # Currently it is broken
5691     # Build requires exporting some symbols from kernel
5692     # Go to package homepage to learn about the needed
5693     # patch. Feel free to take over the package.
5694     aufs2 = import ../os-specific/linux/aufs2 {
5695       inherit fetchgit stdenv kernel perl;
5696     };
5698     aufs2Utils = if lib.attrByPath ["features" "aufs"] false kernel then
5699       builderDefsPackage ../os-specific/linux/aufs2-utils {
5700         inherit kernel;
5701       }
5702     else null;
5704     exmap = import ../os-specific/linux/exmap {
5705       inherit fetchurl stdenv kernel boost pcre pkgconfig;
5706       inherit (gtkLibs) gtkmm;
5707     };
5709     iwlwifi = import ../os-specific/linux/iwlwifi {
5710       inherit fetchurl stdenv kernel;
5711     };
5713     iwlwifi4965ucode =
5714       (if (builtins.compareVersions kernel.version "2.6.27" == 0)
5715           || (builtins.compareVersions kernel.version "2.6.27" == 1)
5716        then iwlwifi4965ucodeV2
5717        else iwlwifi4965ucodeV1);
5719     atheros = composedArgsAndFun (import ../os-specific/linux/atheros/0.9.4.nix) {
5720       inherit fetchurl stdenv builderDefs kernel lib;
5721     };
5723     nvidia_x11 = import ../os-specific/linux/nvidia-x11 {
5724       inherit stdenv fetchurl kernel xlibs gtkLibs zlib perl;
5725     };
5727     nvidia_x11_legacy = import ../os-specific/linux/nvidia-x11/legacy.nix {
5728       inherit stdenv fetchurl kernel xlibs gtkLibs zlib;
5729     };
5731     openafsClient = import ../servers/openafs-client {
5732       inherit stdenv fetchurl autoconf automake flex yacc;
5733       inherit kernel glibc ncurses perl krb5;
5734     };
5736     wis_go7007 = import ../os-specific/linux/wis-go7007 {
5737       inherit fetchurl stdenv kernel ncurses fxload;
5738     };
5740     kqemu = builderDefsPackage ../os-specific/linux/kqemu/1.4.0pre1.nix {
5741       inherit kernel perl;
5742     };
5744     splashutils =
5745       # Splashutils 1.3 is broken, so disable splash on older kernels.
5746       if kernel.features ? fbSplash then /* splashutils_13 */ null else
5747       if kernel.features ? fbConDecor then splashutils_15 else
5748       null;
5750     ext3cowtools = import ../os-specific/linux/ext3cow-tools {
5751       inherit stdenv fetchurl;
5752       kernel_ext3cowpatched = kernel;
5753     };
5755     /* compiles but has to be integrated into the kernel somehow
5756       Let's have it uncommented and finish it..
5757     */
5758     ndiswrapper = import ../os-specific/linux/ndiswrapper {
5759       inherit fetchurl stdenv;
5760       inherit kernel perl;
5761     };
5763     ov511 = import ../os-specific/linux/ov511 {
5764       inherit fetchurl kernel;
5765       stdenv = overrideGCC stdenv gcc34;
5766     };
5768     # State Nix
5769     snix = import ../tools/package-management/snix {
5770       inherit fetchurl stdenv perl curl bzip2 openssl bison;
5771       inherit libtool automake autoconf docbook5 docbook5_xsl libxslt docbook_xml_dtd_43 w3m;
5773       aterm = aterm242fixes;
5774       db4 = db45;
5776       flex = flex2533;
5778       inherit ext3cowtools e3cfsprogs rsync;
5779       ext3cow_kernel = kernel;
5780     };
5782     sysprof = import ../development/tools/profiling/sysprof {
5783       inherit fetchurl stdenv binutils pkgconfig kernel;
5784       inherit (gnome) gtk glib pango libglade;
5785     };
5787     virtualbox = import ../applications/virtualization/virtualbox {
5788       stdenv = stdenv_32bit;
5789       inherit fetchurl lib iasl dev86 libxslt libxml2 SDL hal
5790           libcap libpng zlib kernel python which alsaLib curl glib;
5791       qt4 = qt45;
5792       inherit (xlibs) xproto libX11 libXext libXcursor;
5793       inherit (gnome) libIDL;
5794     };
5796     virtualboxGuestAdditions = import ../applications/virtualization/virtualbox/guest-additions {
5797       inherit stdenv fetchurl lib patchelf cdrkit kernel;
5798       inherit (xlibs) libX11 libXt libXext libXmu libXcomposite libXfixes;
5799     };
5800   };
5802   # Build the kernel modules for the some of the kernels.
5803   kernelPackages_2_6_25 = recurseIntoAttrs (kernelPackagesFor kernel_2_6_25);
5804   kernelPackages_2_6_27 = recurseIntoAttrs (kernelPackagesFor kernel_2_6_27);
5805   kernelPackages_2_6_28 = recurseIntoAttrs (kernelPackagesFor kernel_2_6_28);
5806   kernelPackages_2_6_29 = recurseIntoAttrs (kernelPackagesFor kernel_2_6_29);
5807   kernelPackages_2_6_31 = recurseIntoAttrs (kernelPackagesFor kernel_2_6_31);
5808   kernelPackages_2_6_32 = recurseIntoAttrs (kernelPackagesFor kernel_2_6_32);
5810   # The current default kernel / kernel modules.
5811   kernel = kernel_2_6_32;
5812   kernelPackages = kernelPackagesFor kernel;
5814   customKernel = composedArgsAndFun (lib.sumTwoArgs (import ../os-specific/linux/kernel/generic.nix) {
5815     inherit fetchurl stdenv perl mktemp module_init_tools;
5816   });
5818   keyutils = import ../os-specific/linux/keyutils {
5819     inherit fetchurl stdenv;
5820   };
5822   libselinux = import ../os-specific/linux/libselinux {
5823     inherit fetchurl stdenv libsepol;
5824   };
5826   libraw1394 = import ../development/libraries/libraw1394 {
5827     inherit fetchurl stdenv;
5828   };
5830   libsexy = import ../development/libraries/libsexy {
5831     inherit stdenv fetchurl pkgconfig libxml2;
5832     inherit (gtkLibs) glib gtk pango;
5833   };
5835   librsvg = gnome.librsvg;
5837   libsepol = import ../os-specific/linux/libsepol {
5838     inherit fetchurl stdenv;
5839   };
5841   libsmbios = import ../os-specific/linux/libsmbios {
5842     inherit fetchurl stdenv pkgconfig libxml2 perl;
5843   };
5845   lm_sensors = import ../os-specific/linux/lm_sensors {
5846     inherit fetchurl stdenv bison flex perl;
5847   };
5849   klibc = makeOverridable (import ../os-specific/linux/klibc) {
5850     inherit fetchurl stdenv perl bison mktemp;
5851     kernelHeaders = glibc.kernelHeaders;
5852   };
5854   # Old version; needed in vmtools for insmod.  Should use
5855   # module_init_tools instead.
5856   klibc_15 = makeOverridable (import ../os-specific/linux/klibc/1.5.nix) {
5857     inherit fetchurl stdenv perl bison mktemp;
5858     kernelHeaders = glibc.kernelHeaders;
5859   };
5861   klibcShrunk = makeOverridable (import ../os-specific/linux/klibc/shrunk.nix) {
5862     inherit stdenv klibc;
5863   };
5865   kvm = kvm76;
5867   kvm76 = import ../os-specific/linux/kvm/76.nix {
5868     inherit fetchurl stdenv zlib e2fsprogs SDL alsaLib pkgconfig rsync;
5869     inherit (glibc) kernelHeaders;
5870   };
5872   kvm86 = import ../os-specific/linux/kvm/86.nix {
5873     inherit fetchurl stdenv zlib SDL alsaLib pkgconfig pciutils;
5874     inherit (glibc) kernelHeaders;
5875   };
5877   kvm88 = import ../os-specific/linux/kvm/88.nix {
5878     inherit fetchurl stdenv zlib SDL alsaLib pkgconfig pciutils;
5879     inherit (glibc) kernelHeaders;
5880   };
5882   libcap = import ../os-specific/linux/libcap {
5883     inherit fetchurl stdenv attr;
5884   };
5886   libnscd = import ../os-specific/linux/libnscd {
5887     inherit fetchurl stdenv;
5888   };
5890   libnotify = import ../development/libraries/libnotify {
5891     inherit stdenv fetchurl pkgconfig dbus dbus_glib;
5892     inherit (gtkLibs) gtk glib;
5893   };
5895   libvolume_id = import ../os-specific/linux/libvolume_id {
5896     inherit fetchurl stdenv;
5897   };
5899   lvm2 = import ../os-specific/linux/lvm2 {
5900     inherit fetchurl stdenv;
5901   };
5903   mdadm = import ../os-specific/linux/mdadm {
5904     inherit fetchurl stdenv groff;
5905   };
5907   mingetty = import ../os-specific/linux/mingetty {
5908     inherit fetchurl stdenv;
5909   };
5911   module_init_tools = import ../os-specific/linux/module-init-tools {
5912     inherit fetchurl stdenv;
5913   };
5915   mount_cifs = import ../os-specific/linux/mount-cifs {
5916     inherit fetchurl stdenv;
5917   };
5919   aggregateModules = modules:
5920     import ../os-specific/linux/module-init-tools/aggregator.nix {
5921       inherit stdenv module_init_tools modules buildEnv;
5922     };
5924   modutils = import ../os-specific/linux/modutils {
5925     inherit fetchurl bison flex;
5926     stdenv = overrideGCC stdenv gcc34;
5927   };
5929   nettools = import ../os-specific/linux/net-tools {
5930     inherit fetchurl stdenv;
5931   };
5933   neverball = import ../games/neverball {
5934     inherit stdenv fetchurl SDL mesa libpng libjpeg SDL_ttf libvorbis
5935       gettext physfs;
5936   };
5938   numactl = import ../os-specific/linux/numactl {
5939     inherit fetchurl stdenv;
5940   };
5942   gw6c = builderDefsPackage (import ../os-specific/linux/gw6c) {
5943     inherit fetchurl stdenv nettools openssl procps iproute;
5944   };
5946   nss_ldap = import ../os-specific/linux/nss_ldap {
5947     inherit fetchurl stdenv openldap;
5948   };
5950   pam = import ../os-specific/linux/pam {
5951     inherit stdenv fetchurl cracklib flex;
5952   };
5954   # pam_bioapi ( see http://www.thinkwiki.org/wiki/How_to_enable_the_fingerprint_reader )
5956   pam_console = import ../os-specific/linux/pam_console {
5957     inherit stdenv fetchurl pam autoconf automake pkgconfig bison glib;
5958     libtool = libtool_1_5;
5959     flex = if stdenv.system == "i686-linux" then flex else flex2533;
5960   };
5962   pam_devperm = import ../os-specific/linux/pam_devperm {
5963     inherit stdenv fetchurl pam;
5964   };
5966   pam_ldap = import ../os-specific/linux/pam_ldap {
5967     inherit stdenv fetchurl pam openldap;
5968   };
5970   pam_login = import ../os-specific/linux/pam_login {
5971     inherit stdenv fetchurl pam;
5972   };
5974   pam_unix2 = import ../os-specific/linux/pam_unix2 {
5975     inherit stdenv fetchurl pam libxcrypt;
5976   };
5978   pam_usb = import ../os-specific/linux/pam_usb {
5979     inherit stdenv fetchurl makeWrapper useSetUID dbus libxml2 pam hal pkgconfig pmount python pythonDBus;
5980   };
5982   pcmciaUtils = composedArgsAndFun (import ../os-specific/linux/pcmciautils) {
5983     inherit stdenv fetchurl udev yacc flex;
5984     inherit sysfsutils module_init_tools;
5986     firmware = getConfig ["pcmciaUtils" "firmware"] [];
5987     config = getConfig ["pcmciaUtils" "config"] null;
5988     inherit lib;
5989   };
5991   pmount = import ../os-specific/linux/pmount {
5992     inherit fetchurl stdenv cryptsetup dbus dbus_glib hal intltool ntfs3g utillinuxng;
5993   };
5995   pmutils = import ../os-specific/linux/pm-utils {
5996     inherit fetchurl stdenv;
5997   };
5999   powertop = import ../os-specific/linux/powertop {
6000     inherit fetchurl stdenv ncurses gettext;
6001   };
6003   procps = import ../os-specific/linux/procps {
6004     inherit fetchurl stdenv ncurses;
6005   };
6007   pwdutils = import ../os-specific/linux/pwdutils {
6008     inherit fetchurl stdenv pam openssl libnscd;
6009   };
6011   qemu_kvm = import ../os-specific/linux/qemu-kvm {
6012     inherit fetchurl stdenv zlib SDL alsaLib pkgconfig pciutils;
6013   };
6015   radeontools = import ../os-specific/linux/radeontools {
6016     inherit pciutils;
6017     inherit fetchurl stdenv;
6018   };
6020   rt73fw = import ../os-specific/linux/firmware/rt73 {
6021     inherit fetchurl stdenv unzip;
6022   };
6024   sdparm = import ../os-specific/linux/sdparm {
6025     inherit fetchurl stdenv;
6026   };
6028   shadowutils = import ../os-specific/linux/shadow {
6029     inherit fetchurl stdenv;
6030   };
6032   splashutils_13 = import ../os-specific/linux/splashutils/1.3.nix {
6033     inherit fetchurl stdenv klibc;
6034     zlib = zlibStatic;
6035     libjpeg = libjpegStatic;
6036   };
6038   splashutils_15 = import ../os-specific/linux/splashutils/1.5.nix {
6039     inherit fetchurl stdenv klibc;
6040     zlib = zlibStatic;
6041     libjpeg = libjpegStatic;
6042   };
6044   statifier = builderDefsPackage (import ../os-specific/linux/statifier) {
6045   };
6047   sysfsutils = import ../os-specific/linux/sysfsutils {
6048     inherit fetchurl stdenv;
6049   };
6051   # Provided with sysfsutils.
6052   libsysfs = sysfsutils;
6053   systool = sysfsutils;
6055   sysklogd = import ../os-specific/linux/sysklogd {
6056     inherit fetchurl stdenv;
6057   };
6059   syslinux = import ../os-specific/linux/syslinux {
6060     inherit fetchurl stdenv nasm perl;
6061   };
6063   sysstat = import ../os-specific/linux/sysstat {
6064     inherit fetchurl stdenv gettext;
6065   };
6067   sysvinit = import ../os-specific/linux/sysvinit {
6068     inherit fetchurl stdenv;
6069   };
6071   sysvtools = import ../os-specific/linux/sysvinit {
6072     inherit fetchurl stdenv;
6073     withoutInitTools = true;
6074   };
6076   # FIXME: `tcp-wrapper' is actually not OS-specific.
6077   tcpWrapper = import ../os-specific/linux/tcp-wrapper {
6078     inherit fetchurl stdenv;
6079   };
6081   trackballs = import ../games/trackballs {
6082     inherit stdenv fetchurl SDL mesa SDL_ttf gettext zlib SDL_mixer SDL_image guile;
6083     debug = false;
6084   };
6086   tunctl = import ../os-specific/linux/tunctl {
6087     inherit stdenv fetchurl;
6088   };
6090   /*tuxracer = builderDefsPackage (import ../games/tuxracer) {
6091     inherit mesa tcl freeglut;
6092     inherit (xlibs) libX11 xproto;
6093   };*/
6095   udev = makeOverridable (import ../os-specific/linux/udev) {
6096     inherit fetchurl stdenv gperf pkgconfig acl libusb usbutils pciutils glib;
6097   };
6099   uml = import ../os-specific/linux/kernel/linux-2.6.29.nix {
6100     inherit fetchurl stdenv perl mktemp module_init_tools;
6101     userModeLinux = true;
6102   };
6104   umlutilities = import ../os-specific/linux/uml-utilities {
6105     inherit fetchurl kernelHeaders stdenv readline lib;
6106     tunctl = true; mconsole = true;
6107   };
6109   upstart = import ../os-specific/linux/upstart {
6110     inherit fetchurl stdenv;
6111   };
6113   upstart06 = import ../os-specific/linux/upstart/0.6.nix {
6114     inherit fetchurl stdenv pkgconfig dbus expat;
6115   };
6117   upstartJobControl = import ../os-specific/linux/upstart/jobcontrol.nix {
6118     inherit stdenv;
6119   };
6121   usbutils = import ../os-specific/linux/usbutils {
6122     inherit fetchurl stdenv pkgconfig libusb;
6123   };
6125   utillinux = utillinuxng;
6127   utillinuxCurses = utillinuxngCurses;
6129   utillinuxng = makeOverridable (import ../os-specific/linux/util-linux-ng) {
6130     inherit fetchurl stdenv;
6131   };
6133   utillinuxngCurses = utillinuxng.override {
6134     inherit ncurses;
6135   };
6137   wesnoth = import ../games/wesnoth {
6138     inherit fetchurl stdenv SDL SDL_image SDL_mixer SDL_net SDL_ttf
6139       gettext zlib boost freetype libpng pkgconfig;
6140     inherit (gtkLibs) pango;
6141   };
6143   wirelesstools = import ../os-specific/linux/wireless-tools {
6144     inherit fetchurl stdenv;
6145   };
6147   wpa_supplicant = import ../os-specific/linux/wpa_supplicant {
6148     inherit fetchurl stdenv openssl;
6149   };
6151   wpa_supplicant_gui_qt4 = import ../os-specific/linux/wpa_supplicant/gui-qt4.nix {
6152     inherit fetchurl stdenv qt4 imagemagick inkscape;
6153   };
6155   xmoto = builderDefsPackage (import ../games/xmoto) {
6156     inherit chipmunk sqlite curl zlib bzip2 libjpeg libpng
6157       freeglut mesa SDL SDL_mixer SDL_image SDL_net SDL_ttf
6158       lua5 ode;
6159   };
6161   xorg_sys_opengl = import ../os-specific/linux/opengl/xorg-sys {
6162     inherit stdenv xlibs expat libdrm;
6163   };
6165   zd1211fw = import ../os-specific/linux/firmware/zd1211 {
6166     inherit stdenv fetchurl;
6167   };
6169   ### DATA
6171   arkpandora_ttf = builderDefsPackage (import ../data/fonts/arkpandora) {
6172   };
6174   bakoma_ttf = import ../data/fonts/bakoma-ttf {
6175     inherit fetchurl stdenv;
6176   };
6178   cacert = import ../data/misc/cacert {
6179     inherit fetchurl stdenv;
6180   };
6182   corefonts = import ../data/fonts/corefonts {
6183     inherit fetchurl stdenv cabextract;
6184   };
6186   wrapFonts = paths : ((import ../data/fonts/fontWrap) {
6187     inherit fetchurl stdenv builderDefs paths ttmkfdir;
6188     inherit (xorg) mkfontdir mkfontscale;
6189   });
6191   clearlyU = composedArgsAndFun (import ../data/fonts/clearlyU/1.9.nix) {
6192     inherit builderDefs;
6193     inherit (xorg) mkfontdir mkfontscale;
6194   };
6196   dejavu_fonts = import ../data/fonts/dejavu-fonts {
6197     inherit fetchurl stdenv fontforge perl fontconfig;
6198     inherit (perlPackages) FontTTF;
6199   };
6201   docbook5 = import ../data/sgml+xml/schemas/docbook-5.0 {
6202     inherit fetchurl stdenv unzip;
6203   };
6205   docbook_xml_dtd_412 = import ../data/sgml+xml/schemas/xml-dtd/docbook/4.1.2.nix {
6206     inherit fetchurl stdenv unzip;
6207   };
6209   docbook_xml_dtd_42 = import ../data/sgml+xml/schemas/xml-dtd/docbook/4.2.nix {
6210     inherit fetchurl stdenv unzip;
6211   };
6213   docbook_xml_dtd_43 = import ../data/sgml+xml/schemas/xml-dtd/docbook/4.3.nix {
6214     inherit fetchurl stdenv unzip;
6215   };
6217   docbook_xml_dtd_45 = import ../data/sgml+xml/schemas/xml-dtd/docbook/4.5.nix {
6218     inherit fetchurl stdenv unzip;
6219   };
6221   docbook_xml_ebnf_dtd = import ../data/sgml+xml/schemas/xml-dtd/docbook-ebnf {
6222     inherit fetchurl stdenv unzip;
6223   };
6225   docbook_xml_xslt = docbook_xsl;
6227   docbook_xsl = import ../data/sgml+xml/stylesheets/xslt/docbook-xsl {
6228     inherit fetchurl stdenv;
6229   };
6231   docbook5_xsl = docbook_xsl_ns;
6233   docbook_xsl_ns = import ../data/sgml+xml/stylesheets/xslt/docbook-xsl-ns {
6234     inherit fetchurl stdenv;
6235   };
6237   junicode = composedArgsAndFun (import ../data/fonts/junicode/0.6.15.nix) {
6238     inherit builderDefs fontforge unzip;
6239     inherit (xorg) mkfontdir mkfontscale;
6240   };
6242   freefont_ttf = import ../data/fonts/freefont-ttf {
6243     inherit fetchurl stdenv;
6244   };
6246   liberation_ttf = import ../data/fonts/redhat-liberation-fonts {
6247     inherit fetchurl stdenv;
6248   };
6250   libertine = builderDefsPackage (import ../data/fonts/libertine/2.7.nix) {
6251     inherit fontforge;
6252   };
6253   libertineBin = builderDefsPackage (import ../data/fonts/libertine/2.7.bin.nix) {
6254   };
6256   lmodern = import ../data/fonts/lmodern {
6257     inherit fetchurl stdenv;
6258   };
6260   manpages = import ../data/documentation/man-pages {
6261     inherit fetchurl stdenv;
6262   };
6264   miscfiles = import ../data/misc/miscfiles {
6265     inherit fetchurl stdenv;
6266   };
6268   mph_2b_damase = import ../data/fonts/mph-2b-damase {
6269     inherit fetchurl stdenv unzip;
6270   };
6272   pthreadmanpages = lowPrio (import ../data/documentation/pthread-man-pages {
6273     inherit fetchurl stdenv perl;
6274   });
6276   shared_mime_info = import ../data/misc/shared-mime-info {
6277     inherit fetchurl stdenv pkgconfig gettext
6278       intltool perl perlXMLParser libxml2 glib;
6279   };
6281   stdmanpages = import ../data/documentation/std-man-pages {
6282     inherit fetchurl stdenv;
6283   };
6285   iana_etc = import ../data/misc/iana-etc {
6286     inherit fetchurl stdenv;
6287   };
6289   popplerData = import ../data/misc/poppler-data {
6290     inherit fetchurl stdenv;
6291   };
6293   r3rs = import ../data/documentation/rnrs/r3rs.nix {
6294     inherit fetchurl stdenv texinfo;
6295   };
6297   r4rs = import ../data/documentation/rnrs/r4rs.nix {
6298     inherit fetchurl stdenv texinfo;
6299   };
6301   r5rs = import ../data/documentation/rnrs/r5rs.nix {
6302     inherit fetchurl stdenv texinfo;
6303   };
6305   themes = name: import (../data/misc/themes + ("/" + name + ".nix")) {
6306     inherit fetchurl;
6307   };
6309   ttf_bitstream_vera = import ../data/fonts/ttf-bitstream-vera {
6310     inherit fetchurl stdenv;
6311   };
6313   ucsFonts = import ../data/fonts/ucs-fonts {
6314     inherit fetchurl stdenv wrapFonts;
6315   };
6317   unifont = import ../data/fonts/unifont {
6318     inherit debPackage perl;
6319     inherit (xorg) mkfontdir mkfontscale bdftopcf fontutil;
6320   };
6322   vistafonts = import ../data/fonts/vista-fonts {
6323     inherit fetchurl stdenv cabextract;
6324   };
6326   wqy_zenhei = composedArgsAndFun (import ../data/fonts/wqy_zenhei/0.4.23-1.nix) {
6327     inherit builderDefs;
6328   };
6330   xhtml1 = import ../data/sgml+xml/schemas/xml-dtd/xhtml1 {
6331     inherit fetchurl stdenv libxml2;
6332   };
6334   xkeyboard_config = import ../data/misc/xkeyboard-config {
6335     inherit fetchurl stdenv perl perlXMLParser gettext intltool;
6336     inherit (xlibs) xkbcomp;
6337   };
6340   ### APPLICATIONS
6343   aangifte2005 = import ../applications/taxes/aangifte-2005 {
6344     inherit stdenv fetchurl;
6345     inherit (xlibs) libX11 libXext;
6346   };
6348   aangifte2006 = import ../applications/taxes/aangifte-2006 {
6349     inherit stdenv fetchurl;
6350     inherit (xlibs) libX11 libXext;
6351   };
6353   aangifte2007 = import ../applications/taxes/aangifte-2007 {
6354     inherit stdenv fetchurl;
6355     inherit (xlibs) libX11 libXext libSM;
6356   };
6358   aangifte2008 = import ../applications/taxes/aangifte-2008 {
6359     inherit stdenv fetchurl;
6360     inherit (xlibs) libX11 libXext libSM;
6361   };
6363   abcde = import ../applications/audio/abcde {
6364     inherit fetchurl stdenv libcdio cddiscid wget bash vorbisTools
6365             makeWrapper;
6366   };
6368   abiword = import ../applications/office/abiword {
6369     inherit fetchurl stdenv pkgconfig fribidi libpng popt libgsf enchant wv librsvg bzip2;
6370     inherit (gtkLibs) gtk;
6371     inherit (gnome) libglade libgnomecanvas;
6372   };
6374   adobeReader = import ../applications/misc/adobe-reader {
6375     inherit fetchurl stdenv zlib libxml2 cups;
6376     inherit (xlibs) libX11;
6377     inherit (gtkLibs) glib pango atk gtk;
6378   };
6380   amsn = import ../applications/networking/instant-messengers/amsn {
6381     inherit fetchurl stdenv which tcl tk x11;
6382     libstdcpp = gcc33.gcc;
6383   };
6385   ardour = import ../applications/audio/ardour {
6386     inherit fetchurl stdenv lib pkgconfig scons boost redland librdf_raptor
6387       librdf_rasqal jackaudio flac libsamplerate alsaLib libxml2 libxslt
6388       libsndfile libsigcxx libusb cairomm librdf liblo fftw fftwSinglePrec
6389       aubio libmad;
6390     inherit (gtkLibs) glib pango gtk glibmm gtkmm;
6391     inherit (gnome) libgnomecanvas;
6392   };
6394   audacious = import ../applications/audio/audacious/player.nix {
6395     inherit fetchurl stdenv pkgconfig libmowgli libmcs gettext xlibs dbus_glib;
6396     inherit (gnome) libglade;
6397     inherit (gtkLibs) glib gtk;
6398   };
6400   audacious_plugins = import ../applications/audio/audacious/plugins.nix {
6401     inherit fetchurl stdenv pkgconfig audacious dbus_glib gettext
6402       libmad xlibs alsaLib taglib libmpcdec libogg libvorbis
6403       libcdio libcddb libxml2;
6404   };
6406   audacity = import ../applications/audio/audacity {
6407     inherit fetchurl stdenv gettext pkgconfig zlib perl intltool libogg
6408       libvorbis libmad;
6409     inherit (gtkLibs) gtk glib;
6410     inherit wxGTK;
6411   };
6413   aumix = import ../applications/audio/aumix {
6414     inherit fetchurl stdenv ncurses pkgconfig gettext;
6415     inherit (gtkLibs) gtk;
6416     gtkGUI = false;
6417   };
6419   autopanosiftc = import ../applications/graphics/autopanosiftc {
6420     inherit fetchurl cmake libpng libtiff libjpeg panotools libxml2;
6421     stdenv = overrideGCC stdenv gcc43_wrapper2;
6422   };
6424   avidemux = import ../applications/video/avidemux {
6425     inherit fetchurl cmake pkgconfig libxml2 qt4 gettext SDL libxslt x264
6426       alsaLib lame faac faad2 libvorbis;
6427     stdenv = overrideGCC stdenv gcc43_wrapper2;
6428     inherit (gtkLibs) gtk;
6429     inherit (xlibs) libXv pixman libpthreadstubs libXau libXdmcp;
6430   };
6432   batik = import ../applications/graphics/batik {
6433     inherit fetchurl stdenv unzip;
6434   };
6436   bazaar = import ../applications/version-management/bazaar {
6437     inherit fetchurl stdenv makeWrapper;
6438     python = pythonFull;
6439   };
6441   bazaarTools = builderDefsPackage (import ../applications/version-management/bazaar/tools.nix) {
6442     inherit bazaar;
6443   };
6445   beast = import ../applications/audio/beast {
6446 # stdenv = overrideGCC stdenv gcc34;
6447     inherit stdenv fetchurl zlib guile pkgconfig intltool libogg libvorbis python libxml2 bash perl gettext;
6448     inherit (gtkLibs) gtk glib;
6449     inherit (gnome) libgnomecanvas libart_lgpl;
6450     inherit automake autoconf;
6451   };
6453   bitlbee = import ../applications/networking/instant-messengers/bitlbee {
6454     inherit fetchurl stdenv gnutls pkgconfig glib;
6455   };
6457   bitlbeeOtr = import ../applications/networking/instant-messengers/bitlbee-otr {
6458     inherit fetchbzr stdenv gnutls pkgconfig libotr libgcrypt
6459       libxslt xmlto docbook_xsl docbook_xml_dtd_42 perl glib;
6460   };
6462   # commented out because it's using the new configuration style proposal which is unstable
6463   #biew = import ../applications/misc/biew {
6464   #  inherit lib stdenv fetchurl ncurses;
6465   #};
6467   # only to be able to compile blender - I couldn't compile the default openal software
6468   # Perhaps this can be removed - don't know which one openal{,soft} is better
6469   freealut_soft = import ../development/libraries/freealut {
6470     inherit fetchurl stdenv;
6471     openal = openalSoft;
6472   };
6474   blender = import ../applications/misc/blender {
6475     inherit cmake mesa gettext freetype SDL libtiff fetchurl glibc scons x11 lib
6476       libjpeg libpng zlib /* smpeg sdl */ python;
6477     inherit (xlibs) inputproto libXi;
6478     freealut = freealut_soft;
6479     openal = openalSoft;
6480     openexr = openexr_1_4_0;
6481     # using gcc43 makes blender segfault when pressing p then esc.
6482     # is this related to the PHP bug? I'm to lazy to try recompilng it without optimizations
6483     stdenv = overrideGCC stdenv gcc42;
6484   };
6486   bmp = import ../applications/audio/bmp {
6487     inherit fetchurl stdenv pkgconfig libogg libvorbis alsaLib id3lib;
6488     inherit (gnome) esound libglade;
6489     inherit (gtkLibs) glib gtk;
6490   };
6492   bmp_plugin_musepack = import ../applications/audio/bmp-plugins/musepack {
6493     inherit fetchurl stdenv pkgconfig bmp libmpcdec taglib;
6494   };
6496   bmp_plugin_wma = import ../applications/audio/bmp-plugins/wma {
6497     inherit fetchurl stdenv pkgconfig bmp;
6498   };
6500   bvi = import ../applications/editors/bvi {
6501     inherit fetchurl stdenv ncurses;
6502   };
6504   calibre = import ../applications/misc/calibre {
6505     inherit stdenv fetchurl libpng imagemagick pkgconfig libjpeg fontconfig podofo
6506       qt4 makeWrapper unrar;
6507     python = python26Full;
6508     pyqt4 = pyqt4_python26;
6509     sip = sip_python26;
6510     pil = pil_python26;
6511     popplerQt4 = popplerQt45;
6512     inherit (python26Packages) mechanize lxml dateutil;
6513   };
6515   carrier = builderDefsPackage (import ../applications/networking/instant-messengers/carrier/2.5.0.nix) {
6516     inherit fetchurl stdenv pkgconfig perl perlXMLParser libxml2 openssl nss
6517       gtkspell aspell gettext ncurses avahi dbus dbus_glib python
6518       libtool automake autoconf;
6519     GStreamer = gst_all.gstreamer;
6520     inherit (gtkLibs) gtk glib;
6521     inherit (gnome) startupnotification GConf ;
6522     inherit (xlibs) libXScrnSaver scrnsaverproto libX11 xproto kbproto;
6523   };
6524   funpidgin = carrier;
6526   cddiscid = import ../applications/audio/cd-discid {
6527     inherit fetchurl stdenv;
6528   };
6530   cdparanoia = cdparanoiaIII;
6532   cdparanoiaIII = import ../applications/audio/cdparanoia {
6533     inherit fetchurl stdenv;
6534   };
6536   cdrtools = import ../applications/misc/cdrtools {
6537     inherit fetchurl stdenv;
6538   };
6540   chatzilla =
6541     xulrunnerWrapper {
6542       launcher = "chatzilla";
6543       application = import ../applications/networking/irc/chatzilla {
6544         inherit fetchurl stdenv unzip;
6545       };
6546     };
6548   chrome = import ../applications/networking/browsers/chromium {
6549     inherit stdenv fetchurl ffmpeg cairo nspr nss fontconfig freetype alsaLib makeWrapper unzip expat zlib bzip2 libpng;
6550     inherit (xlibs) libX11 libXext libXrender libXt ;
6551     inherit (gtkLibs) gtk glib pango atk;
6552     inherit (gnome) GConf;
6553     libjpeg = libjpeg62;
6554   };
6556   chromeWrapper = wrapFirefox chrome "chrome" "";
6559   cinelerra = import ../applications/video/cinelerra {
6560     inherit lib fetchurl sourceFromHead stdenv
6561       automake autoconf libtool
6562       a52dec alsaLib   lame libavc1394 libiec61883 libraw1394 libsndfile
6563       libvorbis libogg libjpeg libtiff freetype mjpegtools x264
6564       gettext faad2 faac libtheora libpng libdv perl nasm e2fsprogs
6565       pkgconfig;
6566       openexr = openexr_1_6_1;
6567     fftw = fftwSinglePrec;
6568     inherit (xorg) libXxf86vm libXv libXi libX11 xextproto;
6569     inherit (gnome) esound;
6570   };
6572   compizBase = (builderDefsPackage (import ../applications/window-managers/compiz/0.8.0.nix)) {
6573     inherit lib stringsWithDeps builderDefs;
6574     inherit fetchurl stdenv pkgconfig libpng mesa perl perlXMLParser libxslt gettext
6575       intltool binutils;
6576     inherit (xorg) libXcomposite libXfixes libXdamage libXrandr
6577       libXinerama libICE libSM libXrender xextproto compositeproto fixesproto
6578       damageproto randrproto xineramaproto renderproto kbproto xproto libX11
6579       libxcb;
6580     inherit (gnome) startupnotification libwnck GConf;
6581     inherit (gtkLibs) gtk;
6582     inherit (gnome) libgnome libgnomeui metacity
6583       glib pango libglade libgtkhtml gtkhtml
6584       libgnomecanvas libgnomeprint
6585       libgnomeprintui gnomepanel;
6586     gnomegtk = gnome.gtk;
6587     inherit librsvg fuse;
6588     inherit dbus dbus_glib;
6589   };
6591   compiz = compizBase.passthru.function (x : x // {
6592     extraConfigureFlags = getConfig ["compiz" "extraConfigureFlags"] [];
6593   });
6595   compizFusion = import ../applications/window-managers/compiz-fusion {
6596     version = getConfig ["compizFusion" "version"] "0.7.8";
6597     inherit compiz;
6598     inherit stringsWithDeps lib builderDefs;
6599     inherit fetchurl stdenv pkgconfig libpng mesa perl perlXMLParser libxslt libxml2;
6600     inherit (xorg) libXcomposite libXfixes libXdamage libXrandr
6601       libXinerama libICE libSM libXrender xextproto;
6602     inherit (gnome) startupnotification libwnck GConf;
6603     inherit (gtkLibs) gtk;
6604     inherit (gnome) libgnome libgnomeui metacity
6605       glib pango libglade libgtkhtml gtkhtml
6606       libgnomecanvas libgnomeprint
6607       libgnomeprintui gnomepanel gnomedesktop;
6608     gnomegtk = gnome.gtk;
6609     inherit librsvg fuse dbus dbus_glib git;
6610     inherit automake autoconf libtool intltool python pyrex gettext;
6611     inherit pygtk pycairo getopt libjpeg glxinfo;
6612     inherit (xorg) xvinfo xdpyinfo;
6613   };
6615   compizExtra = import ../applications/window-managers/compiz/extra.nix {
6616     inherit fetchurl stdenv pkgconfig compiz perl perlXMLParser dbus;
6617     inherit (gnome) GConf;
6618     inherit (gtkLibs) gtk;
6619   };
6621   cinepaint = import ../applications/graphics/cinepaint {
6622     inherit stdenv fetchcvs cmake pkgconfig freetype fontconfig lcms flex libtiff
6623       libjpeg libpng libexif zlib perl mesa perlXMLParser python pygtk gettext
6624       intltool babl gegl automake autoconf libtool;
6625     inherit (xlibs) makedepend libX11 xf86vidmodeproto xineramaproto libXmu
6626       libXext libXpm libXxf86vm;
6627     inherit (gtkLibs) gtk glib;
6628     openexr = openexr_1_6_1;
6629     fltk = fltk11;
6630   };
6632   codeville = builderDefsPackage (import ../applications/version-management/codeville/0.8.0.nix) {
6633     inherit makeWrapper;
6634     python = pythonFull;
6635   };
6637   comical = import ../applications/graphics/comical {
6638     inherit stdenv fetchurl utillinux zlib;
6639     wxGTK = wxGTK26;
6640   };
6642   cuneiform = builderDefsPackage (import ../tools/graphics/cuneiform) {
6643     inherit cmake patchelf;
6644     imagemagick=imagemagick;
6645   };
6647   cvs = import ../applications/version-management/cvs {
6648     inherit fetchurl stdenv nano;
6649   };
6651   cvsps = import ../applications/version-management/cvsps {
6652     inherit fetchurl stdenv cvs zlib;
6653   };
6655   cvs2svn = import ../applications/version-management/cvs2svn {
6656     inherit fetchurl stdenv python makeWrapper;
6657   };
6659   d4x = import ../applications/misc/d4x {
6660     inherit fetchurl stdenv pkgconfig openssl boost;
6661     inherit (gtkLibs) gtk glib;
6662   };
6664   darcs = haskellPackages_ghc6104.darcs;
6666   dia = import ../applications/graphics/dia {
6667     inherit stdenv fetchurl pkgconfig perl perlXMLParser
6668       libxml2 gettext python libxml2Python docbook5 docbook_xsl
6669       libxslt intltool;
6670     inherit (gtkLibs) gtk glib;
6671   };
6673   digikam = import ../applications/graphics/digikam {
6674     inherit stdenv fetchurl exiv2 zlib libjpeg perl libpng expat qt3 cmake;
6675     inherit (kde3) kdelibs;
6676     inherit (xlibs) libXt libXext;
6677   };
6679   djvulibre = import ../applications/misc/djvulibre {
6680     inherit stdenv fetchurl libjpeg libtiff libungif zlib
6681       ghostscript libpng x11 mesa;
6682     qt = if (getConfig ["djvulibre" "qt3Frontend"] true) then qt3 else null;
6683     inherit (xlibs) libX11;
6684   };
6686   djview4 = import ../applications/graphics/djview {
6687     inherit fetchurl stdenv qt4 djvulibre;
6688   };
6690   dmenu = import ../applications/misc/dmenu {
6691     inherit lib fetchurl stdenv;
6692     inherit (xlibs) libX11 libXinerama;
6693   };
6695   dmtx = builderDefsPackage (import ../tools/graphics/dmtx) {
6696     inherit libpng libtiff libjpeg imagemagick librsvg
6697       pkgconfig bzip2 zlib libtool;
6698     inherit (xlibs) libX11;
6699   };
6701   dvdauthor = import ../applications/video/dvdauthor {
6702     inherit fetchurl stdenv freetype libpng fribidi libxml2 libdvdread imagemagick;
6703   };
6705   dwm = import ../applications/window-managers/dwm {
6706     inherit fetchurl stdenv;
6707     inherit (xlibs) libX11 libXinerama;
6708   };
6710   eaglemode = import ../applications/misc/eaglemode {
6711     inherit fetchurl stdenv perl xineLib libjpeg libpng libtiff;
6712     inherit (xlibs) libX11;
6713   };
6715   eclipse = import ../applications/editors/eclipse {
6716     inherit stdenv fetchurl patchelf makeDesktopItem makeWrapper freetype fontconfig jre zlib;
6717     # GTK 2.18 gives glitches such as mouse clicks on buttons not
6718     # working correctly.
6719     inherit (gtkLibs216) glib gtk;
6720     inherit (xlibs) libX11 libXext libXrender libXtst;
6721   };
6723   ed = import ../applications/editors/ed {
6724     inherit fetchurl stdenv;
6725   };
6727   elinks = import ../applications/networking/browsers/elinks {
6728     inherit stdenv fetchurl python perl ncurses x11 zlib openssl spidermonkey
6729       guile bzip2;
6730   };
6732   elvis = import ../applications/editors/elvis {
6733     inherit fetchurl stdenv ncurses;
6734   };
6736   emacs = emacs23;
6738   emacs22 = import ../applications/editors/emacs-22 {
6739     inherit fetchurl stdenv ncurses pkgconfig x11 Xaw3d;
6740     inherit (xlibs) libXaw libXpm;
6741     inherit (gtkLibs) gtk;
6742     xaw3dSupport = getPkgConfig "emacs" "xaw3dSupport" false;
6743     gtkGUI = getPkgConfig "emacs" "gtkSupport" true;
6744   };
6746   emacs23 = import ../applications/editors/emacs-23 {
6747     inherit fetchurl stdenv ncurses pkgconfig x11 Xaw3d
6748       libpng libjpeg libungif libtiff texinfo dbus;
6749     inherit (xlibs) libXaw libXpm libXft;
6750     inherit (gtkLibs) gtk;
6751     xawSupport = stdenv.isDarwin || getPkgConfig "emacs" "xawSupport" false;
6752     xaw3dSupport = getPkgConfig "emacs" "xaw3dSupport" false;
6753     gtkGUI = getPkgConfig "emacs" "gtkSupport" true;
6754     xftSupport = getPkgConfig "emacs" "xftSupport" true;
6755     dbusSupport = getPkgConfig "emacs" "dbusSupport" true;
6756   };
6758   emacsSnapshot = lowPrio (import ../applications/editors/emacs-snapshot {
6759     inherit fetchcvs stdenv ncurses pkgconfig x11 Xaw3d
6760       libpng libjpeg libungif libtiff texinfo dbus
6761       autoconf automake;
6762     inherit (xlibs) libXaw libXpm libXft;
6763     inherit (gtkLibs) gtk;
6764     xawSupport = getPkgConfig "emacs" "xawSupport" false;
6765     xaw3dSupport = getPkgConfig "emacs" "xaw3dSupport" false;
6766     gtkGUI = getPkgConfig "emacs" "gtkSupport" true;
6767     xftSupport = getPkgConfig "emacs" "xftSupport" true;
6768     dbusSupport = getPkgConfig "emacs" "dbusSupport" true;
6769   });
6771   emacsPackages = emacs: recurseIntoAttrs (rec {
6772     bbdb = import ../applications/editors/emacs-modes/bbdb {
6773       inherit fetchurl stdenv emacs texinfo ctags;
6774     };
6776     cedet = import ../applications/editors/emacs-modes/cedet {
6777       inherit fetchurl stdenv emacs;
6778     };
6780     cua = import ../applications/editors/emacs-modes/cua {
6781       inherit fetchurl stdenv;
6782     };
6784     ecb = import ../applications/editors/emacs-modes/ecb {
6785       inherit fetchurl stdenv emacs cedet jdee texinfo;
6786     };
6788     emacsSessionManagement = import ../applications/editors/emacs-modes/session-management-for-emacs {
6789       inherit fetchurl stdenv emacs;
6790     };
6792     emacsw3m = import ../applications/editors/emacs-modes/emacs-w3m {
6793       inherit fetchcvs stdenv emacs w3m imagemagick texinfo autoconf;
6794     };
6796     emms = import ../applications/editors/emacs-modes/emms {
6797       inherit fetchurl stdenv emacs texinfo mpg321 vorbisTools taglib
6798         alsaUtils;
6799     };
6801     jdee = import ../applications/editors/emacs-modes/jdee {
6802       # Requires Emacs 23, for `avl-tree'.
6803       inherit fetchsvn stdenv cedet ant emacs;
6804     };
6806     stratego = import ../applications/editors/emacs-modes/stratego {
6807       inherit fetchsvn stdenv;
6808     };
6810     haskellMode = import ../applications/editors/emacs-modes/haskell {
6811       inherit fetchurl stdenv emacs;
6812     };
6814     magit = import ../applications/editors/emacs-modes/magit {
6815       inherit fetchurl stdenv emacs texinfo;
6816     };
6818     maudeMode = import ../applications/editors/emacs-modes/maude {
6819       inherit fetchurl stdenv emacs;
6820     };
6822     nxml = import ../applications/editors/emacs-modes/nxml {
6823       inherit fetchurl stdenv;
6824     };
6826     prologMode = import ../applications/editors/emacs-modes/prolog {
6827       inherit fetchurl stdenv;
6828     };
6830     proofgeneral = import ../applications/editors/emacs-modes/proofgeneral {
6831        inherit stdenv fetchurl emacs perl;
6832     };
6834     quack = import ../applications/editors/emacs-modes/quack {
6835       inherit fetchurl stdenv emacs;
6836     };
6838     remember = import ../applications/editors/emacs-modes/remember {
6839       inherit fetchurl stdenv texinfo emacs bbdb;
6840     };
6842     scalaMode = import ../applications/editors/emacs-modes/scala-mode {
6843       inherit fetchsvn stdenv emacs;
6844     };
6845   });
6847   emacs22Packages = emacsPackages emacs22;
6848   emacs23Packages = emacsPackages emacs23;
6850   epdfview = import ../applications/misc/epdfview {
6851     inherit stdenv fetchurl pkgconfig poppler;
6852     inherit (gtkLibs) gtk;
6853   };
6855   evince = makeOverridable (import ../applications/misc/evince) {
6856     inherit fetchurl stdenv perl perlXMLParser gettext intltool
6857       pkgconfig poppler libspectre djvulibre libxslt
6858       dbus dbus_glib shared_mime_info which makeWrapper;
6859     inherit (gnome) gnomedocutils gnomeicontheme libgnome
6860       libgnomeui libglade glib gtk scrollkeeper gnome_keyring;
6861   };
6863   exrdisplay = import ../applications/graphics/exrdisplay {
6864     inherit fetchurl stdenv pkgconfig mesa which openexr_ctl;
6865     fltk = fltk20;
6866     openexr = openexr_1_6_1;
6867   };
6869   fbpanel = composedArgsAndFun (import ../applications/window-managers/fbpanel/4.12.nix) {
6870     inherit fetchurl stdenv builderDefs pkgconfig libpng libjpeg libtiff librsvg;
6871     inherit (gtkLibs) gtk;
6872     inherit (xlibs) libX11 libXmu libXpm;
6873   };
6875   fetchmail = import ../applications/misc/fetchmail {
6876     inherit stdenv fetchurl openssl;
6877   };
6879   grip = import ../applications/misc/grip {
6880     inherit fetchurl stdenv lib grip pkgconfig curl cdparanoia libid3tag;
6881     inherit (gtkLibs) gtk glib;
6882     inherit (gnome) libgnome libgnomeui vte;
6883   };
6885   gwenview = import ../applications/graphics/gwenview {
6886     inherit stdenv fetchurl exiv2 zlib libjpeg perl libpng expat qt3;
6887     inherit (kde3) kdelibs;
6888     inherit (xlibs) libXt libXext;
6889   };
6891   wavesurfer = import ../applications/misc/audio/wavesurfer {
6892     inherit fetchurl stdenv tcl tk snack makeWrapper;
6893   };
6895   wireshark = import ../applications/networking/sniffers/wireshark {
6896     inherit fetchurl stdenv perl pkgconfig libpcap flex bison;
6897     inherit (gtkLibs) gtk;
6898   };
6900   fbida = builderDefsPackage ../applications/graphics/fbida {
6901     inherit libjpeg libexif giflib libtiff libpng
6902       imagemagick ghostscript which curl pkgconfig
6903       freetype fontconfig;
6904   };
6906   fdupes = import ../tools/misc/fdupes {
6907     inherit fetchurl stdenv;
6908   };
6910   feh = import ../applications/graphics/feh {
6911     inherit fetchurl stdenv x11 imlib2 libjpeg libpng giblib;
6912   };
6914   firefox = firefox35;
6916   firefoxWrapper = firefox35Wrapper;
6918   firefox35Pkgs = import ../applications/networking/browsers/firefox/3.5.nix {
6919     inherit fetchurl stdenv pkgconfig perl zip libjpeg libpng zlib cairo
6920       python dbus dbus_glib freetype fontconfig bzip2 xlibs file alsaLib
6921       nspr nss;
6922     inherit (gtkLibs) gtk pango;
6923     inherit (gnome) libIDL;
6924   };
6926   firefox35 = firefox35Pkgs.firefox;
6927   xulrunner35 = firefox35Pkgs.xulrunner;
6928   firefox35Wrapper = wrapFirefox firefox35 "firefox" "";
6930   firefox36Pkgs = import ../applications/networking/browsers/firefox/3.6.nix {
6931     inherit fetchurl stdenv pkgconfig perl zip libjpeg libpng zlib cairo
6932       python dbus dbus_glib freetype fontconfig bzip2 xlibs file alsaLib
6933       nspr nss libnotify;
6934     inherit (gtkLibs) gtk pango;
6935     inherit (gnome) libIDL;
6936   };
6938   firefox36Wrapper = lowPrio (wrapFirefox firefox36Pkgs.firefox "firefox" "");
6940   flac = import ../applications/audio/flac {
6941     inherit fetchurl stdenv libogg;
6942   };
6944   flashplayer = flashplayer10;
6946   flashplayer9 = (
6947     import ../applications/networking/browsers/mozilla-plugins/flashplayer-9 {
6948       inherit fetchurl stdenv zlib alsaLib nss nspr fontconfig freetype expat;
6949       inherit (xlibs) libX11 libXext libXrender libXt;
6950       inherit (gtkLibs) gtk glib pango atk;
6951     });
6953   flashplayer10 = (
6954     import ../applications/networking/browsers/mozilla-plugins/flashplayer-10 {
6955       inherit fetchurl stdenv zlib alsaLib curl nss nspr fontconfig freetype expat;
6956       inherit (xlibs) libX11 libXext libXrender libXt ;
6957       inherit (gtkLibs) gtk glib pango atk;
6958       debug = getConfig ["flashplayer" "debug"] false;
6959     });
6961   flite = import ../applications/misc/flite {
6962     inherit fetchurl stdenv;
6963   };
6965   freemind = import ../applications/misc/freemind {
6966     inherit fetchurl stdenv ant coreutils gnugrep;
6967     jdk = jdk;
6968     jre = jdk;
6969   };
6971   freepv = import ../applications/graphics/freepv {
6972     inherit fetchurl mesa freeglut libjpeg zlib cmake libxml2 libpng;
6973     stdenv = overrideGCC stdenv gcc43_wrapper2;
6974     inherit (xlibs) libX11 libXxf86vm;
6975   };
6977   xfontsel = import ../applications/misc/xfontsel {
6978     inherit fetchurl stdenv pkgconfig;
6979     inherit (xlibs) libX11 libXaw;
6980   };
6981   xlsfonts = import ../applications/misc/xlsfonts {
6982     inherit fetchurl stdenv pkgconfig;
6983     inherit (xlibs) libX11;
6984   };
6986   fspot = import ../applications/graphics/f-spot {
6987     inherit fetchurl stdenv perl perlXMLParser pkgconfig mono
6988             libexif libjpeg sqlite lcms libgphoto2 monoDLLFixer;
6989     inherit (gnome) libgnome libgnomeui;
6990     gtksharp = gtksharp1;
6991   };
6993   gimp = import ../applications/graphics/gimp {
6994     inherit fetchurl stdenv pkgconfig freetype fontconfig
6995       libtiff libjpeg libpng libexif zlib perl perlXMLParser
6996       python pygtk gettext xlibs intltool babl gegl;
6997     inherit (gnome) gtk libart_lgpl;
6998   };
7000   gimpPlugins = import ../applications/graphics/gimp/plugins { inherit pkgs gimp; };
7002   gitAndTools = recurseIntoAttrs (import ../applications/version-management/git-and-tools {
7003     inherit pkgs;
7004   });
7005   git = gitAndTools.git;
7006   gitFull = gitAndTools.gitFull;
7008   gnucash = import ../applications/office/gnucash {
7009     inherit fetchurl stdenv pkgconfig libxml2 goffice enchant
7010       gettext intltool perl guile slibGuile swig isocodes bzip2 makeWrapper;
7011     inherit (gnome) gtk glib libglade libgnomeui libgtkhtml gtkhtml
7012       libgnomeprint;
7013     gconf = gnome.GConf;
7014   };
7016   qcad = import ../applications/misc/qcad {
7017     inherit fetchurl stdenv qt3 libpng;
7018     inherit (xlibs) libXext libX11;
7019   };
7021   qjackctl = import ../applications/audio/qjackctl {
7022     inherit fetchurl stdenv alsaLib jackaudio;
7023     qt4 = qt4;
7024   };
7026   gkrellm = import ../applications/misc/gkrellm {
7027     inherit fetchurl stdenv gettext pkgconfig;
7028     inherit (gtkLibs) glib gtk;
7029     inherit (xlibs) libX11 libICE libSM;
7030   };
7032   gnash = import ../applications/video/gnash {
7033     inherit fetchurl stdenv SDL SDL_mixer libogg libxml2 libjpeg mesa libpng
7034             boost freetype agg dbus curl pkgconfig x11 libtool lib libungif
7035             gettext makeWrapper ming dejagnu python;
7036     inherit (gtkLibs) glib gtk;
7037     inherit (gst_all) gstreamer gstPluginsBase gstFfmpeg;
7038   };
7040   gnome_mplayer = import ../applications/video/gnome-mplayer {
7041     inherit fetchurl stdenv pkgconfig dbus dbus_glib;
7042     inherit (gtkLibs) glib gtk;
7043     inherit (gnome) GConf;
7044   };
7046   gnunet = import ../applications/networking/p2p/gnunet {
7047     inherit fetchurl stdenv libextractor libmicrohttpd libgcrypt
7048       gmp curl libtool guile adns sqlite gettext zlib pkgconfig
7049       libxml2 ncurses findutils makeWrapper;
7050     inherit (gnome) gtk libglade;
7051     gtkSupport = getConfig [ "gnunet" "gtkSupport" ] true;
7052   };
7054   gocr = composedArgsAndFun (import ../applications/graphics/gocr/0.44.nix) {
7055     inherit builderDefs fetchurl stdenv;
7056   };
7058   gphoto2 = import ../applications/misc/gphoto2 {
7059     inherit fetchurl stdenv pkgconfig libgphoto2 libexif popt gettext
7060       libjpeg readline libtool;
7061   };
7063   gphoto2fs = builderDefsPackage ../applications/misc/gphoto2/gphotofs.nix {
7064     inherit libgphoto2 fuse pkgconfig glib;
7065   };
7067   gtkpod = import ../applications/audio/gtkpod {
7068     inherit stdenv fetchurl pkgconfig libgpod gettext perl perlXMLParser flex libid3tag libvorbis;
7069     inherit (gtkLibs) gtk glib;
7070     inherit (gnome) libglade;
7071   };
7073   qrdecode = builderDefsPackage (import ../tools/graphics/qrdecode) {
7074     inherit libpng libcv;
7075   };
7077   qrencode = builderDefsPackage (import ../tools/graphics/qrencode) {
7078     inherit libpng pkgconfig;
7079   };
7081   gecko_mediaplayer = import ../applications/networking/browsers/mozilla-plugins/gecko-mediaplayer {
7082     inherit fetchurl stdenv pkgconfig dbus dbus_glib x11 gnome_mplayer MPlayer glib;
7083     inherit (gnome) GConf;
7084     browser = firefox35;
7085   };
7087   geeqie = import ../applications/graphics/geeqie {
7088     inherit fetchurl stdenv pkgconfig libpng lcms exiv2
7089       intltool gettext;
7090     inherit (gtkLibs) gtk;
7091   };
7093   gqview = import ../applications/graphics/gqview {
7094     inherit fetchurl stdenv pkgconfig libpng;
7095     inherit (gtkLibs) gtk;
7096   };
7098   googleearth = import ../applications/misc/googleearth {
7099       inherit stdenv fetchurl glibc mesa freetype zlib glib;
7100       inherit (xlibs) libSM libICE libXi libXv libXrender libXrandr libXfixes
7101         libXcursor libXinerama libXext libX11;
7102       inherit patchelf05;
7103     };
7105   gpsbabel = import ../applications/misc/gpsbabel {
7106     inherit fetchurl stdenv zlib expat;
7107   };
7109   gpscorrelate = import ../applications/misc/gpscorrelate {
7110     inherit fetchurl stdenv pkgconfig exiv2 libxml2
7111       libxslt docbook_xsl docbook_xml_dtd_42;
7112     inherit (gtkLibs) gtk;
7113   };
7115   gpsd = import ../servers/gpsd {
7116     inherit fetchurl stdenv pkgconfig dbus dbus_glib
7117       ncurses makeWrapper libxslt xmlto;
7118     inherit (xlibs) libX11 libXt libXpm libXaw libXext;
7120     # We need a Python with NCurses bindings.
7121     python = pythonFull;
7122   };
7124   gv = import ../applications/misc/gv {
7125     inherit fetchurl stdenv Xaw3d ghostscriptX;
7126   };
7128   hello = makeOverridable (import ../applications/misc/hello/ex-2) {
7129     inherit fetchurl stdenv;
7130   };
7132   homebank = import ../applications/office/homebank {
7133     inherit fetchurl stdenv pkgconfig libofx intltool;
7134     inherit (gtkLibs) gtk;
7135   };
7137   hugin = import ../applications/graphics/hugin {
7138     inherit fetchurl cmake panotools libtiff libpng boost pkgconfig
7139       exiv2 gettext ilmbase enblendenfuse autopanosiftc mesa freeglut
7140       glew;
7141     inherit wxGTK;
7142     inherit (xlibs) libXi libXmu;
7143     openexr = openexr_1_6_1;
7144     stdenv = overrideGCC stdenv gcc43_wrapper2;
7145   };
7147   i810switch = import ../applications/misc/i810 {
7148     inherit fetchurl stdenv pciutils;
7149   };
7151   icecat3 = lowPrio (import ../applications/networking/browsers/icecat-3 {
7152     inherit fetchurl stdenv pkgconfig perl zip libjpeg libpng zlib cairo
7153       python dbus dbus_glib freetype fontconfig bzip2 xlibs alsaLib libnotify
7154       wirelesstools;
7155     inherit (gnome) libIDL libgnomeui gnomevfs gtk pango;
7156     inherit (pythonPackages) ply;
7157   });
7159   icecatXulrunner3 = lowPrio (import ../applications/networking/browsers/icecat-3 {
7160     application = "xulrunner";
7161     inherit fetchurl stdenv pkgconfig perl zip libjpeg libpng zlib cairo
7162       python dbus dbus_glib freetype fontconfig bzip2 xlibs alsaLib libnotify
7163       wirelesstools;
7164     inherit (gnome) libIDL libgnomeui gnomevfs gtk pango;
7165     inherit (pythonPackages) ply;
7166   });
7168   icecat3Xul =
7169     (symlinkJoin "icecat-with-xulrunner-${icecat3.version}"
7170        [ icecat3 icecatXulrunner3 ])
7171     // { inherit (icecat3) gtk isFirefox3Like meta; };
7173   icecatWrapper = wrapFirefox icecat3Xul "icecat" "";
7175   icewm = import ../applications/window-managers/icewm {
7176     inherit fetchurl stdenv gettext libjpeg libtiff libungif libpng imlib xlibs;
7177   };
7179   ikiwiki = makeOverridable (import ../applications/misc/ikiwiki) {
7180     inherit fetchurl stdenv perl gettext makeWrapper lib;
7181     inherit (perlPackages) TextMarkdown URI HTMLParser HTMLScrubber
7182       HTMLTemplate TimeDate CGISession DBFile CGIFormBuilder;
7183     inherit git; # The RCS should be optional
7184     monotone = null;
7185     extraUtils = [];
7186   };
7188   imagemagick = import ../applications/graphics/ImageMagick {
7189     inherit stdenv fetchurl bzip2 freetype graphviz ghostscript
7190       libjpeg libpng libtiff libxml2 zlib libtool;
7191     inherit (xlibs) libX11;
7192   };
7194   imagemagickBig = import ../applications/graphics/ImageMagick {
7195     inherit stdenv fetchurl bzip2 freetype graphviz ghostscript
7196       libjpeg libpng libtiff libxml2 zlib tetex librsvg libtool;
7197     inherit (xlibs) libX11;
7198   };
7200   # Impressive, formerly known as "KeyJNote".
7201   impressive = import ../applications/office/impressive {
7202     inherit fetchurl stdenv xpdf pil pyopengl pygame makeWrapper lib python;
7204     # XXX These are the PyOpenGL dependencies, which we need here.
7205     inherit setuptools mesa freeglut;
7206   };
7208   inkscape = import ../applications/graphics/inkscape {
7209     inherit fetchurl stdenv perl perlXMLParser pkgconfig zlib popt
7210       libxml2 libxslt libpng boehmgc libsigcxx lcms boost gettext
7211       cairomm python pyxml makeWrapper intltool gsl;
7212     inherit (pythonPackages) lxml;
7213     inherit (gtkLibs) gtk glib glibmm gtkmm;
7214     inherit (xlibs) libXft;
7215   };
7217   ion3 = import ../applications/window-managers/ion-3 {
7218     inherit fetchurl stdenv x11 gettext groff;
7219     lua = lua5;
7220   };
7222   iptraf = import ../applications/networking/iptraf {
7223     inherit fetchurl stdenv ncurses;
7224   };
7226   irssi = import ../applications/networking/irc/irssi {
7227     inherit stdenv fetchurl pkgconfig ncurses openssl glib;
7228   };
7230   jackmeter = import ../applications/audio/jackmeter {
7231     inherit fetchurl stdenv lib jackaudio pkgconfig;
7232   };
7234   jedit = import ../applications/editors/jedit {
7235     inherit fetchurl stdenv ant;
7236   };
7238   jigdo = import ../applications/misc/jigdo {
7239     inherit fetchurl stdenv db45 libwpd bzip2;
7240     inherit (gtkLibs) gtk;
7241   };
7243   joe = import ../applications/editors/joe {
7244     inherit stdenv fetchurl;
7245   };
7247   jwm = import ../applications/window-managers/jwm {
7248     inherit fetchurl stdenv;
7249     inherit (xlibs) libX11 libXext libXinerama libXpm libXft;
7250   };
7252   k3b = import ../applications/misc/k3b {
7253     inherit stdenv fetchurl kdelibs x11 zlib libpng libjpeg perl qt3;
7254   };
7256   kbasket = import ../applications/misc/kbasket {
7257     inherit stdenv fetchurl kdelibs x11 zlib libpng libjpeg
7258       perl qt3 gpgme libgpgerror;
7259   };
7261   kermit = import ../tools/misc/kermit {
7262     inherit fetchurl stdenv ncurses;
7263   };
7265   kino = import ../applications/video/kino {
7266     inherit fetchurl stdenv pkgconfig libxml2 perl perlXMLParser
7267       libdv libraw1394 libavc1394 libiec61883 x11 gettext cairo; /* libavformat */
7268     inherit libsamplerate ffmpeg;
7269     inherit (gnome) libglade gtk glib;
7270     inherit (xlibs) libXv libX11;
7271     inherit (gtkLibs) pango;
7272     # #  optional
7273     #  inherit ffmpeg2theora sox, vorbis-tools lame mjpegtools dvdauthor 'Q'dvdauthor growisofs mencoder;
7274   };
7276   kile = import ../applications/editors/kile {
7277     inherit stdenv fetchurl perl arts kdelibs zlib libpng libjpeg freetype expat;
7278     inherit (xlibs) libX11 libXt libXext libXrender libXft;
7279     qt = qt3;
7280   };
7282   konversation = import ../applications/networking/irc/konversation {
7283     inherit fetchurl stdenv perl arts kdelibs zlib libpng libjpeg expat;
7284     inherit (xlibs) libX11 libXt libXext libXrender libXft;
7285     qt = qt3;
7286   };
7288   kphone = import ../applications/networking/kphone {
7289     inherit fetchurl lib autoconf automake libtool pkgconfig openssl libpng alsaLib;
7290     qt = qt3;
7291     inherit (xlibs) libX11 libXext libXt libICE libSM;
7292     stdenv = overrideGCC stdenv gcc42; # I'm to lazy to clean up header files
7293   };
7295   kuickshow = import ../applications/graphics/kuickshow {
7296     inherit fetchurl stdenv kdelibs arts libpng libjpeg libtiff libungif imlib expat perl;
7297     inherit (xlibs) libX11 libXext libSM;
7298     qt = qt3;
7299   };
7301   lame = import ../applications/audio/lame {
7302     inherit fetchurl stdenv;
7303   };
7305   ladspaH = import ../applications/audio/ladspa-plugins/ladspah.nix {
7306     inherit fetchurl stdenv builderDefs stringsWithDeps;
7307   };
7309   ladspaPlugins = import ../applications/audio/ladspa-plugins {
7310     inherit fetchurl stdenv builderDefs stringsWithDeps fftw ladspaH pkgconfig;
7311   };
7313   ldcpp = composedArgsAndFun (import ../applications/networking/p2p/ldcpp/1.0.3.nix) {
7314     inherit builderDefs scons pkgconfig bzip2 openssl;
7315     inherit (gtkLibs) gtk;
7316     inherit (gnome) libglade;
7317     inherit (xlibs) libX11;
7318   };
7320   links = import ../applications/networking/browsers/links {
7321     inherit fetchurl stdenv;
7322   };
7324   ledger = import ../applications/office/ledger {
7325     inherit stdenv fetchurl emacs gmp pcre;
7326   };
7328   links2 = (builderDefsPackage ../applications/networking/browsers/links2) {
7329     inherit fetchurl stdenv bzip2 zlib libjpeg libpng libtiff
7330       gpm openssl SDL SDL_image SDL_net pkgconfig;
7331     inherit (xlibs) libX11 libXau xproto libXt;
7332   };
7334   lynx = import ../applications/networking/browsers/lynx {
7335     inherit fetchurl stdenv ncurses openssl;
7336   };
7338   lyx = import ../applications/misc/lyx {
7339    inherit fetchurl stdenv texLive python;
7340    qt = qt4;
7341   };
7343   mercurial = import ../applications/version-management/mercurial {
7344     inherit fetchurl stdenv makeWrapper getConfig tk;
7345     guiSupport = getConfig ["mercurial" "guiSupport"] false; # for hgk (gitk gui for hg)
7346     python = # allow cloning sources from https servers.
7347       if getConfig ["mercurial" "httpsSupport"] true
7348       then pythonFull
7349       else pythonBase;
7350   };
7352   meshlab = import ../applications/graphics/meshlab {
7353     inherit fetchurl stdenv bzip2 lib3ds levmar muparser unzip;
7354     qt = qt4;
7355   };
7357   midori = builderDefsPackage (import ../applications/networking/browsers/midori) {
7358     inherit imagemagick intltool python pkgconfig webkit libxml2
7359       which gettext makeWrapper file libidn sqlite docutils libnotify;
7360     inherit (gtkLibs) gtk glib;
7361     inherit (gnome28) gtksourceview libsoup;
7362   };
7364   minicom = import ../tools/misc/minicom {
7365     inherit fetchurl stdenv ncurses;
7366   };
7368   mmex = import ../applications/office/mmex {
7369     inherit fetchsvn stdenv wxGTK;
7370   };
7372   monodevelop = import ../applications/editors/monodevelop {
7373     inherit fetchurl stdenv file mono gtksourceviewsharp
7374             gtkmozembedsharp monodoc perl perlXMLParser pkgconfig;
7375     inherit (gnome) gnomevfs libbonobo libglade libgnome GConf glib gtk;
7376     mozilla = firefox;
7377     gtksharp = gtksharp2;
7378   };
7380   monodoc = import ../applications/editors/monodoc {
7381     inherit fetchurl stdenv mono pkgconfig;
7382     gtksharp = gtksharp1;
7383   };
7385   monotone = import ../applications/version-management/monotone {
7386     inherit stdenv fetchurl boost zlib botan libidn pcre
7387       sqlite lib perl;
7388     lua = lua5;
7389   };
7391   monotoneViz = builderDefsPackage (import ../applications/version-management/monotone-viz/mtn-head.nix) {
7392     inherit ocaml lablgtk graphviz pkgconfig autoconf automake libtool;
7393     inherit (gnome) gtk libgnomecanvas glib;
7394   };
7396   mozilla = import ../applications/networking/browsers/mozilla {
7397     inherit fetchurl pkgconfig stdenv perl zip;
7398     inherit (gtkLibs) gtk;
7399     inherit (gnome) libIDL;
7400     inherit (xlibs) libXi;
7401   };
7403   mozplugger = builderDefsPackage (import ../applications/networking/browsers/mozilla-plugins/mozplugger) {
7404     inherit firefox;
7405     inherit (xlibs) libX11 xproto;
7406   };
7408   mpc123 = import ../applications/audio/mpc123 {
7409     inherit stdenv fetchurl gettext libao libmpcdec;
7410   };
7412   mpg321 = import ../applications/audio/mpg321 {
7413     inherit stdenv fetchurl libao libmad libid3tag zlib;
7414   };
7416   MPlayer = import ../applications/video/MPlayer {
7417     inherit fetchurl stdenv freetype x11 zlib libtheora libcaca freefont_ttf libdvdnav
7418       cdparanoia mesa pkgconfig unzip amrnb amrwb;
7419     inherit (xlibs) libX11 libXv libXinerama libXrandr;
7420     alsaSupport = true;
7421     alsa = alsaLib;
7422     theoraSupport = true;
7423     cacaSupport = true;
7424     xineramaSupport = true;
7425     randrSupport = true;
7426     cddaSupport = true;
7427     amrSupport = getConfig [ "MPlayer" "amr" ] false;
7428   };
7430   MPlayerPlugin = browser:
7431     import ../applications/networking/browsers/mozilla-plugins/mplayerplug-in {
7432       inherit browser;
7433       inherit fetchurl stdenv pkgconfig gettext;
7434       inherit (xlibs) libXpm;
7435       # !!! should depend on MPlayer
7436     };
7438   MPlayerTrunk = import ../applications/video/MPlayer/trunk.nix {
7439     inherit fetchurl sourceFromHead stdenv freetype x11 zlib libtheora libcaca
7440       freefont_ttf libdvdnav cdparanoia mesa pkgconfig jackaudio;
7441     inherit (xlibs) libX11 libXv libXinerama libXrandr;
7442     alsaSupport = true;
7443     alsa = alsaLib;
7444     theoraSupport = true;
7445     cacaSupport = true;
7446     xineramaSupport = true;
7447     randrSupport = true;
7448     cddaSupport = true;
7449   };
7451   mrxvt = import ../applications/misc/mrxvt {
7452     inherit lib fetchurl stdenv freetype pkgconfig which;
7453     inherit (xlibs) libXaw xproto libXt libX11 libSM libICE libXft
7454       libXi inputproto;
7455   };
7457   multisync = import ../applications/misc/multisync {
7458     inherit fetchurl stdenv autoconf automake libtool pkgconfig;
7459     inherit (gnome) gtk glib ORBit2 libbonobo libgnomeui GConf;
7460   };
7462   mutt = import ../applications/networking/mailreaders/mutt {
7463     inherit fetchurl stdenv ncurses which openssl gdbm perl;
7464   };
7466   msmtp = import ../applications/networking/msmtp {
7467     inherit fetchurl stdenv;
7468   };
7470   mythtv = import ../applications/video/mythtv {
7471     inherit fetchurl stdenv which x11 xlibs lame zlib mesa freetype perl alsaLib;
7472     qt3 = qt3mysql;
7473   };
7475   nano = import ../applications/editors/nano {
7476     inherit fetchurl stdenv ncurses gettext;
7477   };
7479   nedit = import ../applications/editors/nedit {
7480       inherit fetchurl stdenv x11;
7481       inherit (xlibs) libXpm;
7482       motif = lesstif;
7483     };
7485   netsurfBrowser = netsurf.browser;
7486   netsurf = recurseIntoAttrs (import ../applications/networking/browsers/netsurf { inherit pkgs; });
7488   nvi = import ../applications/editors/nvi {
7489     inherit fetchurl stdenv ncurses;
7490   };
7492   openoffice = import ../applications/office/openoffice {
7493     inherit fetchurl stdenv pam python tcsh libxslt perl zlib libjpeg
7494       expat pkgconfig freetype fontconfig libwpd libxml2 db4 sablotron
7495       curl libsndfile flex zip unzip libmspack getopt file neon cairo
7496       which icu jdk ant cups openssl bison boost gperf cppunit;
7497     inherit (xlibs) libXaw libXext libX11 libXtst libXi libXinerama;
7498     inherit (gtkLibs) gtk;
7499     inherit (perlPackages) ArchiveZip CompressZlib;
7500     inherit (gnome) GConf ORBit2;
7501   };
7503   opera = import ../applications/networking/browsers/opera {
7504     inherit fetchurl zlib glibc stdenv makeDesktopItem;
7505     inherit (xlibs) libX11 libSM libICE libXt libXext;
7506     qt = qt3;
7507   };
7509   pan = import ../applications/networking/newsreaders/pan {
7510     inherit fetchurl stdenv pkgconfig perl pcre gmime gettext;
7511     inherit (gtkLibs) gtk;
7512     spellChecking = false;
7513   };
7515   panotools = import ../applications/graphics/panotools {
7516     inherit stdenv fetchsvn libpng libjpeg libtiff automake libtool autoconf;
7517   };
7519   pavucontrol = import ../applications/audio/pavucontrol {
7520     inherit fetchurl stdenv pkgconfig pulseaudio libsigcxx
7521       libcanberra intltool gettext;
7522     inherit (gtkLibs) gtkmm;
7523     inherit (gnome) libglademm;
7524   };
7526   paraview = import ../applications/graphics/paraview {
7527     inherit fetchurl cmake qt4;
7528     stdenv = overrideGCC stdenv gcc43_wrapper2;
7529   };
7531   partitionManager = import ../tools/misc/partition-manager {
7532     inherit fetchurl stdenv lib cmake pkgconfig gettext parted libuuid perl;
7533     kde = kde43;
7534     qt = qt4;
7535   };
7537   pidgin = import ../applications/networking/instant-messengers/pidgin {
7538     inherit fetchurl stdenv pkgconfig perl perlXMLParser libxml2 nss nspr farsight2 python
7539       gtkspell aspell gettext ncurses avahi dbus dbus_glib lib intltool libidn;
7540     openssl = if (getConfig ["pidgin" "openssl"] true) then openssl else null;
7541     gnutls = if (getConfig ["pidgin" "gnutls"] false) then gnutls else null;
7542     GStreamer = gst_all.gstreamer;
7543     inherit (gtkLibs) gtk;
7544     inherit (gnome) startupnotification;
7545     inherit (xlibs) libXScrnSaver;
7546     inherit (gst_all) gstPluginsBase;
7547   };
7549   pidginlatex = composedArgsAndFun (import ../applications/networking/instant-messengers/pidgin-plugins/pidgin-latex) {
7550     inherit fetchurl stdenv pkgconfig ghostscript pidgin texLive;
7551     imagemagick = imagemagickBig;
7552     inherit (gtkLibs) glib gtk;
7553   };
7555   pidginlatexSF = builderDefsPackage
7556     (import ../applications/networking/instant-messengers/pidgin-plugins/pidgin-latex/pidgin-latex-sf.nix)
7557     {
7558       inherit pkgconfig pidgin texLive imagemagick which;
7559       inherit (gtkLibs) glib gtk;
7560     };
7562   pidginotr = import ../applications/networking/instant-messengers/pidgin-plugins/otr {
7563     inherit fetchurl stdenv libotr pidgin;
7564   };
7566   pinfo = import ../applications/misc/pinfo {
7567     inherit fetchurl stdenv ncurses readline;
7568   };
7570   pqiv = import ../applications/graphics/pqiv {
7571     inherit fetchurl stdenv getopt which pkgconfig;
7572     inherit (gtkLibs) gtk;
7573   };
7575   # perhaps there are better apps for this task? It's how I had configured my preivous system.
7576   # And I don't want to rewrite all rules
7577   procmail = import ../applications/misc/procmail {
7578     inherit fetchurl stdenv autoconf;
7579   };
7581   pstree = import ../applications/misc/pstree {
7582     inherit stdenv fetchurl;
7583   };
7585   pythonmagick = import ../applications/graphics/PythonMagick {
7586     inherit fetchurl stdenv pkgconfig imagemagick boost python;
7587   };
7589   qemu = import ../applications/virtualization/qemu/0.12.1.nix {
7590     inherit stdenv fetchurl SDL zlib which;
7591   };
7593   qemuSVN = import ../applications/virtualization/qemu/svn-6642.nix {
7594     inherit fetchsvn SDL zlib which stdenv;
7595   };
7597   qemuImage = composedArgsAndFun (import ../applications/virtualization/qemu/linux-img/0.2.nix) {
7598     inherit builderDefs fetchurl stdenv;
7599   };
7601   qtpfsgui = import ../applications/graphics/qtpfsgui {
7602     inherit fetchurl stdenv exiv2 libtiff fftw qt4 ilmbase;
7603     openexr = openexr_1_6_1;
7604   };
7606   ratpoison = import ../applications/window-managers/ratpoison {
7607     inherit fetchurl stdenv fontconfig readline;
7608     inherit (xlibs) libX11 inputproto libXt libXpm libXft
7609       libXtst xextproto libXi;
7610   };
7612   rawtherapee = import ../applications/graphics/rawtherapee {
7613     inherit fetchsvn pkgconfig cmake lcms libiptcdata;
7614     inherit (gtkLibs) gtk gtkmm;
7615     inherit (xlibs) libXau libXdmcp pixman libpthreadstubs;
7616     stdenv = overrideGCC stdenv gcc43_wrapper2;
7617   };
7619   rcs = import ../applications/version-management/rcs {
7620     inherit fetchurl stdenv;
7621   };
7623   rdesktop = import ../applications/networking/remote/rdesktop {
7624     inherit fetchurl stdenv openssl;
7625     inherit (xlibs) libX11;
7626   };
7628   RealPlayer =
7629     (import ../applications/video/RealPlayer {
7630       inherit fetchurl stdenv;
7631       inherit (gtkLibs) glib pango atk gtk;
7632       inherit (xlibs) libX11;
7633       libstdcpp5 = gcc33.gcc;
7634     });
7636   rsync = import ../applications/networking/sync/rsync {
7637     inherit fetchurl stdenv acl perl;
7638     enableACLs = !stdenv.isDarwin;
7639   };
7641   rxvt = import ../applications/misc/rxvt {
7642     inherit lib fetchurl stdenv;
7643     inherit (xlibs) libXt libX11;
7644   };
7646   # = urxvt
7647   rxvt_unicode = makeOverridable (import ../applications/misc/rxvt_unicode) {
7648     inherit lib fetchurl stdenv perl ncurses;
7649     inherit (xlibs) libXt libX11 libXft;
7650     perlSupport = false;
7651   };
7653   sbagen = import ../applications/misc/sbagen {
7654     inherit fetchurl stdenv;
7655   };
7657   scribus = import ../applications/office/scribus {
7658     inherit fetchurl stdenv lib cmake pkgconfig freetype lcms libtiff libxml2
7659       cairo python cups fontconfig zlib libjpeg libpng;
7660     inherit (gnome) libart_lgpl;
7661     inherit (xlibs) libXaw libXext libX11 libXtst libXi libXinerama;
7662     qt = qt3;
7663   };
7665   skype_linux = import ../applications/networking/skype {
7666     inherit fetchurl stdenv;
7667     inherit glibc alsaLib freetype fontconfig libsigcxx gcc;
7668     inherit (xlibs) libSM libICE libXi libXrender libXrandr libXfixes libXcursor
7669                     libXinerama libXext libX11 libXv libXScrnSaver;
7670   };
7672   slim = import ../applications/display-managers/slim {
7673     inherit fetchurl stdenv x11 libjpeg libpng freetype pam;
7674     inherit (xlibs) libXmu;
7675   };
7677   sndBase = builderDefsPackage (import ../applications/audio/snd) {
7678     inherit fetchurl stdenv stringsWithDeps lib fftw;
7679     inherit pkgconfig gmp gettext;
7680     inherit (xlibs) libXpm libX11;
7681     inherit (gtkLibs) gtk glib;
7682   };
7684   snd = sndBase.passthru.function {
7685     inherit guile mesa libtool jackaudio alsaLib;
7686   };
7688   sonicVisualizer = import ../applications/audio/sonic-visualizer {
7689     inherit fetchurl stdenv lib libsndfile libsamplerate bzip2 librdf
7690       rubberband jackaudio pulseaudio libmad
7691       libogg liblo alsaLib librdf_raptor librdf_rasqal redland fftw;
7692     inherit (vamp) vampSDK;
7693     qt = qt4;
7694   };
7696   sox = import ../applications/misc/audio/sox {
7697     inherit fetchurl stdenv lib composableDerivation;
7698     # optional features
7699     inherit alsaLib libao ffmpeg;
7700     inherit libsndfile libogg flac libmad lame libsamplerate;
7701     # Using the default nix ffmpeg I get this error when linking
7702     # .libs/libsox_la-ffmpeg.o: In function `audio_decode_frame':
7703     # /tmp/nix-7957-1/sox-14.0.0/src/ffmpeg.c:130: undefined reference to `avcodec_decode_audio2
7704     # That's why I'v added ffmpeg_svn
7705   };
7707   stumpwm = builderDefsPackage (import ../applications/window-managers/stumpwm) {
7708     inherit texinfo;
7709     clisp = clisp_2_44_1;
7710   };
7712   subversion = makeOverridable (import ../applications/version-management/subversion/default.nix) {
7713     inherit (pkgsOverriden) fetchurl stdenv apr aprutil expat swig zlib jdk python perl sqlite;
7714     neon = neon028;
7715     bdbSupport = getConfig ["subversion" "bdbSupport"] true;
7716     httpServer = getConfig ["subversion" "httpServer"] false;
7717     httpSupport = getConfig ["subversion" "httpSupport"] true;
7718     sslSupport = getConfig ["subversion" "sslSupport"] true;
7719     pythonBindings = getConfig ["subversion" "pythonBindings"] false;
7720     perlBindings = getConfig ["subversion" "perlBindings"] false;
7721     javahlBindings = supportsJDK && getConfig ["subversion" "javahlBindings"] false;
7722     compressionSupport = getConfig ["subversion" "compressionSupport"] true;
7723     httpd = pkgsOverriden.apacheHttpd;
7724   };
7726   svk = perlPackages.SVK;
7728   sylpheed = import ../applications/networking/mailreaders/sylpheed {
7729     inherit fetchurl stdenv pkgconfig openssl gpgme;
7730     inherit (gtkLibs) gtk;
7731     sslSupport = true;
7732     gpgSupport = true;
7733   };
7735   # linux only by now
7736   synergy = import ../applications/misc/synergy {
7737     inherit fetchurl sourceFromHead stdenv x11 automake autoconf;
7738     inherit (xlibs) xextproto libXtst inputproto libXi;
7739   };
7741   tahoelafs = import ../tools/networking/p2p/tahoe-lafs {
7742     inherit fetchurl lib unzip nettools buildPythonPackage;
7743     inherit (pythonPackages) twisted foolscap simplejson nevow zfec
7744       pycryptopp pysqlite;
7745   };
7747   tailor = builderDefsPackage (import ../applications/version-management/tailor) {
7748     inherit makeWrapper python;
7749   };
7751   tangogps = import ../applications/misc/tangogps {
7752     inherit fetchurl stdenv pkgconfig gettext curl libexif sqlite libxml2;
7753     inherit (gtkLibs) gtk;
7754     gconf = gnome.GConf;
7755   };
7757   /* does'nt work yet i686-linux only (32bit version)
7758   teamspeak_client = import ../applications/networking/instant-messengers/teamspeak/client.nix {
7759     inherit fetchurl stdenv;
7760     inherit glibc x11;
7761   };
7762   */
7764   taskJuggler = import ../applications/misc/taskjuggler {
7765     inherit stdenv fetchurl;
7766     inherit zlib libpng perl expat;
7767     qt = qt3;
7769     inherit (xlibs) libX11 libXext libSM libICE;
7771     # KDE support is not working yet.
7772     inherit kdelibs kdebase;
7773     withKde = pkgs.getConfig ["taskJuggler" "kde"] false;
7774   };
7776   thinkingRock = import ../applications/misc/thinking-rock {
7777     inherit fetchurl stdenv;
7778   };
7780   thunderbird = thunderbird2;
7782   thunderbird2 = import ../applications/networking/mailreaders/thunderbird/2.x.nix {
7783     inherit fetchurl stdenv pkgconfig perl zip libjpeg libpng zlib cairo;
7784     inherit (gtkLibs) gtk;
7785     inherit (gnome) libIDL;
7786     inherit (xlibs) libXi;
7787   };
7789   thunderbird3 = lowPrio (import ../applications/networking/mailreaders/thunderbird/3.x.nix {
7790     inherit fetchurl stdenv pkgconfig perl python dbus_glib zip bzip2 alsaLib nspr;
7791     inherit (gtkLibs) gtk;
7792     inherit (gnome) libIDL;
7793   });
7795   timidity = import ../tools/misc/timidity {
7796     inherit fetchurl stdenv lib alsaLib composableDerivation jackaudio ncurses;
7797   };
7799   tkcvs = import ../applications/version-management/tkcvs {
7800     inherit stdenv fetchurl tcl tk;
7801   };
7803   tla = import ../applications/version-management/arch {
7804     inherit fetchurl stdenv diffutils gnutar gnupatch which;
7805   };
7807   twinkle = import ../applications/networking/twinkle {
7808     inherit fetchurl stdenv lib pkgconfig commoncpp2 ccrtp openssl speex libjpeg perl
7809       libzrtpcpp libsndfile libxml2 file readline alsaLib;
7810     qt = qt3;
7811     boost = boostFull;
7812     inherit (xlibs) libX11 libXaw libICE libXext;
7813   };
7815   unison = import ../applications/networking/sync/unison {
7816     inherit fetchurl stdenv ocaml lablgtk makeWrapper;
7817     inherit (xorg) xset fontschumachermisc;
7818   };
7820   uucp = import ../tools/misc/uucp {
7821     inherit fetchurl stdenv;
7822   };
7824   uzbl = builderDefsPackage (import ../applications/networking/browsers/uzbl) {
7825     inherit pkgconfig webkit makeWrapper;
7826     inherit (gtkLibs) gtk glib;
7827     libsoup = gnome28.libsoup;
7828   };
7830   uzblExperimental = builderDefsPackage
7831         (import ../applications/networking/browsers/uzbl/experimental.nix) {
7832     inherit pkgconfig webkit makeWrapper;
7833     inherit (gtkLibs) gtk glib;
7834     libsoup = gnome28.libsoup;
7835   };
7837   valknut = import ../applications/networking/p2p/valknut {
7838     inherit fetchurl stdenv perl x11 libxml2 libjpeg libpng openssl dclib;
7839     qt = qt3;
7840   };
7842   viewMtn = builderDefsPackage (import ../applications/version-management/viewmtn/0.10.nix)
7843   {
7844     inherit monotone flup cheetahTemplate highlight ctags
7845       makeWrapper graphviz which python;
7846   };
7848   vim = import ../applications/editors/vim {
7849     inherit fetchurl stdenv ncurses lib;
7850   };
7852   vimHugeX = import ../applications/editors/vim {
7853     inherit fetchurl stdenv lib ncurses pkgconfig
7854       perl python tcl;
7855     inherit (xlibs) libX11 libXext libSM libXpm
7856       libXt libXaw libXau;
7857     inherit (gtkLibs) glib gtk;
7859     # Looks like python and perl can conflict
7860     flags = ["hugeFeatures" "gtkGUI" "x11Support"
7861       /*"perlSupport"*/ "pythonSupport" "tclSupport"];
7862   };
7864   vim_configurable = import ../applications/editors/vim/configurable.nix {
7865     inherit fetchurl stdenv ncurses pkgconfig composableDerivation lib;
7866     inherit (xlibs) libX11 libXext libSM libXpm
7867         libXt libXaw libXau libXmu;
7868     inherit (gtkLibs) glib gtk;
7869     features = "huge"; # one of  tiny, small, normal, big or huge
7870     # optional features by passing
7871     # python
7872     # TODO mzschemeinterp perlinterp
7873     inherit python perl tcl ruby /*x11*/;
7875     # optional features by flags
7876     flags = [ "X11" ]; # only flag "X11" by now
7877   };
7879   vlc = import ../applications/video/vlc {
7880     inherit fetchurl stdenv perl xlibs zlib a52dec libmad faad2
7881       ffmpeg libdvdnav pkgconfig hal fribidi qt4 freefont_ttf;
7882     dbus = dbus.libs;
7883     alsa = alsaLib;
7884   };
7886   vnstat = import ../applications/networking/vnstat {
7887     inherit fetchurl stdenv ncurses;
7888   };
7890   vorbisTools = import ../applications/audio/vorbis-tools {
7891     inherit fetchurl stdenv libogg libvorbis libao pkgconfig curl glibc
7892       speex flac;
7893   };
7895   vwm = import ../applications/window-managers/vwm {
7896     inherit fetchurl stdenv ncurses pkgconfig libviper libpseudo gpm glib libvterm;
7897   };
7899   w3m = import ../applications/networking/browsers/w3m {
7900     inherit fetchurl stdenv ncurses openssl boehmgc gettext zlib imlib2 x11;
7901     graphicsSupport = false;
7902   };
7904   # I'm keen on wmiimenu only  >wmii-3.5 no longer has it...
7905   wmiimenu = import ../applications/window-managers/wmii31 {
7906     libixp = libixp_for_wmii;
7907     inherit fetchurl /* fetchhg */ stdenv gawk;
7908     inherit (xlibs) libX11;
7909   };
7911   wmiiSnap = import ../applications/window-managers/wmii {
7912     libixp = libixp_for_wmii;
7913     inherit fetchurl /* fetchhg */ stdenv gawk;
7914     inherit (xlibs) libX11 xextproto libXt libXext;
7915     includeUnpack = getConfig ["stdenv" "includeUnpack"] false;
7916   };
7918   wordnet = import ../applications/misc/wordnet {
7919     inherit stdenv fetchurl tcl tk x11 makeWrapper;
7920   };
7922   wrapFirefox = browser: browserName: nameSuffix: import ../applications/networking/browsers/firefox/wrapper.nix {
7923     inherit stdenv nameSuffix makeWrapper makeDesktopItem browser browserName;
7924     plugins =
7925       let enableAdobeFlash = getConfig [ browserName "enableAdobeFlash" ] true;
7926       in
7927        ([]
7928         ++ lib.optional (!enableAdobeFlash) gnash
7929         ++ lib.optional enableAdobeFlash flashplayer
7930         # RealPlayer is disabled by default for legal reasons.
7931         ++ lib.optional (system != "i686-linux" && getConfig [browserName "enableRealPlayer"] false) RealPlayer
7932         ++ lib.optional (getConfig [browserName "enableMPlayer"] false) (MPlayerPlugin browser)
7933         ++ lib.optional (getConfig [browserName "enableGeckoMediaPlayer"] false) gecko_mediaplayer
7934         ++ lib.optional (supportsJDK && getConfig [browserName "jre"] false && jrePlugin ? mozillaPlugin) jrePlugin
7935        );
7936   };
7938   x11vnc = composedArgsAndFun (import ../tools/X11/x11vnc/0.9.3.nix) {
7939     inherit builderDefs openssl zlib libjpeg ;
7940     inherit (xlibs) libXfixes fixesproto libXdamage damageproto
7941       libX11 xproto libXtst libXinerama xineramaproto libXrandr randrproto
7942       libXext xextproto inputproto recordproto libXi renderproto
7943       libXrender;
7944   };
7946   x2vnc = composedArgsAndFun (import ../tools/X11/x2vnc/1.7.2.nix) {
7947     inherit builderDefs;
7948     inherit (xlibs) libX11 xproto xextproto libXext libXrandr randrproto;
7949   };
7951   xaos = builderDefsPackage (import ../applications/graphics/xaos) {
7952     inherit (xlibs) libXt libX11 libXext xextproto xproto;
7953     inherit gsl aalib zlib libpng intltool gettext perl;
7954   };
7956   xara = import ../applications/graphics/xara {
7957     inherit fetchurl stdenv autoconf automake libtool gettext cvs
7958       pkgconfig libxml2 zip libpng libjpeg shebangfix perl freetype;
7959     inherit (gtkLibs) gtk;
7960     wxGTK = wxGTK26;
7961   };
7963   xawtv = import ../applications/video/xawtv {
7964     inherit fetchurl stdenv ncurses libjpeg perl;
7965     inherit (xlibs) libX11 libXt libXft xproto libFS fontsproto libXaw libXpm libXext libSM libICE xextproto;
7966   };
7968   xchat = import ../applications/networking/irc/xchat {
7969     inherit fetchurl stdenv pkgconfig tcl;
7970     inherit (gtkLibs) gtk;
7971   };
7973   xchm = import ../applications/misc/xchm {
7974     inherit fetchurl stdenv chmlib wxGTK;
7975   };
7977   xcompmgr = import ../applications/window-managers/xcompmgr {
7978     inherit stdenv fetchurl pkgconfig;
7979     inherit (xlibs) libXcomposite libXfixes libXdamage libXrender;
7980   };
7982   /* Doesn't work yet
7984   xen = builderDefsPackage (import ../applications/virtualization/xen) {
7985     inherit python e2fsprogs gnutls pkgconfig libjpeg
7986       ncurses SDL libvncserver zlib;
7987     texLive = if (getConfig ["xen" "texLive"] false) then texLive else null;
7988     graphviz = if (getConfig ["xen" "graphviz"] false) then graphviz else null;
7989     ghostscript = if (getConfig ["xen" "ghostscript"] false) then ghostscript else null;
7990   }; */
7992   xfig = import ../applications/graphics/xfig {
7993     stdenv = overrideGCC stdenv gcc34;
7994     inherit fetchurl makeWrapper x11 Xaw3d libpng libjpeg;
7995     inherit (xlibs) imake libXpm libXmu libXi libXp;
7996   };
7998   xineUI = import ../applications/video/xine-ui {
7999     inherit fetchurl stdenv pkgconfig xlibs xineLib libpng readline ncurses curl;
8000   };
8002   xmms = import ../applications/audio/xmms {
8003     inherit fetchurl libogg libvorbis alsaLib;
8004     inherit (gnome) esound;
8005     inherit (gtkLibs1x) glib gtk;
8006     stdenv = overrideGCC stdenv gcc34; # due to problems with gcc 4.x
8007   };
8009   xneur = import ../applications/misc/xneur {
8010     inherit fetchurl stdenv pkgconfig pcre libxml2 aspell imlib2
8011       xosd libnotify cairo;
8012     GStreamer=gst_all.gstreamer;
8013     inherit (xlibs) libX11 libXpm libXt libXext libXi;
8014     inherit (gtkLibs) glib gtk pango atk;
8015   };
8017   xneur_0_8 = import ../applications/misc/xneur/0.8.nix {
8018     inherit fetchurl stdenv pkgconfig pcre libxml2 aspell imlib2 xosd glib;
8019     GStreamer = gst_all.gstreamer;
8020     inherit (xlibs) libX11 libXpm libXt libXext;
8021   };
8023   xournal = builderDefsPackage (import ../applications/graphics/xournal) {
8024     inherit ghostscript fontconfig freetype zlib
8025       poppler popplerData autoconf automake
8026       libtool pkgconfig;
8027     inherit (xlibs) xproto libX11;
8028     inherit (gtkLibs) gtk atk pango glib;
8029     inherit (gnome) libgnomeprint libgnomeprintui
8030       libgnomecanvas;
8031   };
8033   xpdf = import ../applications/misc/xpdf {
8034     inherit fetchurl stdenv x11 freetype t1lib;
8035     motif = lesstif;
8036     base14Fonts = "${ghostscript}/share/ghostscript/fonts";
8037   };
8039   xpra = import ../tools/X11/xpra {
8040     inherit stdenv fetchurl pkgconfig python pygtk xlibs makeWrapper;
8041     inherit (gtkLibs) gtk;
8042     pyrex = pyrex095;
8043   };
8045   xscreensaverBase = composedArgsAndFun (import ../applications/graphics/xscreensaver) {
8046     inherit stdenv fetchurl builderDefs lib pkgconfig bc perl intltool;
8047     inherit (xlibs) libX11 libXmu;
8048   };
8050   xscreensaver = xscreensaverBase.passthru.function {
8051     flags = ["GL" "gdkpixbuf" "DPMS" "gui" "jpeg"];
8052     inherit mesa libxml2 libjpeg;
8053     inherit (gtkLibs) gtk;
8054     inherit (gnome) libglade;
8055   };
8057   xterm = import ../applications/misc/xterm {
8058     inherit fetchurl stdenv ncurses freetype pkgconfig;
8059     inherit (xlibs) libXaw xproto libXt libX11 libSM libICE libXext libXft luit;
8060   };
8062   xtrace = import ../tools/X11/xtrace {
8063     inherit stdenv fetchurl;
8064     inherit (xlibs) libX11;
8065   };
8067   xlaunch = import ../tools/X11/xlaunch {
8068     inherit stdenv;
8069     inherit (xorg) xorgserver;
8070   };
8072   xmacro = import ../tools/X11/xmacro {
8073     inherit fetchurl stdenv;
8074     inherit (xlibs) libX11 libXi libXtst xextproto inputproto;
8075   };
8077   xmove = import ../applications/misc/xmove {
8078     inherit fetchurl stdenv;
8079     inherit (xlibs) libX11 libXi imake libXau;
8080     inherit (xorg) xauth;
8081   };
8083   xnee = builderDefsPackage (import ../tools/X11/xnee) {
8084     inherit (gtkLibs) gtk;
8085     inherit (xlibs) libX11 libXtst xextproto libXext
8086       inputproto libXi xproto recordproto;
8087     inherit pkgconfig;
8088   };
8090   xvidcap = import ../applications/video/xvidcap {
8091     inherit fetchurl stdenv perl perlXMLParser pkgconfig gettext lame;
8092     inherit (gtkLibs) gtk;
8093     inherit (gnome) scrollkeeper libglade;
8094     inherit (xlibs) libXmu libXext libXfixes libXdamage libX11;
8095   };
8097   yate = import ../applications/misc/yate {
8098     inherit sox speex openssl automake autoconf pkgconfig;
8099     inherit fetchurl stdenv lib composableDerivation;
8100     qt = qt4;
8101   };
8103   # doesn't compile yet - in case someone else want's to continue ..
8104   qgis = (import ../applications/misc/qgis/1.0.1-2.nix) {
8105     inherit composableDerivation fetchsvn stdenv flex lib
8106             ncurses fetchurl perl cmake gdal geos proj x11
8107             gsl libpng zlib bison
8108             sqlite glibc fontconfig freetype /* use libc from stdenv ? - to lazy now - Marc */;
8109     inherit (xlibs) libSM libXcursor libXinerama libXrandr libXrender;
8110     inherit (xorg) libICE;
8111     qt = qt4;
8113     # optional features
8114     # grass = "not yet supported" # cmake -D WITH_GRASS=TRUE  and GRASS_PREFX=..
8115   };
8117   zapping = import ../applications/video/zapping {
8118     inherit fetchurl stdenv pkgconfig perl python
8119             gettext zvbi libjpeg libpng x11
8120             rte perlXMLParser;
8121     inherit (gnome) scrollkeeper libgnomeui libglade esound;
8122     inherit (xlibs) libXv libXmu libXext;
8123     teletextSupport = true;
8124     jpegSupport = true;
8125     pngSupport = true;
8126     recordingSupport = true;
8127   };
8130   ### GAMES
8132   ballAndPaddle = import ../games/ball-and-paddle {
8133     inherit fetchurl stdenv SDL SDL_image SDL_mixer SDL_ttf guile gettext;
8134   };
8136   bsdgames = import ../games/bsdgames {
8137     inherit fetchurl stdenv ncurses openssl flex bison miscfiles;
8138   };
8140   castleCombat = import ../games/castle-combat {
8141     inherit fetchurl stdenv python pygame twisted lib numeric makeWrapper;
8142   };
8144   construoBase = composedArgsAndFun (import ../games/construo/0.2.2.nix) {
8145     inherit stdenv fetchurl builderDefs
8146       zlib;
8147     inherit (xlibs) libX11 xproto;
8148   };
8150   construo = construoBase.passthru.function {
8151     inherit mesa freeglut;
8152   };
8154   eduke32 = import ../games/eduke32 {
8155     inherit stdenv fetchurl SDL SDL_mixer unzip libvorbis mesa pkgconfig nasm makeDesktopItem;
8156     inherit (gtkLibs) gtk;
8157   };
8159   exult = import ../games/exult {
8160     inherit fetchurl SDL SDL_mixer zlib libpng unzip;
8161     stdenv = overrideGCC stdenv gcc42;
8162   };
8164   /*
8165   exultSnapshot = lowPrio (import ../games/exult/snapshot.nix {
8166     inherit fetchurl stdenv SDL SDL_mixer zlib libpng unzip
8167       autoconf automake libtool flex bison;
8168   });
8169   */
8171   fsg = import ../games/fsg {
8172     inherit stdenv fetchurl pkgconfig mesa;
8173     inherit (gtkLibs) glib gtk;
8174     inherit (xlibs) libX11 xproto;
8175     wxGTK = wxGTK28.override {unicode = false;};
8176   };
8178   fsgAltBuild = import ../games/fsg/alt-builder.nix {
8179     inherit stdenv fetchurl mesa;
8180     wxGTK = wxGTK28.override {unicode = false;};
8181     inherit (xlibs) libX11 xproto;
8182     inherit stringsWithDeps builderDefs;
8183   };
8185   gemrb = import ../games/gemrb {
8186     inherit fetchurl stdenv SDL openal freealut zlib libpng python;
8187   };
8189   gnuchess = builderDefsPackage (import ../games/gnuchess) {
8190     flex = flex2535;
8191   };
8193   gparted = import ../tools/misc/gparted {
8194     inherit fetchurl stdenv parted intltool gettext libuuid pkgconfig libxml2;
8195     inherit (gtkLibs) gtk glib gtkmm;
8196     inherit (gnome) gnomedocutils;
8197   };
8199   hexen = import ../games/hexen {
8200     inherit stdenv fetchurl SDL;
8201   };
8203   kobodeluxe = import ../games/kobodeluxe {
8204     inherit stdenv fetchurl SDL SDL_image;
8205   };
8207   lincity = builderDefsPackage (import ../games/lincity) {
8208     inherit (xlibs) libX11 libXext xextproto
8209       libICE libSM xproto;
8210     inherit libpng zlib;
8211   };
8213   micropolis = import ../games/micropolis {
8214     inherit lib fetchurl stdenv;
8215     inherit (xlibs) libX11 libXpm libXext xextproto;
8216     inherit byacc bash;
8217   };
8219   openttd = import ../games/openttd {
8220     inherit fetchurl stdenv SDL libpng;
8221     zlib = zlibStatic;
8222   };
8224   quake3demo = import ../games/quake3/wrapper {
8225     name = "quake3-demo-${quake3game.name}";
8226     description = "Demo of Quake 3 Arena, a classic first-person shooter";
8227     inherit fetchurl stdenv mesa makeWrapper;
8228     game = quake3game;
8229     paks = [quake3demodata];
8230   };
8232   quake3demodata = import ../games/quake3/demo {
8233     inherit fetchurl stdenv;
8234   };
8236   quake3game = import ../games/quake3/game {
8237     inherit fetchurl stdenv x11 SDL mesa openal;
8238   };
8240   rogue = import ../games/rogue {
8241     inherit fetchurl stdenv ncurses;
8242   };
8244   scummvm = import ../games/scummvm {
8245     inherit fetchurl stdenv SDL zlib mpeg2dec;
8246   };
8248   scorched3d = import ../games/scorched3d {
8249     inherit stdenv fetchurl mesa openal autoconf automake libtool freealut freetype fftw SDL SDL_net zlib libpng libjpeg;
8250     wxGTK = wxGTK26;
8251   };
8253   sgtpuzzles = builderDefsPackage (import ../games/sgt-puzzles) {
8254     inherit (gtkLibs) gtk glib;
8255     inherit pkgconfig fetchsvn perl;
8256     inherit (xlibs) libX11;
8257   };
8259   # You still can override by passing more arguments.
8260   spaceOrbit = composedArgsAndFun (import ../games/orbit/1.01.nix) {
8261     inherit fetchurl stdenv builderDefs mesa freeglut;
8262     inherit (gnome) esound;
8263     inherit (xlibs) libXt libX11 libXmu libXi libXext;
8264   };
8266   superTuxKart = import ../games/super-tux-kart {
8267     inherit fetchurl stdenv plib SDL openal freealut mesa
8268       libvorbis libogg gettext;
8269   };
8271   teeworlds = import ../games/teeworlds {
8272     inherit fetchurl stdenv python alsaLib mesa SDL;
8273     inherit (xlibs) libX11;
8274   };
8276   /*tpm = import ../games/thePenguinMachine {
8277     inherit stdenv fetchurl pil pygame SDL;
8278     python24 = python;
8279   };*/
8281   ultimatestunts = import ../games/ultimatestunts {
8282     inherit stdenv fetchurl SDL mesa SDL_image freealut;
8283   };
8285   ut2004demo = import ../games/ut2004demo {
8286     inherit fetchurl stdenv xlibs mesa;
8287   };
8289   warsow = import ../games/warsow {
8290     inherit stdenv fetchurl unzip pkgconfig zlib curl libjpeg libvorbis SDL
8291             mesa openal;
8292     inherit (xlibs) libXxf86dga libXxf86vm libXinerama;
8293   };
8295   xboard = builderDefsPackage (import ../games/xboard) {
8296     inherit (xlibs) libX11 xproto libXt libXaw libSM
8297       libICE libXmu libXext libXpm;
8298     inherit gnuchess texinfo;
8299   };
8301   xsokoban = builderDefsPackage (import ../games/xsokoban) {
8302     inherit (xlibs) libX11 xproto libXpm libXt;
8303   };
8305   zdoom = import ../games/zdoom {
8306     inherit cmake stdenv fetchsvn SDL nasm p7zip zlib flac fmod libjpeg;
8307   };
8309   zoom = import ../games/zoom {
8310     inherit fetchurl stdenv perl expat freetype;
8311     inherit (xlibs) xlibs;
8312   };
8314   keen4 = import ../games/keen4 {
8315     inherit fetchurl stdenv dosbox unzip;
8316   };
8319   ### DESKTOP ENVIRONMENTS
8322   enlightenment = import ../desktops/enlightenment {
8323     inherit stdenv fetchurl pkgconfig x11 xlibs dbus imlib2 freetype;
8324   };
8326   gnome28 = import ../desktops/gnome-2.28 pkgs;
8328   gnome = gnome28;
8330   kde3 = {
8332     kdelibs = import ../desktops/kde-3/kdelibs {
8333       inherit
8334         fetchurl stdenv xlibs zlib perl openssl pcre pkgconfig
8335         libjpeg libpng libtiff libxml2 libxslt libtool
8336         expat freetype bzip2 cups attr acl;
8337       qt = qt3;
8338     };
8340     kdebase = import ../desktops/kde-3/kdebase {
8341       inherit
8342         fetchurl stdenv pkgconfig x11 xlibs zlib libpng libjpeg perl
8343         kdelibs openssl bzip2 fontconfig pam hal dbus glib;
8344       qt = qt3;
8345     };
8347   };
8349   kde4 = kde43;
8351   kde43 = makeOverridable (import ../desktops/kde-4.3) (pkgs // {
8352     openexr = openexr_1_6_1;
8353     qt4 = qt45;
8354     popplerQt4 = popplerQt45;
8355   });
8357   kdelibs = kde3.kdelibs;
8358   kdebase = kde3.kdebase;
8360   ### SCIENCE
8362   xplanet = import ../applications/science/xplanet {
8363     inherit stdenv fetchurl lib pkgconfig freetype libpng libjpeg giflib libtiff;
8364     inherit (gtkLibs) pango;
8365   };
8367   ### SCIENCE/GEOMETRY
8369   drgeo = builderDefsPackage (import ../applications/science/geometry/drgeo) {
8370     inherit (gnome) libglade gtk;
8371     inherit libxml2 guile perl intltool libtool pkgconfig;
8372   };
8375   ### SCIENCE/BIOLOGY
8377   alliance = import ../applications/science/electronics/alliance {
8378     inherit fetchurl stdenv bison flex;
8379     inherit (xlibs) xproto libX11 libXt libXpm;
8380     motif = lesstif;
8381   };
8383   arb = import ../applications/science/biology/arb {
8384     inherit fetchurl readline libpng zlib x11 lesstif93 freeglut perl;
8385     inherit (xlibs) libXpm libXaw libX11 libXext libXt;
8386     inherit mesa glew libtiff lynx rxp sablotron jdk transfig gv gnuplot;
8387     lesstif = lesstif93;
8388     stdenv = overrideGCC stdenv gcc42;
8389   };
8391   biolib = import ../development/libraries/science/biology/biolib {
8392     inherit fetchurl stdenv readline perl cmake rLang zlib;
8393   };
8395   emboss = import ../applications/science/biology/emboss {
8396     inherit fetchurl stdenv readline perl libpng zlib;
8397     inherit (xorg) libX11 libXt;
8398   };
8400   mrbayes = import ../applications/science/biology/mrbayes {
8401     inherit fetchurl stdenv readline;
8402   };
8404   ncbiCTools = builderDefsPackage ../development/libraries/ncbi {
8405     inherit tcsh mesa lesstif;
8406     inherit (xlibs) libX11 libXaw xproto libXt libSM libICE
8407       libXmu libXext;
8408   };
8410   ncbi_tools = import ../applications/science/biology/ncbi-tools {
8411     inherit fetchurl stdenv cpio;
8412   };
8414   paml = import ../applications/science/biology/paml {
8415     inherit fetchurl stdenv;
8416   };
8418   /* slr = import ../applications/science/biology/slr {
8419     inherit fetchurl stdenv liblapack;
8420   }; */
8422   pal2nal = import ../applications/science/biology/pal2nal {
8423     inherit fetchurl stdenv perl paml;
8424   };
8427   ### SCIENCE/MATH
8429   atlas = import ../development/libraries/science/math/atlas {
8430     inherit fetchurl stdenv gfortran;
8431   };
8433   blas = import ../development/libraries/science/math/blas {
8434     inherit fetchurl stdenv gfortran;
8435   };
8437   content = builderDefsPackage ../applications/science/math/content {
8438     inherit mesa lesstif;
8439     inherit (xlibs) libX11 libXaw xproto libXt libSM libICE
8440       libXmu libXext libXcursor;
8441   };
8443   liblapack = import ../development/libraries/science/math/liblapack {
8444     inherit fetchurl stdenv gfortran blas;
8445   };
8448   ### SCIENCE/LOGIC
8450   coq = import ../applications/science/logic/coq {
8451     inherit stdenv fetchurl ocaml lablgtk ncurses;
8452     camlp5 = camlp5_transitional;
8453   };
8455   isabelle = import ../applications/science/logic/isabelle {
8456     inherit (pkgs) stdenv fetchurl nettools perl polyml emacs emacsPackages;
8457   };
8459   ssreflect = import ../applications/science/logic/ssreflect {
8460     inherit stdenv fetchurl ocaml coq;
8461     camlp5 = camlp5_transitional;
8462   };
8464   ### SCIENCE / ELECTRONICS
8466   ngspice = import ../applications/science/electronics/ngspice {
8467     inherit fetchurl stdenv readline;
8468   };
8470   gtkwave = import ../applications/science/electronics/gtkwave {
8471     inherit fetchurl stdenv gperf pkgconfig bzip2;
8472     inherit (gtkLibs) gtk;
8473   };
8475   ### SCIENCE / MATH
8477   maxima = import ../applications/science/math/maxima {
8478     inherit fetchurl stdenv clisp;
8479   };
8481   wxmaxima = import ../applications/science/math/wxmaxima {
8482     inherit fetchurl stdenv maxima;
8483     inherit wxGTK;
8484   };
8486   scilab = (import ../applications/science/math/scilab) {
8487     inherit stdenv fetchurl lib gfortran;
8488     inherit (gtkLibs) gtk;
8489     inherit ncurses Xaw3d tcl tk ocaml x11;
8491     withXaw3d = false;
8492     withTk = true;
8493     withGtk = false;
8494     withOCaml = true;
8495     withX = true;
8496   };
8499   ### MISC
8501   atari800 = import ../misc/emulators/atari800 {
8502     inherit fetchurl stdenv unzip zlib SDL;
8503   };
8505   ataripp = import ../misc/emulators/atari++ {
8506     inherit fetchurl stdenv x11 SDL;
8507   };
8509   auctex = import ../misc/tex/auctex {
8510     inherit stdenv fetchurl emacs texLive;
8511   };
8513   busybox = import ../misc/busybox {
8514     inherit fetchurl stdenv;
8515   };
8517   cups = import ../misc/cups {
8518     inherit fetchurl stdenv pkgconfig zlib libjpeg libpng libtiff pam openssl dbus;
8519   };
8521   gutenprint = import ../misc/drivers/gutenprint {
8522     inherit fetchurl stdenv lib pkgconfig composableDerivation cups libtiff libpng
8523       openssl git gimp;
8524   };
8526   gutenprintBin = import ../misc/drivers/gutenprint/bin.nix {
8527     inherit fetchurl stdenv rpm cpio zlib;
8528   };
8530   cupsBjnp = import ../misc/cups/drivers/cups-bnjp {
8531     inherit fetchurl stdenv cups;
8532   };
8534   dblatex = import ../misc/tex/dblatex {
8535     inherit fetchurl stdenv python libxslt tetex;
8536   };
8538   dosbox = import ../misc/emulators/dosbox {
8539     inherit fetchurl stdenv SDL makeDesktopItem;
8540   };
8542   dpkg = import ../tools/package-management/dpkg {
8543     inherit fetchurl stdenv perl zlib bzip2;
8544   };
8546   electricsheep = import ../misc/screensavers/electricsheep {
8547     inherit fetchurl stdenv pkgconfig expat zlib libpng libjpeg xlibs;
8548   };
8550   foldingathome = import ../misc/foldingathome {
8551       inherit fetchurl stdenv;
8552     };
8554   freestyle = import ../misc/freestyle {
8555     inherit fetchurl freeglut qt4 libpng lib3ds libQGLViewer swig;
8556     inherit (xlibs) libXi;
8557     #stdenv = overrideGCC stdenv gcc41;
8558     inherit stdenv python;
8559   };
8561   gajim = builderDefsPackage (import ../applications/networking/instant-messengers/gajim) {
8562     inherit perl intltool pyGtkGlade gettext pkgconfig makeWrapper pygobject
8563       pyopenssl gtkspell libsexy pycrypto aspell pythonDBus pythonSexy
8564       docutils;
8565     dbus = dbus.libs;
8566     inherit (gnome) gtk libglade;
8567     inherit (xlibs) libXScrnSaver libXt xproto libXext xextproto libX11
8568       scrnsaverproto;
8569     python = pythonFull;
8570   };
8572   generator = import ../misc/emulators/generator {
8573     inherit fetchurl stdenv SDL nasm zlib bzip2 libjpeg;
8574     inherit (gtkLibs1x) gtk;
8575   };
8577   ghostscript = makeOverridable (import ../misc/ghostscript) {
8578     inherit fetchurl stdenv libjpeg libpng libtiff zlib x11 pkgconfig
8579       fontconfig cups openssl;
8580     x11Support = false;
8581     cupsSupport = getPkgConfig "ghostscript" "cups" true;
8582   };
8584   ghostscriptX = lowPrio (appendToName "with-X" (ghostscript.override {
8585     x11Support = true;
8586   }));
8588   gxemul = (import ../misc/gxemul) {
8589     inherit lib stdenv fetchurl composableDerivation;
8590     inherit (xlibs) libX11;
8591   };
8593   # using the new configuration style proposal which is unstable
8594   jackaudio = import ../misc/jackaudio {
8595     inherit composableDerivation
8596            ncurses lib stdenv fetchurl alsaLib pkgconfig;
8597     flags = [ "posix_shm" "timestamps" "alsa"];
8598   };
8600   keynav = import ../tools/X11/keynav {
8601     inherit stdenv fetchurl;
8602     inherit (xlibs) libX11 xextproto libXtst imake libXi libXext;
8603   };
8605   lazylist = import ../misc/tex/lazylist {
8606     inherit fetchurl stdenv tetex;
8607   };
8609   lilypond = import ../misc/lilypond {
8610     inherit fetchurl sourceFromHead stdenv lib automake autoconf
8611       ghostscript texinfo imagemagick texi2html guile python gettext
8612       perl bison pkgconfig texLive fontconfig freetype fontforge help2man;
8613     inherit (gtkLibs) pango;
8614     flex = flex2535;
8615   };
8617   linuxwacom = import ../misc/linuxwacom {
8618     inherit fetchurl stdenv ncurses pkgconfig;
8619     inherit (xorg) libX11 libXi xproto inputproto xorgserver;
8620   };
8622   martyr = import ../development/libraries/martyr {
8623     inherit stdenv fetchurl apacheAnt;
8624   };
8626   maven = import ../misc/maven/maven-1.0.nix {
8627     inherit stdenv fetchurl jdk;
8628   };
8630   maven2 = import ../misc/maven {
8631     inherit stdenv fetchurl jdk makeWrapper;
8632   };
8634   nix = makeOverridable (import ../tools/package-management/nix) {
8635     inherit fetchurl stdenv perl curl bzip2 openssl;
8636     aterm = aterm242fixes;
8637     db4 = db45;
8638     supportOldDBs = getPkgConfig "nix" "OldDBSupport" true;
8639     storeDir = getPkgConfig "nix" "storeDir" "/nix/store";
8640     stateDir = getPkgConfig "nix" "stateDir" "/nix/var";
8641   };
8643   # The bleeding edge.
8644   nixUnstable = makeOverridable (import ../tools/package-management/nix/unstable.nix) {
8645     inherit fetchurl stdenv perl curl bzip2 openssl;
8646     aterm = aterm242fixes;
8647     storeDir = getPkgConfig "nix" "storeDir" "/nix/store";
8648     stateDir = getPkgConfig "nix" "stateDir" "/nix/var";
8649   };
8651   nixCustomFun = src: preConfigure: enableScripts: configureFlags:
8652     import ../tools/package-management/nix/custom.nix {
8653       inherit fetchurl stdenv perl curl bzip2 openssl src preConfigure automake
8654         autoconf libtool configureFlags enableScripts lib bison libxml2;
8655       flex = flex2533;
8656       aterm = aterm242fixes;
8657       db4 = db45;
8658       inherit docbook5_xsl libxslt docbook5 docbook_xml_dtd_43 w3m;
8659     };
8661   disnix = import ../tools/package-management/disnix {
8662     inherit stdenv fetchsvn openssl autoconf automake libtool pkgconfig dbus_glib libxml2;
8663   };
8665   disnix_activation_scripts = import ../tools/package-management/disnix/activation-scripts {
8666     inherit stdenv fetchsvn autoconf automake;
8667   };
8669   DisnixService = import ../tools/package-management/disnix/DisnixService {
8670     inherit stdenv fetchsvn apacheAnt jdk axis2 shebangfix;
8671   };
8673   latex2html = import ../misc/tex/latex2html/default.nix {
8674     inherit fetchurl stdenv perl ghostscript netpbm;
8675     tex = tetex;
8676   };
8678   pgadmin = import ../applications/misc/pgadmin {
8679     inherit fetchurl stdenv postgresql libxml2 libxslt openssl;
8680     inherit wxGTK;
8681   };
8683   pgf = pgf2;
8685   # Keep the old PGF since some documents don't render properly with
8686   # the new one.
8687   pgf1 = import ../misc/tex/pgf/1.x.nix {
8688     inherit fetchurl stdenv;
8689   };
8691   pgf2 = import ../misc/tex/pgf/2.x.nix {
8692     inherit fetchurl stdenv;
8693   };
8695   polytable = import ../misc/tex/polytable {
8696     inherit fetchurl stdenv tetex lazylist;
8697   };
8699   psi = (import ../applications/networking/instant-messengers/psi) {
8700     inherit stdenv fetchurl zlib aspell sox qt4;
8701     inherit (xlibs) xproto libX11 libSM libICE;
8702     qca2 = kde4.qca2;
8703   };
8705   putty = import ../applications/networking/remote/putty {
8706     inherit stdenv fetchurl ncurses;
8707     inherit (gtkLibs1x) gtk;
8708   };
8710   rssglx = import ../misc/screensavers/rss-glx {
8711     inherit fetchurl stdenv x11 mesa pkgconfig imagemagick libtiff bzip2;
8712   };
8714   xlockmore = import ../misc/screensavers/xlockmore {
8715     inherit fetchurl stdenv x11 freetype;
8716     pam = if getPkgConfig "xlockmore" "pam" true then pam else null;
8717   };
8719   saneBackends = import ../misc/sane-backends {
8720     inherit fetchurl stdenv libusb;
8721     gt68xxFirmware = getConfig ["sane" "gt68xxFirmware"] null;
8722   };
8724   saneFrontends = import ../misc/sane-front {
8725     inherit fetchurl stdenv pkgconfig libusb saneBackends;
8726     inherit (gtkLibs) gtk;
8727     inherit (xlibs) libX11;
8728   };
8730   sourceAndTags = import ../misc/source-and-tags {
8731     inherit pkgs stdenv unzip lib ctags;
8732     hasktags = haskellPackages.myhasktags;
8733   };
8735   synaptics = import ../misc/synaptics {
8736     inherit fetchurl stdenv pkgconfig;
8737     inherit (xlibs) libX11 libXi libXext pixman xf86inputevdev;
8738     inherit (xorg) xorgserver;
8739   };
8741   tetex = import ../misc/tex/tetex {
8742     inherit fetchurl stdenv flex bison zlib libpng ncurses ed;
8743   };
8745   tex4ht = import ../misc/tex/tex4ht {
8746     inherit fetchurl stdenv tetex;
8747   };
8749   texFunctions = import ../misc/tex/nix {
8750     inherit stdenv perl tetex graphviz ghostscript makeFontsConf imagemagick runCommand lib;
8751     inherit (haskellPackages) lhs2tex;
8752   };
8754   texLive = builderDefsPackage (import ../misc/tex/texlive) {
8755     inherit builderDefs zlib bzip2 ncurses libpng ed
8756       gd t1lib freetype icu perl ruby expat curl
8757       libjpeg bison;
8758     inherit (xlibs) libXaw libX11 xproto libXt libXpm
8759       libXmu libXext xextproto libSM libICE;
8760     flex = flex2535;
8761     ghostscript = ghostscriptX;
8762   };
8764   /* Look in configurations/misc/raskin.nix for usage example (around revisions
8765   where TeXLive was added)
8767   (texLiveAggregationFun {
8768     paths = [texLive texLiveExtra texLiveCMSuper
8769       texLiveBeamer
8770     ];
8771   })
8773   You need to use texLiveAggregationFun to regenerate, say, ls-R (TeX-related file list)
8774   Just installing a few packages doesn't work.
8775   */
8776   texLiveAggregationFun =
8777     (builderDefsPackage (import ../misc/tex/texlive/aggregate.nix));
8779   texLiveContext = builderDefsPackage (import ../misc/tex/texlive/context.nix) {
8780     inherit texLive;
8781   };
8783   texLiveExtra = builderDefsPackage (import ../misc/tex/texlive/extra.nix) {
8784     inherit texLive;
8785   };
8787   texLiveCMSuper = builderDefsPackage (import ../misc/tex/texlive/cm-super.nix) {
8788     inherit texLive;
8789   };
8791   texLiveLatexXColor = builderDefsPackage (import ../misc/tex/texlive/xcolor.nix) {
8792     inherit texLive;
8793   };
8795   texLivePGF = builderDefsPackage (import ../misc/tex/texlive/pgf.nix) {
8796     inherit texLiveLatexXColor texLive;
8797   };
8799   texLiveBeamer = builderDefsPackage (import ../misc/tex/texlive/beamer.nix) {
8800     inherit texLiveLatexXColor texLivePGF texLive;
8801   };
8803   toolbuslib = import ../development/libraries/toolbuslib {
8804     inherit stdenv fetchurl aterm;
8805   };
8807   trac = import ../misc/trac {
8808     inherit stdenv fetchurl python clearsilver makeWrapper
8809       sqlite subversion;
8810     inherit (pythonPackages) pysqlite;
8811   };
8813    vice = import ../misc/emulators/vice {
8814      inherit stdenv fetchurl lib perl gettext libpng giflib libjpeg alsaLib readline mesa;
8815      inherit pkgconfig SDL makeDesktopItem autoconf automake;
8816      inherit (gtkLibs) gtk;
8817    };
8819   wine =
8820     if system == "x86_64-linux" then
8821       # Can't build this in 64-bit; use a 32-bit build instead.
8822       pkgsi686Linux.wine
8823       # some hackery to make nix-env show this package on x86_64...
8824       // {system = "x86_64-linux";}
8825     else
8826       import ../misc/emulators/wine {
8827         inherit fetchurl stdenv bison mesa ncurses
8828           libpng libjpeg alsaLib lcms xlibs freetype
8829           fontconfig fontforge libxml2 libxslt openssl;
8830         flex = flex2535;
8831       };
8833   xosd = import ../misc/xosd {
8834     inherit fetchurl stdenv;
8835     inherit (xlibs) libX11 libXext libXt xextproto xproto;
8836   };
8838   xsane = import ../misc/xsane {
8839     inherit fetchurl stdenv pkgconfig libusb
8840       saneBackends saneFrontends;
8841     inherit (gtkLibs) gtk;
8842     inherit (xlibs) libX11;
8843   };
8845   yafc = import ../applications/networking/yafc {
8846     inherit fetchurl stdenv readline openssh;
8847   };
8849   myEnvFun = import ../misc/my-env {
8850     inherit substituteAll pkgs;
8851     inherit (stdenv) mkDerivation;
8852   };
8854   misc = import ../misc/misc.nix { inherit pkgs stdenv; };
8856 }; in pkgs