Closed benwis closed 1 year ago
Ah this error is from an unfortunate interaction of multiple things...
Basically apps
/nix run
assumes that the name of the binary to run happens to be the same as the pname
of the derivation itself.
Crane will try to set pname
by peeking at the root Cargo.toml, but if it doesn't contain a package
definition it will default to "cargo-package" as you can see in the error.
The easiest way to fix this is to set pname = "...";
explicitly in buildPackage
and substitute the name of the actual binary that will run.
Hope this helps!
Ah, that makes sense! And it works, thanks for the insight.
Glad to help! Thanks for reporting this too, btw, I think I should revisit that default pname
selection behavior (or at least have it be more noisy) so stuff like this isn't so opaque to anyone working with it for the first time...
I'll leave the issue open to track making some improvements there!
At the risk of looking silly again, I was able to get this to build fine, but I cannot get it to run with
nix-run .
It keeps giving this error:
If I look in that directory, the vidette package is in there, and the Nix docs suggest apps.default or packages.default should set it.