The following packages provide a setup hook:
Adds the include
subdirectory
of each build input to the NIX_CFLAGS_COMPILE
environment variable, and the lib
and
lib64
subdirectories to
NIX_LDFLAGS
.
Adds the lib/site_perl
subdirectory
of each build input to the PERL5LIB
environment variable.
Adds the
lib/${python.libPrefix}/site-packages
subdirectory of
each build input to the PYTHONPATH
environment
variable.
Adds the lib/pkgconfig
and
share/pkgconfig
subdirectories of each
build input to the PKG_CONFIG_PATH
environment
variable.
Adds the share/aclocal
subdirectory of each build input to the ACLOCAL_PATH
environment variable.
The autoreconfHook
derivation adds
autoreconfPhase
, which runs autoreconf, libtoolize and
automake, essentially preparing the configure script in autotools-based
builds.
Adds every file named
catalog.xml
found under the
xml/dtd
and xml/xsl
subdirectories of each build input to the
XML_CATALOG_FILES
environment
variable.
Adds the share/texmf-nix
subdirectory of each build input to the TEXINPUTS
environment variable.
Sets the QTDIR
environment variable
to Qt’s path.
Exports GDK_PIXBUF_MODULE_FILE
environment variable the the builder. Add librsvg package
to buildInputs
to get svg support.
Creates a temporary package database and registers every Haskell build input in it (TODO: how?).
Adds the
GStreamer plugins subdirectory of
each build input to the GST_PLUGIN_SYSTEM_PATH_1_0
or
GST_PLUGIN_SYSTEM_PATH
environment variable.
Defines the paxmark
helper for
setting per-executable PaX flags on Linux (where it is available by
default; on all other platforms, paxmark
is a no-op).
For example, to disable secure memory protections on the executable
foo
:
postFixup = ''
paxmark m $out/bin/foo
'';
The m
flag is the most common flag and is typically
required for applications that employ JIT compilation or otherwise need to
execute code generated at run-time. Disabling PaX protections should be
considered a last resort: if possible, problematic features should be
disabled or patched to work with PaX.