nixpkgs/pkgs/top-level
Peter Simons 29588edfe1 python-wrapper: split 'extraLibs' into 'stdLibs' and 'extraLibs', and add 'postBuild' step
The default setting for extraLibs used to be the set of modules that come with
python by default but aren't usually enabled in our standard python derivation
because they require additional libraries. This meant that users who want to
*add* libraries to that set had to use a fairly complicated override, to add
more entries without loosing the ones set by default.

After this patch, the "standard libraries" such as "curses' are listed in
stdLibs while the extraLibs argument remains empty by default. This allows
users to override extraLibs without overriding the standard libraries.

Furthermore, the wrapper environment can be messed around with in an
additional 'postBuild' step. One nice application of this build step is
to patch scripts and binaries to use the wrapped python interpreter
instead of the pristine one, thereby enabling them to pick up all
modules that have been configured. The following example shows how this
is done for the 'pylint' utility:

  pkgs.python27Full.override {
    extraLibs = [pkgs.pylint];
    postBuild = ''
      cd ${pkgs.pylint}/bin
      for i in *; do
        rm $out/bin/$i
        sed -r -e "s|^exec |exec $out/bin/python -- |" <$i >$out/bin/$i
        chmod +x $out/bin/$i
      done;
    '';
  };
2013-11-07 15:13:02 +01:00
..
all-packages.nix python-wrapper: split 'extraLibs' into 'stdLibs' and 'extraLibs', and add 'postBuild' step 2013-11-07 15:13:02 +01:00
guile-2-test.nix
haskell-defaults.nix haskell-binary: re-add version 0.6.0.0 for the benefit of GHC 6.10.4 2013-06-15 13:18:51 +02:00
haskell-packages.nix pkgs/development/compilers/ghc/with-packages.nix: add 'ignoreCollisions' parameter 2013-11-07 12:14:19 +01:00
make-tarball.nix Tarball: Match the NixOS version 2013-10-11 13:36:09 +02:00
mingw.nix
node-packages-generated.nix Update nodePackages to npm2nix-5.2.0 2013-11-05 18:02:21 -05:00
node-packages.json Update nodePackages and add meat nodePackage 2013-10-18 15:56:33 -04:00
node-packages.nix Update nodePackages to npm2nix-5.2.0 2013-11-05 18:02:21 -05:00
perl-packages.nix Add Finance::Quote 2013-11-05 10:46:44 +01:00
platforms.nix Move kernelExtraConfig to common-config.nix (for x86) 2013-08-01 14:35:31 +02:00
python-packages-generated.nix Update python packages 2013-10-13 15:19:46 +02:00
python-packages.json Revert "pythonPackage.psycopg2: fix" 2013-10-11 10:44:18 +02:00
python-packages.nix pythonPackages: Add ipaddr, Google's IP address manipulation library 2013-11-06 07:51:09 +01:00
r-packages.nix Wrapped R's package system similarly to perlPackages 2013-09-28 13:19:43 +02:00
release-cross.nix rpi: more packages to cross-compile 2013-05-26 12:54:26 +02:00
release-lib.nix Only show/build a package on the platforms listed in meta.platforms 2013-11-05 00:06:10 +01:00
release-python.nix Remove broken and obsolete versions of gcj and ghdl 2013-11-04 21:11:00 +01:00
release-small.nix Remove broken and obsolete versions of gcj and ghdl 2013-11-04 21:11:00 +01:00
release.nix Update some more platforms 2013-11-06 10:58:20 +01:00