about summary refs log tree commit diff
diff options
context:
space:
mode:
authorNikolay Amiantov <ab@fmap.me>2017-09-17 08:20:30 +0300
committerNikolay Amiantov <ab@fmap.me>2017-09-25 22:46:44 +0300
commit8d53efb19c0c9924afa5729340f29d9c6f23d6c0 (patch)
tree10539077e5460ca4240bcbaa85c296cb8c21ee6f
parent194c4002b640b8f4023c05ecb6e932006bbea829 (diff)
downloadnixlib-8d53efb19c0c9924afa5729340f29d9c6f23d6c0.tar
nixlib-8d53efb19c0c9924afa5729340f29d9c6f23d6c0.tar.gz
nixlib-8d53efb19c0c9924afa5729340f29d9c6f23d6c0.tar.bz2
nixlib-8d53efb19c0c9924afa5729340f29d9c6f23d6c0.tar.lz
nixlib-8d53efb19c0c9924afa5729340f29d9c6f23d6c0.tar.xz
nixlib-8d53efb19c0c9924afa5729340f29d9c6f23d6c0.tar.zst
nixlib-8d53efb19c0c9924afa5729340f29d9c6f23d6c0.zip
google-compute-engine: 20170523 -> 20170914
-rw-r--r--pkgs/tools/virtualization/google-compute-engine/0001-allow-nologin-other-paths.patch27
-rw-r--r--pkgs/tools/virtualization/google-compute-engine/default.nix19
-rw-r--r--pkgs/top-level/all-packages.nix2
-rw-r--r--pkgs/top-level/python-packages.nix12
4 files changed, 11 insertions, 49 deletions
diff --git a/pkgs/tools/virtualization/google-compute-engine/0001-allow-nologin-other-paths.patch b/pkgs/tools/virtualization/google-compute-engine/0001-allow-nologin-other-paths.patch
deleted file mode 100644
index 650e80c24fbe..000000000000
--- a/pkgs/tools/virtualization/google-compute-engine/0001-allow-nologin-other-paths.patch
+++ /dev/null
@@ -1,27 +0,0 @@
-From 2e9ac201af238b742c7032962b9b12a8b66bab0c Mon Sep 17 00:00:00 2001
-From: zimbatm <zimbatm@zimbatm.com>
-Date: Mon, 29 May 2017 22:36:15 +0100
-Subject: [PATCH] allow nologin on other paths
-
----
- google_compute_engine/accounts/accounts_utils.py | 4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/google_compute_engine/accounts/accounts_utils.py b/google_compute_engine/accounts/accounts_utils.py
-index 57e62be..d7eda06 100644
---- a/google_compute_engine/accounts/accounts_utils.py
-+++ b/google_compute_engine/accounts/accounts_utils.py
-@@ -295,8 +295,8 @@ class AccountsUtils(object):
-     # logins. This helps avoid problems caused by operator and root sharing
-     # a home directory in CentOS and RHEL.
-     pw_entry = self._GetUser(user)
--    if pw_entry and pw_entry.pw_shell == '/sbin/nologin':
--      message = 'Not updating user %s. User set /sbin/nologin as login shell.'
-+    if pw_entry and os.path.basename(pw_entry.pw_shell) == 'nologin':
-+      message = 'Not updating user %s. User set `nologin` as login shell.'
-       self.logger.debug(message, user)
-       return True
- 
--- 
-2.13.0
-
diff --git a/pkgs/tools/virtualization/google-compute-engine/default.nix b/pkgs/tools/virtualization/google-compute-engine/default.nix
index 7a5350fe2eb9..bd766d7c5a9f 100644
--- a/pkgs/tools/virtualization/google-compute-engine/default.nix
+++ b/pkgs/tools/virtualization/google-compute-engine/default.nix
@@ -1,27 +1,26 @@
 { lib
 , fetchFromGitHub
-, pythonPackages
+, buildPythonApplication
 , bash
 , shadow
 , systemd
 , utillinux
+, boto
+, setuptools
 }:
-let
-  version = "20170523";
-in
-pythonPackages.buildPythonApplication {
+
+buildPythonApplication rec {
   name = "google-compute-engine-${version}";
+  version = "20170914";
   namePrefix = "";
 
   src = fetchFromGitHub {
     owner = "GoogleCloudPlatform";
     repo = "compute-image-packages";
     rev = version;
-    sha256 = "1qxyj3lj9in6m8yi6y6wcmc3662h9z4qax07v97rdnay99mxdv68";
+    sha256 = "0hlzcrf6yhzan25f4wzy1vbncak9whhqzrzza026ly3sq0smmjpg";
   };
 
-  patches = [ ./0001-allow-nologin-other-paths.patch ];
-
   postPatch = ''
     for file in $(find google_compute_engine -type f); do
       substituteInPlace "$file" \
@@ -44,11 +43,11 @@ pythonPackages.buildPythonApplication {
     cp -r google_config/udev/*.rules $out/lib/udev/rules.d
   '';
 
-  propagatedBuildInputs = with pythonPackages; [ boto setuptools ];
+  propagatedBuildInputs = [ boto setuptools ];
 
   meta = with lib; {
     description = "Google Compute Engine tools and services";
-    homepage = https://github.com/GoogleCloudPlatform/compute-image-packages;
+    homepage = "https://github.com/GoogleCloudPlatform/compute-image-packages";
     license = licenses.asl20;
     maintainers = with maintainers; [ zimbatm ];
   };
diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix
index 87e83839d1d3..4ed40d18c9f5 100644
--- a/pkgs/top-level/all-packages.nix
+++ b/pkgs/top-level/all-packages.nix
@@ -2305,7 +2305,7 @@ with pkgs;
 
   google-fonts = callPackage ../data/fonts/google-fonts { };
 
-  google-compute-engine = callPackage ../tools/virtualization/google-compute-engine {  };
+  google-compute-engine = python2.pkgs.google-compute-engine;
 
   gource = callPackage ../applications/version-management/gource { };
 
diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix
index 78394e5e88fa..d7c1fb1fb621 100644
--- a/pkgs/top-level/python-packages.nix
+++ b/pkgs/top-level/python-packages.nix
@@ -5849,17 +5849,7 @@ in {
     };
   };
 
-  google-compute-engine = buildPythonPackage rec {
-    version = "2.3.0";
-    name    = "google-compute-engine-${version}";
-
-    src = pkgs.fetchurl {
-      url    = "mirror://pypi/g/google-compute-engine/google-compute-engine-${version}.tar.gz";
-      sha256 = "1pjj95b3l61h8xz5kjfcgnql066cr8bq5wl480a6dxd2inw8mynf";
-    };
-
-    propagatedBuildInputs = with self; [ boto ];
-  };
+  google-compute-engine = callPackage ../tools/virtualization/google-compute-engine { };
 
   googlecl = buildPythonPackage rec {
     version = "0.9.14";