Skip to content

Commit 635c44c

Browse files
mdq: init at 0.3.1
1 parent 30a951f commit 635c44c

File tree

1 file changed

+40
-0
lines changed

1 file changed

+40
-0
lines changed

pkgs/by-name/md/mdq/package.nix

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
{
2+
lib,
3+
rustPlatform,
4+
fetchFromGitHub,
5+
nix-update-script,
6+
versionCheckHook,
7+
}:
8+
9+
rustPlatform.buildRustPackage (finalAttrs: {
10+
pname = "mdq";
11+
version = "0.3.1";
12+
13+
src = fetchFromGitHub {
14+
owner = "yshavit";
15+
repo = "mdq";
16+
tag = "v${finalAttrs.version}";
17+
hash = "sha256-IMDyPIuG5Zyp323XYsFcFo0yNimCm2DV9rY+Ac0DiZo=";
18+
};
19+
20+
useFetchCargoVendor = true;
21+
cargoHash = "sha256-GxQ9YyofalnIP3EtGVpIpg7s8QW2d1Z/gFF2CUBg1P0=";
22+
23+
passthru.updateScript = nix-update-script { };
24+
25+
doInstallCheck = true;
26+
nativeInstallCheckInputs = [ versionCheckHook ];
27+
versionCheckProgramArg = "--version";
28+
29+
meta = {
30+
description = "Like jq but for Markdown: find specific elements in a md doc";
31+
homepage = "https://github.com/yshavit/mdq";
32+
changelog = "https://github.com/yshavit/mdq/releases/tag/v${finalAttrs.version}";
33+
license = with lib.licenses; [
34+
mit
35+
asl20
36+
];
37+
maintainers = with lib.maintainers; [ DimitarNestorov ];
38+
mainProgram = "mdq";
39+
};
40+
})

0 commit comments

Comments
 (0)