blob: b94116833104e37861148a23b11c76ffc741d5d7 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
|
{
lib,
fetchFromGitHub,
rustPlatform,
installShellFiles,
gitMinimal,
stdenv,
versionCheckHook,
nix-update-script,
}:
rustPlatform.buildRustPackage (finalAttrs: {
pname = "rumdl";
version = "0.2.64";
__structuredAttrs = true;
src = fetchFromGitHub {
owner = "rvben";
repo = "rumdl";
tag = "v${finalAttrs.version}";
hash = "sha256-Y/G50woA477wh7pUVuCrcm9h4JEufT6bI3x5uRwupzw=";
};
cargoHash = "sha256-cKBBhhz0mqaSXy57CKhYQ9tWzRPUs05HpxdvqZ676eA=";
cargoBuildFlags = [
"--bin=rumdl"
];
nativeBuildInputs = [
installShellFiles
];
nativeCheckInputs = [
gitMinimal
];
__darwinAllowLocalNetworking = true;
useNextest = true;
cargoTestFlags = [
"--lib"
# Prefer the "smoke" profile over "ci" to exclude flaky tests: https://github.com/rvben/rumdl/pull/341
"--profile"
"smoke"
];
postInstall = lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) ''
installShellCompletion --cmd rumdl \
--bash <("$out/bin/rumdl" completions bash) \
--fish <("$out/bin/rumdl" completions fish) \
--zsh <("$out/bin/rumdl" completions zsh)
'';
doInstallCheck = true;
nativeInstallCheckInputs = [
versionCheckHook
];
passthru = {
updateScript = nix-update-script { };
};
meta = {
description = "Markdown linter and formatter";
longDescription = ''
rumdl is a high-performance Markdown linter and formatter
that helps ensure consistency and best practices in your Markdown files.
'';
homepage = "https://github.com/rvben/rumdl";
changelog = "https://github.com/rvben/rumdl/blob/v${finalAttrs.version}/CHANGELOG.md";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [
kachick
hasnep
faukah
];
mainProgram = "rumdl";
platforms = with lib.platforms; unix ++ windows;
};
})
|