about summary refs log tree commit diff
diff options
context:
space:
mode:
authorChris Ostrouchov <chris.ostrouchov@gmail.com>2018-10-15 16:12:58 -0400
committerFrederik Rietdijk <fridh@fridh.nl>2018-10-17 07:46:56 +0200
commit1504902b9406aa61d04886f3746370a7538f3129 (patch)
treecf4ec253613332229d786586d384bb0aaaf3e934
parentb0e0dd399b92cd1a1e578b5b638a1dec8910cd63 (diff)
downloadnixlib-1504902b9406aa61d04886f3746370a7538f3129.tar
nixlib-1504902b9406aa61d04886f3746370a7538f3129.tar.gz
nixlib-1504902b9406aa61d04886f3746370a7538f3129.tar.bz2
nixlib-1504902b9406aa61d04886f3746370a7538f3129.tar.lz
nixlib-1504902b9406aa61d04886f3746370a7538f3129.tar.xz
nixlib-1504902b9406aa61d04886f3746370a7538f3129.tar.zst
nixlib-1504902b9406aa61d04886f3746370a7538f3129.zip
pythonPackages.gcutil: refactor fix broken move to python-modules
-rw-r--r--pkgs/development/python-modules/gcutil/default.nix41
-rw-r--r--pkgs/top-level/python-packages.nix33
2 files changed, 42 insertions, 32 deletions
diff --git a/pkgs/development/python-modules/gcutil/default.nix b/pkgs/development/python-modules/gcutil/default.nix
new file mode 100644
index 000000000000..85c0fbb4d609
--- /dev/null
+++ b/pkgs/development/python-modules/gcutil/default.nix
@@ -0,0 +1,41 @@
+{ stdenv
+, buildPythonPackage
+, fetchurl
+, gflags
+, iso8601
+, ipaddr
+, httplib2
+, google_apputils
+, google_api_python_client
+, isPy3k
+}:
+
+buildPythonPackage rec {
+  name = "gcutil-1.16.1";
+  disabled = isPy3k;
+
+  src = fetchurl {
+    url = https://dl.google.com/dl/cloudsdk/release/artifacts/gcutil-1.16.1.tar.gz;
+    sha256 = "00jaf7x1ji9y46fbkww2sg6r6almrqfsprydz3q2swr4jrnrsx9x";
+  };
+
+  propagatedBuildInputs = [ gflags iso8601 ipaddr httplib2 google_apputils google_api_python_client ];
+
+  prePatch = ''
+    sed -i -e "s|google-apputils==0.4.0|google-apputils==0.4.1|g" setup.py
+    substituteInPlace setup.py \
+      --replace "httplib2==0.8" "httplib2" \
+      --replace "iso8601==0.1.4" "iso8601" \
+      --replace "ipaddr==2.1.10" "ipaddr" \
+      --replace "google-api-python-client==1.2" "google-api-python-client" \
+      --replace "python-gflags==2.0" "python-gflags"
+  '';
+
+  meta = with stdenv.lib; {
+    description = "Command-line tool for interacting with Google Compute Engine";
+    homepage = "https://cloud.google.com/compute/docs/gcutil/";
+    license = licenses.asl20;
+    maintainers = with maintainers; [ phreedom ];
+  };
+
+}
diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix
index 8eab8cd96ecf..4b5373ed87ee 100644
--- a/pkgs/top-level/python-packages.nix
+++ b/pkgs/top-level/python-packages.nix
@@ -1804,38 +1804,7 @@ in {
 
   gateone = callPackage ../development/python-modules/gateone { };
 
-  gcutil = buildPythonPackage rec {
-    name = "gcutil-1.16.1";
-
-    src = pkgs.fetchurl {
-      url = https://dl.google.com/dl/cloudsdk/release/artifacts/gcutil-1.16.1.tar.gz;
-      sha256 = "00jaf7x1ji9y46fbkww2sg6r6almrqfsprydz3q2swr4jrnrsx9x";
-    };
-
-    propagatedBuildInputs = with self; [
-      gflags
-      iso8601
-      ipaddr
-      httplib2
-      google_apputils
-      google_api_python_client
-    ];
-
-    prePatch = ''
-      sed -i -e "s|google-apputils==0.4.0|google-apputils==0.4.1|g" setup.py
-      substituteInPlace setup.py \
-        --replace "httplib2==0.8" "httplib2" \
-        --replace "iso8601==0.1.4" "iso8601"
-    '';
-
-    meta = {
-      description = "Command-line tool for interacting with Google Compute Engine";
-      homepage = "https://cloud.google.com/compute/docs/gcutil/";
-      license = licenses.asl20;
-      maintainers = with maintainers; [ phreedom ];
-      broken = true;
-    };
-  };
+  gcutil = callPackage ../development/python-modules/gcutil { };
 
   GeoIP = callPackage ../development/python-modules/GeoIP { };