Similar to the colocated `substituteAll` script and derivation, this
PR adds nix-level support for `substitute` directly. This is useful,
for instance, to be able to easily make tweaks to patch files for an
existing derivation's existing patch files.
This is a standard environment that doesn't contain a C/C++
compiler. This is mostly to prevent trivial builders like runCommand
and substituteAll from pulling in gcc for simple configuration changes
on NixOS.
* Removed substitute, it's part of the generic builder now.
* stdenv-initial (Linux): use the real generic builder script. This
does require that sed is in the path of the builder of the initial
stdenv.
svn path=/nixpkgs/trunk/; revision=7498
* If the environment variable buildCommand is set, then eval that
instead of doing the build phases. This is used by the runCommand
function in all-packages.nix to allow one-lines like
foo = runCommand "foo" {} "mkdir $out; echo foo > $out/foo";
svn path=/nixpkgs/trunk/; revision=7298
`@var@' in the file `src', writing the result to $out, where `var'
is any environment variable starting with a lowercase character.
Example:
genericSubstituter {
src = ./file;
foo = "bla";
shell = bash + "/bin/sh";
};
will replace `@foo@' with `bla' and `@shell@' with
`/nix/store/...-bash-.../bin/sh'.
svn path=/nixpkgs/trunk/; revision=6928
files easier. Examples:
substitute inputFile outputFile \
--replace "@bindir@" "$out/bin" \
--replace "@gcc@" "$GCC/bin/gcc"
substitute inputFile outputFile --subst-var out
(this is sugar for --replace "@out@" "$out")
substituteInPlace file --replace a b
(input and output are both `file'; the execute bit is preserved)
svn path=/nixpkgs/trunk/; revision=2239