nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{
2 lib,
3 rustPlatform,
4 fetchFromGitHub,
5 nix-update-script,
6 versionCheckHook,
7}:
8
9rustPlatform.buildRustPackage (finalAttrs: {
10 pname = "mdq";
11 version = "0.9.0";
12
13 src = fetchFromGitHub {
14 owner = "yshavit";
15 repo = "mdq";
16 tag = "v${finalAttrs.version}";
17 hash = "sha256-Ys5Ol/j4IZ4SNp6TjryfHCIgWoEu3ToNp7ffiTZp5BE=";
18 };
19
20 cargoHash = "sha256-fwFi/OYlTqRuDDE2TKuvf9T7u0hLyrDejhOwjFDYHAk=";
21
22 passthru.updateScript = nix-update-script { };
23
24 doInstallCheck = true;
25 nativeInstallCheckInputs = [ versionCheckHook ];
26
27 meta = {
28 description = "Like jq but for Markdown: find specific elements in a md doc";
29 homepage = "https://github.com/yshavit/mdq";
30 changelog = "https://github.com/yshavit/mdq/releases/tag/v${finalAttrs.version}";
31 license = with lib.licenses; [
32 mit
33 asl20
34 ];
35 maintainers = with lib.maintainers; [ DimitarNestorov ];
36 mainProgram = "mdq";
37 };
38})