Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ lib, stdenv, fetchFromGitHub, nix, rustPlatform, CoreServices }: 2 3rustPlatform.buildRustPackage rec { 4 pname = "mdbook"; 5 version = "0.4.29"; 6 7 src = fetchFromGitHub { 8 owner = "rust-lang"; 9 repo = "mdBook"; 10 rev = "refs/tags/v${version}"; 11 sha256 = "sha256-81QU1FJ5f23OdS+bzMnHEMbwwzywU38Xoq3DEN0Kgpg="; 12 }; 13 14 cargoHash = "sha256-SyDLC2x1hEyjt+GG50CblTGahJAkEZWkXSPyPvUJNgw="; 15 16 buildInputs = lib.optionals stdenv.isDarwin [ CoreServices ]; 17 18 passthru = { 19 tests = { 20 inherit nix; 21 }; 22 }; 23 24 meta = with lib; { 25 description = "Create books from MarkDown"; 26 homepage = "https://github.com/rust-lang/mdBook"; 27 changelog = "https://github.com/rust-lang/mdBook/blob/v${version}/CHANGELOG.md"; 28 license = [ licenses.mpl20 ]; 29 maintainers = with maintainers; [ havvy Frostman ]; 30 }; 31}