summary refs log tree commit diff
diff options
context:
space:
mode:
authorwisut hantanong <wizzup@gmail.com>2017-07-14 19:34:28 +0700
committerJörg Thalheim <joerg@thalheim.io>2017-07-15 17:40:54 +0100
commit85239d1455c0a19b083a4ec9245a5acda4eb5d44 (patch)
tree15b7725ac2d874ccf7d2763ad3da413153d7c272
parent2d546a98e2d70e7a7836b038102f48f55f674b98 (diff)
downloadnixlib-85239d1455c0a19b083a4ec9245a5acda4eb5d44.tar
nixlib-85239d1455c0a19b083a4ec9245a5acda4eb5d44.tar.gz
nixlib-85239d1455c0a19b083a4ec9245a5acda4eb5d44.tar.bz2
nixlib-85239d1455c0a19b083a4ec9245a5acda4eb5d44.tar.lz
nixlib-85239d1455c0a19b083a4ec9245a5acda4eb5d44.tar.xz
nixlib-85239d1455c0a19b083a4ec9245a5acda4eb5d44.tar.zst
nixlib-85239d1455c0a19b083a4ec9245a5acda4eb5d44.zip
python.pkgs.ansicolor: move to separate expression
-rw-r--r--pkgs/development/python-modules/ansicolor/default.nix19
-rw-r--r--pkgs/top-level/python-packages.nix17
2 files changed, 20 insertions, 16 deletions
diff --git a/pkgs/development/python-modules/ansicolor/default.nix b/pkgs/development/python-modules/ansicolor/default.nix
new file mode 100644
index 000000000000..3a45811ed9b3
--- /dev/null
+++ b/pkgs/development/python-modules/ansicolor/default.nix
@@ -0,0 +1,19 @@
+{ stdenv, buildPythonPackage, fetchPypi }:
+
+buildPythonPackage rec {
+  pname = "ansicolor";
+  version = "0.2.4";
+  name = "${pname}-${version}";
+
+  src = fetchPypi {
+    inherit pname version;
+    sha256 = "0zlkk9706xn5yshwzdn8xsfkim8iv44zsl6qjwg2f4gn62rqky1h";
+  };
+
+  meta = with stdenv.lib; {
+    homepage = "https://github.com/numerodix/ansicolor/";
+    description = "A library to produce ansi color output and colored highlighting and diffing";
+    license = licenses.asl20;
+    maintainers = with maintainers; [ andsild ];
+  };
+}
diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix
index b426fdaefc96..e5060cac8537 100644
--- a/pkgs/top-level/python-packages.nix
+++ b/pkgs/top-level/python-packages.nix
@@ -100,22 +100,7 @@ in {
 
   agate-sql = callPackage ../development/python-modules/agate-sql { };
 
-  ansicolor = buildPythonPackage rec {
-    name = "ansicolor-${version}";
-    version = "0.2.4";
-
-    src = pkgs.fetchurl{
-      url = "mirror://pypi/a/ansicolor/${name}.tar.gz";
-      sha256 = "0zlkk9706xn5yshwzdn8xsfkim8iv44zsl6qjwg2f4gn62rqky1h";
-    };
-
-    meta = {
-      homepage = "https://github.com/numerodix/ansicolor/";
-      description = "A library to produce ansi color output and colored highlighting and diffing";
-      license = licenses.asl20;
-      maintainers = with maintainers; [ andsild ];
-    };
-  };
+  ansicolor = callPackage ../development/python-modules/ansicolor { };
 
   asn1crypto = callPackage ../development/python-modules/asn1crypto { };