about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--pkgs/development/python-modules/chai/default.nix16
-rw-r--r--pkgs/top-level/python-packages.nix14
2 files changed, 17 insertions, 13 deletions
diff --git a/pkgs/development/python-modules/chai/default.nix b/pkgs/development/python-modules/chai/default.nix
new file mode 100644
index 0000000000000..f5440004ebdb0
--- /dev/null
+++ b/pkgs/development/python-modules/chai/default.nix
@@ -0,0 +1,16 @@
+{ stdenv, buildPythonPackage, fetchPypi }:
+
+buildPythonPackage rec {
+  pname = "chai";
+  version = "1.1.1";
+  name = "${pname}-${version}";
+
+  src = fetchPypi {
+    inherit pname version;
+    sha256 = "016kf3irrclpkpvcm7q0gmkfibq7jgy30a9v73pp42bq9h9a32bl";
+  };
+
+  meta = with stdenv.lib; {
+    description = "Mocking, stubbing and spying framework for python";
+  };
+}
diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix
index 3d38ff7b2207d..0ab149f0f88e4 100644
--- a/pkgs/top-level/python-packages.nix
+++ b/pkgs/top-level/python-packages.nix
@@ -619,19 +619,7 @@ in {
 
   area53 = callPackage ../development/python-modules/area53 { };
 
-  chai = buildPythonPackage rec {
-    name = "chai-${version}";
-    version = "1.1.1";
-
-    src = pkgs.fetchurl {
-      url = "mirror://pypi/c/chai/${name}.tar.gz";
-      sha256 = "016kf3irrclpkpvcm7q0gmkfibq7jgy30a9v73pp42bq9h9a32bl";
-    };
-
-    meta = {
-      description = "Mocking, stubbing and spying framework for python";
-    };
-  };
+  chai = callPackage ../development/python-modules/chai { };
 
   chainmap = buildPythonPackage rec {
     name = "chainmap-1.0.2";