query
On this page

placeholder

lib.placeholder

Primop
Docs pulled from | This Revision | 18 minutes ago


Nix manual

Takes 1 arguments

output

Return an output placeholder string for the specified output that will be substituted by the corresponding output path at build time.

Typical outputs would be "out", "bin" or "dev".

Noogle detected

Aliases

Detected Type
placeholder :: String -> String

Implementation

This function is implemented in c++ and is part of the native nix runtime.

src/libexpr/primops.cc:1880

static void prim_placeholder(EvalState & state, const PosIdx pos, Value ** args, Value & v)
{
    v.mkString(
        hashPlaceholder(state.forceStringNoCtx(
            *args[0], pos, "while evaluating the first argument passed to builtins.placeholder")),
        state.mem);
}