about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--pkgs/development/python-modules/uncertainties/default.nix24
-rw-r--r--pkgs/top-level/python-packages.nix22
2 files changed, 25 insertions, 21 deletions
diff --git a/pkgs/development/python-modules/uncertainties/default.nix b/pkgs/development/python-modules/uncertainties/default.nix
new file mode 100644
index 0000000000000..a0aa147894480
--- /dev/null
+++ b/pkgs/development/python-modules/uncertainties/default.nix
@@ -0,0 +1,24 @@
+{ stdenv, fetchPypi, buildPythonPackage, nose, numpy }:
+
+buildPythonPackage rec {
+  name = "${pname}-${version}";
+  pname = "uncertainties";
+  version = "3.0.1";
+
+  src = fetchPypi {
+    inherit pname version;
+    sha256 = "de0765cac6911e5afa93ee941063a07b4a98dbd9c314c5eea4ab14bfff0054a4";
+  };
+
+  buildInputs = [ nose numpy ];
+
+  # No tests included
+  doCheck = false;
+
+  meta = with stdenv.lib; {
+    homepage = "http://pythonhosted.org/uncertainties/";
+    description = "Transparent calculations with uncertainties on the quantities involved (aka error propagation)";
+    maintainer = with maintainers; [ rnhmjoj ];
+    license = licenses.bsd3;
+  };
+}
diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix
index c146ea70b2c6b..958f730b61d5c 100644
--- a/pkgs/top-level/python-packages.nix
+++ b/pkgs/top-level/python-packages.nix
@@ -28148,27 +28148,7 @@ EOF
   };
 
 
-  uncertainties = buildPythonPackage rec {
-    name = "uncertainties-${version}";
-    version = "3.0.1";
-
-    src = pkgs.fetchurl {
-       url = "mirror://pypi/u/uncertainties/${name}.tar.gz";
-       sha256 = "de0765cac6911e5afa93ee941063a07b4a98dbd9c314c5eea4ab14bfff0054a4";
-    };
-
-    buildInputs = with self; [ nose numpy ];
-
-    meta = {
-      homepage = "http://pythonhosted.org/uncertainties/";
-      description = "Transparent calculations with uncertainties on the quantities involved (aka error propagation)";
-      license = licenses.bsd3;
-    };
-
-    # No tests included
-    doCheck = false;
-  };
-
+  uncertainties = callPackage ../development/python-modules/uncertainties { };
 
   funcy = buildPythonPackage rec {
     name = "funcy-1.6";