nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{
2 lib,
3 buildPythonPackage,
4 fetchFromGitHub,
5
6 # build-system
7 flit-core,
8
9 # dependencies
10 mdformat,
11 mdit-py-plugins,
12 ruamel-yaml,
13
14 # tests
15 pytestCheckHook,
16}:
17
18buildPythonPackage (finalAttrs: {
19 pname = "mdformat-frontmatter";
20 version = "2.0.10";
21 pyproject = true;
22
23 src = fetchFromGitHub {
24 owner = "butler54";
25 repo = "mdformat-frontmatter";
26 tag = "v${finalAttrs.version}";
27 hash = "sha256-snW9L9vnRHjNchhWZ5sIrn1r4piEYJeKQwib/4rarOo=";
28 };
29
30 build-system = [ flit-core ];
31
32 dependencies = [
33 mdformat
34 mdit-py-plugins
35 ruamel-yaml
36 ];
37
38 pythonImportsCheck = [ "mdformat_frontmatter" ];
39
40 nativeCheckInputs = [
41 pytestCheckHook
42 ];
43
44 meta = {
45 description = "Mdformat plugin to ensure frontmatter is respected";
46 homepage = "https://github.com/butler54/mdformat-frontmatter";
47 changelog = "https://github.com/butler54/mdformat-frontmatter/blob/${finalAttrs.src.tag}/CHANGELOG.md";
48 license = lib.licenses.mit;
49 maintainers = with lib.maintainers; [
50 aldoborrero
51 polarmutex
52 ];
53 };
54})