Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

helpers/mkResultWith

Low-level result check builder. Prefer mkResult for most use cases.

Produces a derivation with four outputs: out (sentinel), stdout, stderr, and exitCode. The command attribute is a shell script body whose stdout, stderr, and exit code are captured automatically. The derivation always exits successfully.

For full control over the build script, use buildCommand directly (bypasses capture wrapping).

If passthru.skip is true, delegates to mkSkip automatically.

Type

mkResultWith :: AttrSet -> Derivation

Arguments

attrs
Attribute set passed to stdenvNoCC.mkDerivation. Required keys: name and either command or buildCommand. All other mkDerivation keys are supported.

Example

mkResultWith {
  name = "result-my-check";
  nativeBuildInputs = [ pkgs.hello ];
  command = ''hello --greeting "hi"'';
}