diff --git a/doc/language-support.xml b/doc/language-support.xml index da709b34a94b..1e1bdf75eda5 100644 --- a/doc/language-support.xml +++ b/doc/language-support.xml @@ -245,14 +245,14 @@ are provided with all modules included. Name of the folder in ${python}/lib/ for corresponding interpreter. - + interpreter Alias for ${python}/bin/${executable}. - + buildEnv @@ -260,29 +260,29 @@ are provided with all modules included. See for usage and documentation. - + sitePackages Alias for lib/${libPrefix}/site-packages. - + executable Name of the interpreter executable, ie python3.4. - +
<varname>buildPythonPackage</varname> function - + The function is implemented in pkgs/development/python-modules/generic/default.nix. Example usage: - + twisted = buildPythonPackage { name = "twisted-8.1.0"; @@ -308,27 +308,27 @@ twisted = buildPythonPackage { python27Packages, python32Packages, python33Packages, python34Packages and pypyPackages. - + buildPythonPackage mainly does four things: - + In the configurePhase, it patches setup.py to always include setuptools before distutils for monkeypatching machinery to take place. - + - In the buildPhase, it calls + In the buildPhase, it calls ${python.interpreter} setup.py build ... - + - In the installPhase, it calls + In the installPhase, it calls ${python.interpreter} setup.py install ... - + In the postFixup phase, wrapPythonPrograms bash function is called to wrap all programs in $out/bin/* @@ -337,23 +337,23 @@ twisted = buildPythonPackage { - - By default doCheck = true is set and tests are run with + + By default doCheck = true is set and tests are run with ${python.interpreter} setup.py test command in checkPhase. - + propagatedBuildInputs packages are propagated to user environment. - + By default meta.platforms is set to the same value as the interpreter unless overriden otherwise. - + <varname>buildPythonPackage</varname> parameters (all parameters from <varname>mkDerivation</varname> function are still supported) - + namePrefix @@ -363,7 +363,7 @@ twisted = buildPythonPackage { if you're packaging an application or a command line tool. - + disabled @@ -373,21 +373,21 @@ twisted = buildPythonPackage { for examples. - + setupPyInstallFlags List of flags passed to setup.py install command. - + setupPyBuildFlags List of flags passed to setup.py build command. - + pythonPath @@ -396,21 +396,21 @@ twisted = buildPythonPackage { (contrary to propagatedBuildInputs). - + preShellHook Hook to execute commands before shellHook. - + postShellHook Hook to execute commands after shellHook. - + distutilsExtraCfg @@ -419,15 +419,29 @@ twisted = buildPythonPackage { configuration). - + + + makeWrapperArgs + + A list of strings. Arguments to be passed to + makeWrapper, which wraps generated binaries. By + default, the arguments to makeWrapper set + PATH and PYTHONPATH environment + variables before calling the binary. Additional arguments here can + allow a developer to set environment variables which will be + available when the binary is run. For example, + makeWrapperArgs = ["--set FOO BAR" "--set BAZ QUX"]. + + + - +
<function>python.buildEnv</function> function Create Python environments using low-level pkgs.buildEnv function. Example default.nix: - + {}; @@ -436,31 +450,31 @@ python.buildEnv.override { ignoreCollisions = true; }]]> - + Running nix-build will create /nix/store/cf1xhjwzmdki7fasgr4kz6di72ykicl5-python-2.7.8-env with wrapped binaries in bin/. - + <function>python.buildEnv</function> arguments - + extraLibs List of packages installed inside the environment. - + postBuild Shell command executed after the build of environment. - + ignoreCollisions @@ -504,13 +518,13 @@ exist in community to help save time. No tool is preferred at the moment. additional logic inside shellPhase to run ${python.interpreter} setup.py develop for the package. - + shellPhase is executed only if setup.py exists. - + Given a default.nix: - + {}; @@ -522,18 +536,18 @@ buildPythonPackage { src = ./.; }]]> - + Running nix-shell with no arguments should give you the environment in which the package would be build with nix-build. - + Shortcut to setup environments with C headers/libraries and python packages: - + $ nix-shell -p pythonPackages.pyramid zlib libjpeg git - + There is a boolean value lib.inNixShell set to true if nix-shell is invoked. @@ -562,12 +576,12 @@ buildPythonPackage { Known bug in setuptools install_data does not respect --prefix. Example of such package using the feature is pkgs/tools/X11/xpra/default.nix. As workaround install it as an extra preInstall step: - + ${python.interpreter} setup.py install_data --install-dir=$out --root=$out sed -i '/ = data_files/d' setup.py - + Rationale of non-existent global site-packages @@ -616,7 +630,7 @@ sed -i '/ = data_files/d' setup.py this into a nix expression that contains all Gem dependencies automatically. For example, to package sensu, we did: - + - Though, more complicated package should be placed in a seperate file in + Though, more complicated package should be placed in a seperate file in pkgs/development/lua-modules.