about summary refs log tree commit diff
path: root/pkgs/development/python-modules/dockerfile-parse
diff options
context:
space:
mode:
authorFabian Affolter <mail@fabian-affolter.ch>2022-04-27 23:55:39 +0200
committerFabian Affolter <mail@fabian-affolter.ch>2022-04-27 23:55:39 +0200
commitecc571b84de4f109995ad5ddf45b2c65a815e5f5 (patch)
treefc5bc0412919316eec4dc26d15c6a5c0e67519c8 /pkgs/development/python-modules/dockerfile-parse
parent1ac9ac82f2a59f09ac7aa7aeb48521de07b3a163 (diff)
python3Packages.dockerfile-parse: switch to pytestCheckHook
Diffstat (limited to 'pkgs/development/python-modules/dockerfile-parse')
-rw-r--r--pkgs/development/python-modules/dockerfile-parse/default.nix36
1 files changed, 27 insertions, 9 deletions
diff --git a/pkgs/development/python-modules/dockerfile-parse/default.nix b/pkgs/development/python-modules/dockerfile-parse/default.nix
index e9a31b461fd6e..55ff20803b26c 100644
--- a/pkgs/development/python-modules/dockerfile-parse/default.nix
+++ b/pkgs/development/python-modules/dockerfile-parse/default.nix
@@ -1,24 +1,42 @@
-{ lib, buildPythonPackage, fetchPypi, six, pytest-cov, pytest }:
+{ lib
+, buildPythonPackage
+, fetchPypi
+, six
+, pytestCheckHook
+, pythonOlder
+}:
 
 buildPythonPackage rec {
-  version = "1.2.0";
   pname = "dockerfile-parse";
+  version = "1.2.0";
+  format = "setuptools";
+
+  disabled = pythonOlder "3.7";
 
   src = fetchPypi {
     inherit pname version;
-    sha256 = "07e65eec313978e877da819855870b3ae47f3fac94a40a965b9ede10484dacc5";
+    hash = "sha256-B+Ze7DE5eOh32oGYVYcLOuR/P6yUpAqWW57eEEhNrMU=";
   };
 
-  postPatch = ''
-    echo " " > tests/requirements.txt \
-  '';
+  propagatedBuildInputs = [
+    six
+  ];
+
+  checkInputs = [
+    pytestCheckHook
+  ];
 
-  propagatedBuildInputs = [ six ];
+  pythonImportsCheck = [
+    "dockerfile_parse"
+  ];
 
-  checkInputs = [ pytest-cov pytest ];
+  disabledTests = [
+    # python-dockerfile-parse.spec is not present
+    "test_all_versions_match"
+  ];
 
   meta = with lib; {
-    description = "Python library for parsing Dockerfile files";
+    description = "Library for parsing Dockerfile files";
     homepage = "https://github.com/DBuildService/dockerfile-parse";
     license = licenses.bsd3;
     maintainers = with maintainers; [ leenaars ];