about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/python-modules/mdformat-admon/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/development/python-modules/mdformat-admon/default.nix')
-rw-r--r--nixpkgs/pkgs/development/python-modules/mdformat-admon/default.nix38
1 files changed, 13 insertions, 25 deletions
diff --git a/nixpkgs/pkgs/development/python-modules/mdformat-admon/default.nix b/nixpkgs/pkgs/development/python-modules/mdformat-admon/default.nix
index a7fd0f940373..3db893042d88 100644
--- a/nixpkgs/pkgs/development/python-modules/mdformat-admon/default.nix
+++ b/nixpkgs/pkgs/development/python-modules/mdformat-admon/default.nix
@@ -1,54 +1,42 @@
 { lib
 , buildPythonPackage
 , fetchFromGitHub
+, flit-core
 , mdformat
-, python3
+, mdit-py-plugins
+, pytestCheckHook
 , pythonOlder
 }:
 
-let
-  python = python3.override {
-    packageOverrides = self: super: {
-      mdit-py-plugins = super.mdit-py-plugins.overridePythonAttrs (_prev: rec {
-      version = "0.4.0";
-      doCheck = false;
-      src = fetchFromGitHub {
-        owner = "executablebooks";
-        repo = "mdit-py-plugins";
-        rev = "refs/tags/v${version}";
-        hash = "sha256-YBJu0vIOD747DrJLcqiZMHq34+gHdXeGLCw1OxxzIJ0=";
-      };
-    });
-    };
-  };
-in python.pkgs.buildPythonPackage rec {
+buildPythonPackage rec {
   pname = "mdformat-admon";
   version = "1.0.2";
-  format = "pyproject";
+  pyproject = true;
 
-  disabled = pythonOlder "3.7";
+  disabled = pythonOlder "3.8";
 
   src = fetchFromGitHub {
     owner = "KyleKing";
-    repo = pname;
+    repo = "mdformat-admon";
     rev = "v${version}";
     hash = "sha256-33Q3Re/axnoOHZ9XYA32mmK+efsSelJXW8sD7C1M/jU=";
   };
 
-  nativeBuildInputs = with python.pkgs; [
+  nativeBuildInputs = [
     flit-core
   ];
 
-  buildInputs = with python.pkgs; [
+  propagatedBuildInputs = [
     mdformat
+    mdit-py-plugins
   ];
 
-  propagatedBuildInputs = with python.pkgs; [
-    mdit-py-plugins
+  nativeCheckInputs = [
+    pytestCheckHook
   ];
 
   meta = with lib; {
-    description = "mdformat plugin for admonitions";
+    description = "Mdformat plugin for admonitions";
     homepage = "https://github.com/KyleKing/mdformat-admon";
     license = licenses.mit;
     maintainers = with maintainers; [ aldoborrero ];