lol
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

google-compute-engine: 20190124 -> 20200113.0 (#131761)

Co-authored-by: Sandro <sandro.jaeckel@gmail.com>

authored by

Phillip Cloud
Sandro
and committed by
GitHub
17482914 6a9ecf04

+66 -25
+66 -25
pkgs/tools/virtualization/google-compute-engine/default.nix
··· 3 3 , buildPythonPackage 4 4 , bash 5 5 , bashInteractive 6 - , systemd 7 6 , util-linux 8 7 , boto 9 8 , setuptools 10 9 , distro 10 + , stdenv 11 + , pythonOlder 12 + , pytestCheckHook 11 13 }: 12 14 15 + let 16 + guest-configs = stdenv.mkDerivation rec { 17 + pname = "guest-configs"; 18 + version = "20210702.00"; 19 + 20 + src = fetchFromGitHub { 21 + owner = "GoogleCloudPlatform"; 22 + repo = "guest-configs"; 23 + rev = version; 24 + sha256 = "1965kdrb1ig3z4qwzvyzx1fb4282ak5vgxcvvg5k9c759pzbc5nn"; 25 + }; 26 + 27 + buildInputs = [ bash ]; 28 + 29 + dontConfigure = true; 30 + dontBuild = true; 31 + 32 + installPhase = '' 33 + runHook preInstall 34 + 35 + # allows to install the package in `services.udev.packages` in NixOS 36 + mkdir -p $out/lib/udev $out/bin 37 + 38 + cp -r "src/lib/udev/rules.d" $out/lib/udev 39 + cp "src/lib/udev/google_nvme_id" $out/bin 40 + 41 + for rules in $out/lib/udev/*.rules; do 42 + substituteInPlace "$rules" \ 43 + --replace /bin/sh "${bash}/bin/sh" \ 44 + --replace /bin/umount "${util-linux}/bin/umount" \ 45 + --replace /usr/bin/logger "${util-linux}/bin/logger" 46 + done 47 + 48 + # sysctl snippets will be used by google-compute-config.nix 49 + cp -r "src/etc/sysctl.d" $out 50 + 51 + patchShebangs $out/bin/* 52 + 53 + runHook postInstall 54 + ''; 55 + }; 56 + in 13 57 buildPythonPackage rec { 14 58 pname = "google-compute-engine"; 15 - version = "20190124"; 59 + version = "20200113.0"; 16 60 17 61 src = fetchFromGitHub { 18 62 owner = "GoogleCloudPlatform"; 19 63 repo = "compute-image-packages"; 20 - rev = version; 21 - sha256 = "08cy0jd463kng6hwbd3nfldsp4dpd2lknlvdm88cq795wy0kh4wp"; 64 + rev = "506b9a0dbffec5620887660cd42c57b3cbbadba6"; 65 + sha256 = "0lmc426mvrajghpavhs6hwl19mgnnh08ziqx5yi15fzpnvwmb8vz"; 22 66 }; 23 67 24 - buildInputs = [ bash ]; 25 - propagatedBuildInputs = [ boto setuptools distro ]; 68 + buildInputs = [ bash guest-configs ]; 69 + propagatedBuildInputs = [ (if pythonOlder "3.7" then boto else distro) setuptools ]; 70 + 71 + preBuild = '' 72 + cd packages/python-google-compute-engine 73 + ''; 74 + 75 + disabledTests = [ 76 + "testExtractInterfaceMetadata" 77 + "testCallDhclientIpv6" 78 + "testWriteConfig" 79 + "testCreateInterfaceMapNetifaces" 80 + "testCreateInterfaceMapSysfs" 81 + "testGetNetworkInterface" 82 + ]; 83 + 84 + checkInputs = [ pytestCheckHook ]; 26 85 27 86 postPatch = '' 28 87 for file in $(find google_compute_engine -type f); do ··· 32 91 --replace /sbin/hwclock "${util-linux}/bin/hwclock" 33 92 # SELinux tool ??? /sbin/restorecon 34 93 done 35 - 36 - substituteInPlace google_config/udev/64-gce-disk-removal.rules \ 37 - --replace /bin/sh "${bash}/bin/sh" \ 38 - --replace /bin/umount "${util-linux}/bin/umount" \ 39 - --replace /usr/bin/logger "${util-linux}/bin/logger" 40 94 ''; 41 95 42 - postInstall = '' 43 - # allows to install the package in `services.udev.packages` in NixOS 44 - mkdir -p $out/lib/udev/rules.d 45 - cp -r google_config/udev/*.rules $out/lib/udev/rules.d 46 - 47 - # sysctl snippets will be used by google-compute-config.nix 48 - mkdir -p $out/sysctl.d 49 - cp google_config/sysctl/*.conf $out/sysctl.d 50 - 51 - patchShebangs $out/bin/* 52 - ''; 53 - 54 - doCheck = false; 55 96 pythonImportsCheck = [ "google_compute_engine" ]; 56 97 57 98 meta = with lib; { 58 99 description = "Google Compute Engine tools and services"; 59 100 homepage = "https://github.com/GoogleCloudPlatform/compute-image-packages"; 60 101 license = licenses.asl20; 61 - maintainers = with maintainers; [ zimbatm ]; 102 + maintainers = with maintainers; [ cpcloud zimbatm ]; 62 103 platforms = platforms.linux; 63 104 }; 64 105 }