Open flokli opened 11 months ago
This seems to be the sources for the workspace members of a workspace crate themselves.
https://github.com/ClementTsang/bottom is single-crate, and doesn't provoke this issue.
I assume we need to express the fetching for workspaces inside the Cargo.nix as well, similar to how it's done with non-workspaces:
"bottom" = rec {
crateName = "bottom";
version = "0.9.6";
edition = "2021";
crateBin = [
{
name = "btm";
path = "src/bin/main.rs";
requiredFeatures = [ ];
}
];
workspace_member = null;
src = pkgs.fetchgit {
url = "https://github.com/ClementTsang/bottom";
rev = "712a0036811d1ec1f676b2ba76fff4bf5cc5fa97";
sha256 = "1p12lay9haj4210am2f6d9mj0f7srmg7sm8pljns92a7xnrsp7zn";
};
authors = [
"Clement Tsang <cjhtsang@uwaterloo.ca>"
];
# ...
}
This is a continuation of https://github.com/nix-community/crate2nix/issues/291 - I finally ran into the issue I had, and it only shows up with some crates.
The
crate2nix source add git https://… --rev $rev; crate2nix generate
to package an external project mostly works. However, in some cases I can not just .gitignorecrate2nix-sources.nix
and thecrate2nix-sources
symlink, asCargo.nix
refers to sources from that symlink:This is with crate2nix master, 252ca6b353700650b8deaf76079708b833c11e54.