1{ lib
2, buildPythonPackage
3, fetchFromGitHub
4, mdformat
5, poetry-core
6, pythonOlder
7}:
8
9buildPythonPackage rec {
10 pname = "mdformat-nix-alejandra";
11 version = "0.1.0";
12 format = "pyproject";
13
14 disabled = pythonOlder "3.7";
15
16 src = fetchFromGitHub {
17 owner = "aldoborrero";
18 repo = pname;
19 rev = "${version}";
20 hash = "sha256-jUXApGsxCA+pRm4m4ZiHWlxmVkqCPx3A46oQdtyKz5g=";
21 };
22
23 nativeBuildInputs = [
24 poetry-core
25 ];
26
27 buildInputs = [
28 mdformat
29 ];
30
31 pythonImportsCheck = [
32 "mdformat_nix_alejandra"
33 ];
34
35 meta = with lib; {
36 description = "Mdformat plugin format Nix code blocks with alejandra";
37 homepage = "https://github.com/aldoborrero/mdformat-nix-alejandra";
38 license = licenses.mit;
39 maintainers = with maintainers; [ aldoborrero ];
40 };
41}