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