From 83c2ad80ca8c6087b034155e2a767c4f72a6df3f Mon Sep 17 00:00:00 2001 From: Jan Tojnar Date: Wed, 18 Sep 2019 22:12:54 +0200 Subject: doc: re-format --- doc/functions/trivial-builders.xml | 46 +++++--------------------------------- 1 file changed, 6 insertions(+), 40 deletions(-) (limited to 'doc/functions/trivial-builders.xml') diff --git a/doc/functions/trivial-builders.xml b/doc/functions/trivial-builders.xml index 0211a4f3172..ae9f3a1b255 100644 --- a/doc/functions/trivial-builders.xml +++ b/doc/functions/trivial-builders.xml @@ -5,11 +5,7 @@ Trivial builders - Nixpkgs provides a couple of functions that help with building derivations. - The most important one, stdenv.mkDerivation, has already - been documented above. The following functions wrap - stdenv.mkDerivation, making it easier to use in certain - cases. + Nixpkgs provides a couple of functions that help with building derivations. The most important one, stdenv.mkDerivation, has already been documented above. The following functions wrap stdenv.mkDerivation, making it easier to use in certain cases. @@ -19,17 +15,7 @@ - This takes three arguments, name, - env, and buildCommand. - name is just the name that Nix will append to the store - path in the same way that stdenv.mkDerivation uses its - name attribute. env is an attribute - set specifying environment variables that will be set for this derivation. - These attributes are then passed to the wrapped - stdenv.mkDerivation. buildCommand - specifies the commands that will be run to create this derivation. Note - that you will need to create $out for Nix to register - the command as successful. + This takes three arguments, name, env, and buildCommand. name is just the name that Nix will append to the store path in the same way that stdenv.mkDerivation uses its name attribute. env is an attribute set specifying environment variables that will be set for this derivation. These attributes are then passed to the wrapped stdenv.mkDerivation. buildCommand specifies the commands that will be run to create this derivation. Note that you will need to create $out for Nix to register the command as successful. An example of using runCommand is provided below. @@ -62,10 +48,7 @@ - This works just like runCommand. The only difference is - that it also provides a C compiler in buildCommand’s - environment. To minimize your dependencies, you should only use this if - you are sure you will need a C compiler as part of running your command. + This works just like runCommand. The only difference is that it also provides a C compiler in buildCommand’s environment. To minimize your dependencies, you should only use this if you are sure you will need a C compiler as part of running your command. @@ -75,20 +58,10 @@ - These functions write text to the Nix store. This is - useful for creating scripts from Nix expressions. - writeTextFile takes an attribute set and expects two - arguments, name and text. - name corresponds to the name used in the Nix store - path. text will be the contents of the file. You can - also set executable to true to make this file have the - executable bit set. + These functions write text to the Nix store. This is useful for creating scripts from Nix expressions. writeTextFile takes an attribute set and expects two arguments, name and text. name corresponds to the name used in the Nix store path. text will be the contents of the file. You can also set executable to true to make this file have the executable bit set. - Many more commands wrap writeTextFile including - writeText, writeTextDir, - writeScript, and writeScriptBin. - These are convenience functions over writeTextFile. + Many more commands wrap writeTextFile including writeText, writeTextDir, writeScript, and writeScriptBin. These are convenience functions over writeTextFile. @@ -98,14 +71,7 @@ - This can be used to put many derivations into the same directory - structure. It works by creating a new derivation and adding symlinks to - each of the paths listed. It expects two arguments, - name, and paths. - name is the name used in the Nix store path for the - created derivation. paths is a list of paths that will - be symlinked. These paths can be to Nix store derivations or any other - subdirectory contained within. + This can be used to put many derivations into the same directory structure. It works by creating a new derivation and adding symlinks to each of the paths listed. It expects two arguments, name, and paths. name is the name used in the Nix store path for the created derivation. paths is a list of paths that will be symlinked. These paths can be to Nix store derivations or any other subdirectory contained within. -- cgit 1.4.1