Documentation Gaps: Difference between revisions

imported>Makefu
rename
 
imported>Fadenb
m replace html entities
Line 13: Line 13:
<blockquote>'''Answer:'''
<blockquote>'''Answer:'''


Mostly yes. Some of them [https://github.com/NixOS/nixpkgs/blob/c3b2c5bf77f9d437b4656f0244bcdf2ab8d0102c/pkgs/stdenv/generic/default.nix#L101-L111 are automatically enabled by default]. Others you can enable on-demand, by adding them to your <code>buildInputs</code> — e.g. <code>buildInputs = [ makeWrapper ];</code> (to find the &quot;proper&quot; name for this use, you must go [https://search.nix.gsc.io/?q=makeWrapper%20%3D&i=nope&files=&repos= top-level hunting]). Then they will either auto-inject some steps into build phases (e.g. [https://github.com/NixOS/nixpkgs/blob/0e9e77750818f40303c72ad658b3dca299591e4f/pkgs/development/tools/misc/pkgconfig/default.nix#L8 <code>pkgconfig</code>] or autoconf), or allow you to use some useful scripts during build easily (e.g. <code>makeWrapper</code> — see [https://github.com/NixOS/nixpkgs/blob/0e9e77750818f40303c72ad658b3dca299591e4f/pkgs/build-support/setup-hooks/make-wrapper.sh#L130 wrapProgram] and [https://github.com/NixOS/nixpkgs/blob/0e9e77750818f40303c72ad658b3dca299591e4f/pkgs/build-support/setup-hooks/make-wrapper.sh#L1 makeWrapper] docs for details, then [https://search.nix.gsc.io/?q=wrapProgram&i=nope&files=&repos= grep in nixpkgs] for numerous usage examples).
Mostly yes. Some of them [https://github.com/NixOS/nixpkgs/blob/c3b2c5bf77f9d437b4656f0244bcdf2ab8d0102c/pkgs/stdenv/generic/default.nix#L101-L111 are automatically enabled by default]. Others you can enable on-demand, by adding them to your <code>buildInputs</code> — e.g. <code>buildInputs = [ makeWrapper ];</code> (to find the "proper" name for this use, you must go [https://search.nix.gsc.io/?q=makeWrapper%20%3D&i=nope&files=&repos= top-level hunting]). Then they will either auto-inject some steps into build phases (e.g. [https://github.com/NixOS/nixpkgs/blob/0e9e77750818f40303c72ad658b3dca299591e4f/pkgs/development/tools/misc/pkgconfig/default.nix#L8 <code>pkgconfig</code>] or autoconf), or allow you to use some useful scripts during build easily (e.g. <code>makeWrapper</code> — see [https://github.com/NixOS/nixpkgs/blob/0e9e77750818f40303c72ad658b3dca299591e4f/pkgs/build-support/setup-hooks/make-wrapper.sh#L130 wrapProgram] and [https://github.com/NixOS/nixpkgs/blob/0e9e77750818f40303c72ad658b3dca299591e4f/pkgs/build-support/setup-hooks/make-wrapper.sh#L1 makeWrapper] docs for details, then [https://search.nix.gsc.io/?q=wrapProgram&i=nope&files=&repos= grep in nixpkgs] for numerous usage examples).


See also [https://github.com/NixOS/nixpkgs/tree/master/pkgs/build-support/setup-hooks <nixpkgs>/pkgs/build-support/setup-hooks] for a list of some common setup hooks.
See also [https://github.com/NixOS/nixpkgs/tree/master/pkgs/build-support/setup-hooks <nixpkgs>/pkgs/build-support/setup-hooks] for a list of some common setup hooks.