nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{
2 lib,
3 stdenv,
4 rustPlatform,
5 fetchFromGitHub,
6 nix-update-script,
7 versionCheckHook,
8}:
9
10rustPlatform.buildRustPackage (finalAttrs: {
11 pname = "mdserve";
12 version = "0.5.1";
13
14 src = fetchFromGitHub {
15 owner = "jfernandez";
16 repo = "mdserve";
17 tag = "v${finalAttrs.version}";
18 hash = "sha256-tycFsE/jGh5OYD5ewv12vvOhhlbYtlvANk6BhDW38hw=";
19 };
20
21 cargoHash = "sha256-otEa6+IdKHJAT+lPptXgnP5yggTkB3uYfbGhSKTXodo=";
22
23 __darwinAllowLocalNetworking = true;
24
25 nativeInstallCheckInputs = [ versionCheckHook ];
26
27 checkFlags = lib.optionals stdenv.hostPlatform.isDarwin [
28 # times out on darwin during nixpkgs-review
29 "--skip=test_file_modification_updates_via_websocket"
30 ];
31
32 passthru.updateScript = nix-update-script { };
33
34 meta = {
35 description = "Fast markdown preview server with live reload and theme support";
36 homepage = "https://github.com/jfernandez/mdserve";
37 changelog = "https://github.com/jfernandez/mdserve/releases/tag/v${finalAttrs.version}";
38 license = lib.licenses.mit;
39 maintainers = with lib.maintainers; [
40 vinnymeller
41 matthiasbeyer
42 ];
43 mainProgram = "mdserve";
44 };
45})