Skip to content

Commit

Permalink
fix: cargo docs breaking in buildDepsOnly of workspaces (#410)
Browse files Browse the repository at this point in the history
  • Loading branch information
dpc authored Oct 4, 2023
1 parent 2e1d9a1 commit 0da36bc
Show file tree
Hide file tree
Showing 13 changed files with 8 additions and 1 deletion.
7 changes: 7 additions & 0 deletions checks/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -237,6 +237,13 @@ in
src = ./various-targets;
};

depsOnlyCargoDoc = myLib.buildDepsOnly {
src = ./workspace;
version = "0.0.1";
pname = "workspace";
buildPhaseCargoCommand = "cargo doc --workspace";
};

devShell = myLib.devShell {
checks = {
simple = myLib.buildPackage {
Expand Down
2 changes: 1 addition & 1 deletion lib/mkDummySrc.nix
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ let
'' + optionalString (trimmedCargoToml ? package) ''
# To build regular and dev dependencies (cargo build + cargo test)
${cpDummy parentDir "src/lib.rs"}
${cpDummy parentDir "src/bin/crane-dummy/main.rs"}
${cpDummy parentDir "src/bin/crane-dummy-${trimmedCargoToml.package.name or "no-name"}/main.rs"}
# Stub all other targets in case they have particular feature combinations
${safeStubLib}
Expand Down

0 comments on commit 0da36bc

Please sign in to comment.