summary refs log tree commit diff
path: root/pkgs/development/python-modules/flake8-polyfill/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/development/python-modules/flake8-polyfill/default.nix')
-rw-r--r--pkgs/development/python-modules/flake8-polyfill/default.nix40
1 files changed, 40 insertions, 0 deletions
diff --git a/pkgs/development/python-modules/flake8-polyfill/default.nix b/pkgs/development/python-modules/flake8-polyfill/default.nix
new file mode 100644
index 00000000000..070e6997010
--- /dev/null
+++ b/pkgs/development/python-modules/flake8-polyfill/default.nix
@@ -0,0 +1,40 @@
+{ lib, fetchPypi, buildPythonPackage
+, flake8
+, mock, pep8, pytest }:
+
+buildPythonPackage rec {
+  pname = "flake8-polyfill";
+  version = "1.0.2";
+
+  src = fetchPypi {
+    inherit pname version;
+    sha256 = "1nlf1mkqw856vi6782qcglqhaacb23khk9wkcgn55npnjxshhjz4";
+  };
+
+  postPatch = ''
+    # Failed: [pytest] section in setup.cfg files is no longer supported, change to [tool:pytest] instead.
+    substituteInPlace setup.cfg \
+      --replace pytest 'tool:pytest'
+  '';
+
+  propagatedBuildInputs = [
+    flake8
+  ];
+
+  checkInputs = [
+    mock
+    pep8
+    pytest
+  ];
+
+  checkPhase = ''
+    pytest tests
+  '';
+
+  meta = with lib; {
+    homepage = https://gitlab.com/pycqa/flake8-polyfill;
+    description = "Polyfill package for Flake8 plugins";
+    license = licenses.mit;
+    maintainers = with maintainers; [ eadwu ];
+  };
+}