1{
2 lib,
3 rustPlatform,
4 fetchCrate,
5 makeWrapper,
6 wasm-pack,
7}:
8
9rustPlatform.buildRustPackage rec {
10 pname = "perseus-cli";
11 version = "0.3.1";
12
13 src = fetchCrate {
14 inherit pname version;
15 hash = "sha256-IYjLx9/4oWSXa4jhOtGw1GOHmrR7LQ6bWyN5zbOuEFs=";
16 };
17
18 cargoHash = "sha256-9McjhdS6KrFgtWIaP0qKsUYpPxGQjNX7SM9gJ/aJGwc=";
19
20 nativeBuildInputs = [ makeWrapper ];
21
22 postInstall = ''
23 wrapProgram $out/bin/perseus \
24 --prefix PATH : "${lib.makeBinPath [ wasm-pack ]}"
25 '';
26
27 meta = with lib; {
28 homepage = "https://framesurge.sh/perseus/en-US";
29 description = "High-level web development framework for Rust with full support for server-side rendering and static generation";
30 maintainers = with maintainers; [ max-niederman ];
31 license = with licenses; [ mit ];
32 mainProgram = "perseus";
33 };
34}