You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
I've tried setting up a Nix flake based on the Quick Start for a workspace, while also adding a private registry. The flake file is mostly the same as the quick start one, with the following line:
craneLib=crane.mkLibpkgs;
replaced with this, to enable a private registry (some parts redacted):
Where escapeShellArg is not successfully escaping the URL because the escaping rules for TOML are more restrictive than those for Bash.
By the way, it seems odd that name is evaluating to a URL, should it perhaps be evaluating to myrepo? One thing I noticed is that the myrepo name is never associated with its URL in the Nix flake, while it is in the native setup. I presume crane can infer that from the Cargo.lock file, but I'm not sure.
It may be worth noting is that the workspace is virtual, and I had to add this to the workspace Cargo.toml to get rid of a few warnings, as crane would not find the version from the individual crates:
[workspace.package]
version = "0.1.0"
It's also very possible that I simply made a mistake somewhere, as I'm quite new to Nix. If that's the case, then I think the error message could be improved.
Reproduction
I don't have a minimal setup for reproduction yet, because it involves owning and running a private registry, which is non-trivial (the flake fails at an earlier step if the registry is unreachable). I'll work on getting a minimal repro case working from scratch soon.
The text was updated successfully, but these errors were encountered:
Describe the bug
I've tried setting up a Nix flake based on the Quick Start for a workspace, while also adding a private registry. The flake file is mostly the same as the quick start one, with the following line:
replaced with this, to enable a private registry (some parts redacted):
The only other changes from the quick start example involve changing the package and crate names to match my workspace layout.
For reference, outside of Nix I normally just have this in my
~/.cargo/config.toml
:And a corresponding
credentials.toml
set up. The crate in the workspace refers to its dependency as:The private registry dependencies get pulled and compiled successfully, but I run into this error:
The
config.toml
in question looks like this:This seems broken to me - the colon in the URL is not allowed in a key name in TOML.
I think this is emitted by this line:
crane/lib/vendorCargoRegistries.nix
Line 127 in 7e4586b
Where
escapeShellArg
is not successfully escaping the URL because the escaping rules for TOML are more restrictive than those for Bash.By the way, it seems odd that
name
is evaluating to a URL, should it perhaps be evaluating tomyrepo
? One thing I noticed is that themyrepo
name is never associated with its URL in the Nix flake, while it is in the native setup. I presumecrane
can infer that from the Cargo.lock file, but I'm not sure.It may be worth noting is that the workspace is virtual, and I had to add this to the workspace
Cargo.toml
to get rid of a few warnings, ascrane
would not find the version from the individual crates:It's also very possible that I simply made a mistake somewhere, as I'm quite new to Nix. If that's the case, then I think the error message could be improved.
Reproduction
I don't have a minimal setup for reproduction yet, because it involves owning and running a private registry, which is non-trivial (the flake fails at an earlier step if the registry is unreachable). I'll work on getting a minimal repro case working from scratch soon.
The text was updated successfully, but these errors were encountered: