lorri
lorri copied to clipboard
Better error message if a `buildInput` is not a drv
When I you lorri init
and add a packageset to the buildInputs
instead of a drv
, e.g. pkgs.eclipses
, the resulting error message is very bad:
{ pkgs ? import <nixpkgs> {} }:
pkgs.mkShell {
buildInputs = [
pkgs.hello
pkgs.eclipses
];
}
=>
…
LogLine("error: cannot coerce a set to a string, at /home/philip/.cache/lorri/cas/3a83fbad2f114b4f4f431db2014c985c:40:7"), LogLine("(use \'--show-trace\' to show detailed location information)")] } })
It comes out of our own nix file, so I’m pretty certain we can add a check that throws a better error message.
You'll want to do this for at least nativeBuildInputs
.
buildInputs
isn't quite suitable for developer tools, build tools and such. Such a shell will break with strictDeps
.