Skip to content

Commit

Permalink
feat(docs): add cargo doc package
Browse files Browse the repository at this point in the history
  • Loading branch information
tsandrini committed Jul 28, 2024
1 parent e61127c commit b613e94
Showing 1 changed file with 28 additions and 0 deletions.
28 changes: 28 additions & 0 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,34 @@
in
pkgs.callPackage package { inherit tsandrini; };

docs =
let
package =
{
lib,
rustPlatform,
builder,
}:
rustPlatform.buildRustPackage {
inherit (builder) src unpackPhase version;
name = "${builder.name}-docs";

cargoSha256 = "sha256-Jsha+Aoe5R6g4H7KNX2VX62S+NGj1SrobeCakjgFw24=";

doCheck = false;

buildPhase = ''
cargo doc --no-deps --release
'';

meta = builder.meta // {
description = "Documentation for ${builder.meta.description}";
mainProgram = null;
};
};
in
pkgs.callPackage package { inherit builder; };

flake-parts =
let
package =
Expand Down

0 comments on commit b613e94

Please sign in to comment.