1{ lib 2, buildPythonPackage 3, fetchFromGitHub 4, mdformat 5, python3 6, pythonOlder 7}: 8 9let 10 python = python3.override { 11 packageOverrides = self: super: { 12 mdit-py-plugins = super.mdit-py-plugins.overridePythonAttrs (_prev: rec { 13 version = "0.4.0"; 14 doCheck = false; 15 src = fetchFromGitHub { 16 owner = "executablebooks"; 17 repo = "mdit-py-plugins"; 18 rev = "refs/tags/v${version}"; 19 hash = "sha256-YBJu0vIOD747DrJLcqiZMHq34+gHdXeGLCw1OxxzIJ0="; 20 }; 21 }); 22 }; 23 }; 24in python.pkgs.buildPythonPackage rec { 25 pname = "mdformat-admon"; 26 version = "1.0.2"; 27 format = "pyproject"; 28 29 disabled = pythonOlder "3.7"; 30 31 src = fetchFromGitHub { 32 owner = "KyleKing"; 33 repo = pname; 34 rev = "v${version}"; 35 hash = "sha256-33Q3Re/axnoOHZ9XYA32mmK+efsSelJXW8sD7C1M/jU="; 36 }; 37 38 nativeBuildInputs = with python.pkgs; [ 39 flit-core 40 ]; 41 42 buildInputs = with python.pkgs; [ 43 mdformat 44 ]; 45 46 propagatedBuildInputs = with python.pkgs; [ 47 mdit-py-plugins 48 ]; 49 50 meta = with lib; { 51 description = "mdformat plugin for admonitions"; 52 homepage = "https://github.com/KyleKing/mdformat-admon"; 53 license = licenses.mit; 54 maintainers = with maintainers; [ aldoborrero ]; 55 }; 56}