Files
nixpkgs/pkgs/by-name/ma/mado/package.nix
Dark Steveneq 646b892680
Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
push sheeet
2025-10-09 14:15:47 +02:00

63 lines
1.5 KiB
Nix

{
lib,
rustPlatform,
fetchFromGitHub,
pkg-config,
installShellFiles,
oniguruma,
rust-jemalloc-sys,
stdenv,
}:
rustPlatform.buildRustPackage (finalAttrs: {
pname = "mado";
version = "0.3.0";
src = fetchFromGitHub {
owner = "akiomik";
repo = "mado";
tag = "v${finalAttrs.version}";
hash = "sha256-wAuV4w0dKfUbJVLTdp59/u4y13SPy3wkRfTlpvyE/zY=";
};
cargoHash = "sha256-fkalUnPkjjzhLaACh+WQP4tG5VzZ7wmrh5T1DVgSDwM=";
nativeBuildInputs = [
pkg-config
installShellFiles
];
buildInputs = [
oniguruma
rust-jemalloc-sys
];
env = {
RUSTONIG_SYSTEM_LIBONIG = true;
};
postInstall = lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) ''
installShellCompletion --cmd mado \
--bash <($out/bin/mado generate-shell-completion bash) \
--zsh <($out/bin/mado generate-shell-completion zsh) \
--fish <($out/bin/mado generate-shell-completion fish)
'';
checkFlags = [
# # seem to be slightly broken inside of the build sandbox
"--skip=check_empty_stdin_with_file"
"--skip=check_stdin"
"--skip=check_stdin_with_file"
"--skip=generate_shell_completion_invalid"
"--skip=unknown_command"
];
meta = {
description = "Markdown linter written in Rust";
homepage = "https://github.com/akiomik/mado";
changelog = "https://github.com/akiomik/mado/blob/v${finalAttrs.version}/CHANGELOG.md";
license = lib.licenses.asl20;
maintainers = with lib.maintainers; [ jasonxue1 ];
mainProgram = "mado";
};
})