summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--pkgs/development/python-modules/pytest-flakes/default.nix25
-rw-r--r--pkgs/top-level/python-packages.nix23
2 files changed, 26 insertions, 22 deletions
diff --git a/pkgs/development/python-modules/pytest-flakes/default.nix b/pkgs/development/python-modules/pytest-flakes/default.nix
new file mode 100644
index 0000000000000..ce6ed5b110b96
--- /dev/null
+++ b/pkgs/development/python-modules/pytest-flakes/default.nix
@@ -0,0 +1,25 @@
+{ stdenv, buildPythonPackage, fetchPypi
+, pytestpep8, pytest, pyflakes, pytestcache }:
+
+buildPythonPackage rec {
+  pname = "pytest-flakes";
+  version = "1.0.1";
+
+  src = fetchPypi {
+    inherit pname version;
+    sha256 = "0flag3n33kbhyjrhzmq990rvg4yb8hhhl0i48q9hw0ll89jp28lw";
+  };
+
+  buildInputs = [ pytestpep8 pytest ];
+  propagatedBuildInputs = [ pyflakes pytestcache ];
+
+  checkPhase = ''
+    py.test test_flakes.py
+  '';
+
+  meta = with stdenv.lib; {
+    license = licenses.mit;
+    homepage = https://pypi.python.org/pypi/pytest-flakes;
+    description = "pytest plugin to check source code with pyflakes";
+  };
+}
diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix
index 9b8e13d0288d3..47691529ef2b6 100644
--- a/pkgs/top-level/python-packages.nix
+++ b/pkgs/top-level/python-packages.nix
@@ -1932,28 +1932,7 @@ in {
 
   pytest-flake8 = callPackage ../development/python-modules/pytest-flake8 { };
 
-  pytestflakes = buildPythonPackage rec {
-    name = "pytest-flakes-${version}";
-    version = "1.0.1";
-
-    src = pkgs.fetchurl {
-      url = "mirror://pypi/p/pytest-flakes/${name}.tar.gz";
-      sha256 = "9c2271654294020e134624020a2144cb93b7334809d70fb3f470cd31ec788a3a";
-    };
-
-    buildInputs = with self; [ pytestpep8 pytest ];
-    propagatedBuildInputs = with self; [ pyflakes pytestcache ];
-
-    checkPhase = ''
-      py.test test_flakes.py
-    '';
-
-    meta = {
-      license = licenses.mit;
-      homepage = "https://pypi.python.org/pypi/pytest-flakes";
-      description = "pytest plugin to check source code with pyflakes";
-    };
-  };
+  pytestflakes = callPackage ../development/python-modules/pytest-flakes { };
 
   pytest-mock = callPackage ../development/python-modules/pytest-mock { };