Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ lib 2, stdenv 3, rustPlatform 4, fetchCrate 5, makeWrapper 6, wasm-pack 7, CoreServices 8}: 9 10rustPlatform.buildRustPackage rec { 11 pname = "perseus-cli"; 12 version = "0.3.1"; 13 14 src = fetchCrate { 15 inherit pname version; 16 sha256 = "sha256-IYjLx9/4oWSXa4jhOtGw1GOHmrR7LQ6bWyN5zbOuEFs="; 17 }; 18 19 cargoSha256 = "sha256-i7MPmO9MoANZLzmR5gsD+v0gyDtFbzhsmE9xOsb88L0="; 20 21 nativeBuildInputs = [ makeWrapper ]; 22 buildInputs = lib.optionals stdenv.isDarwin [ CoreServices ]; 23 24 postInstall = '' 25 wrapProgram $out/bin/perseus \ 26 --prefix PATH : "${lib.makeBinPath [ wasm-pack ]}" 27 ''; 28 29 meta = with lib; { 30 homepage = "https://arctic-hen7.github.io/perseus"; 31 description = "A high-level web development framework for Rust with full support for server-side rendering and static generation"; 32 maintainers = with maintainers; [ max-niederman ]; 33 license = with licenses; [ mit ]; 34 mainProgram = "perseus"; 35 }; 36}