Skip to content

Instantly share code, notes, and snippets.

@grahamc
Created October 17, 2018 17:41
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save grahamc/f1ffb71edcb0e5d6214bac201c67cc51 to your computer and use it in GitHub Desktop.
Save grahamc/f1ffb71edcb0e5d6214bac201c67cc51 to your computer and use it in GitHub Desktop.
-------- Doc test execution failure --------
ID: function-library-lib.attrsets.getOutput-example
Evaluating the Nix expression:
{
actual = let
lib = import /home/grahamc/projects/nixpkgs/lib;
context = (
{
pkgs.hello = {
outputUnspecified = true;
dev = "/nix/store/10000000000000000000000000000000-hello-2.10-dev";
};
}
);
in with context; (
lib.attrsets.getOutput "dev" pkgs.hello
);
expect = (
"/nix/store/00000000000000000000000000000000-hello-2.10-dev
);
}
with the following command failed with exit code 1:
nix-instantiate --eval --json --strict -E '
{
actual = let
lib = import /home/grahamc/projects/nixpkgs/lib;
context = (
{
pkgs.hello = {
outputUnspecified = true;
dev = "/nix/store/10000000000000000000000000000000-hello-2.10-dev";
};
}
);
in with context; (
lib.attrsets.getOutput "dev" pkgs.hello
);
expect = (
"/nix/store/00000000000000000000000000000000-hello-2.10-dev
);
}
'
and the command printed:
error: syntax error, unexpected $end, expecting '"', at (string):20:16
9 passed, 1 failed
Retry failing examples with:
./functions/library/test.py --lib-dir /home/grahamc/projects/nixpkgs/lib function-library-lib.attrsets.getOutput-example
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment