about summary refs log tree commit diff
path: root/nixpkgs/pkgs/tools/virtualization/google-compute-engine
diff options
context:
space:
mode:
authorAlyssa Ross <hi@alyssa.is>2019-09-08 00:46:04 +0000
committerAlyssa Ross <hi@alyssa.is>2019-09-16 22:13:21 +0000
commitafcf2d55332c5c01c2d989e9d010577d257cb6cc (patch)
treee1c816a271686b014a6403bcad7c57dd2ee4d9c7 /nixpkgs/pkgs/tools/virtualization/google-compute-engine
parent175b9acd282aaf65b5f354ea6e95c1348fe3daa3 (diff)
parent4e60699fa727e4a0f9a3e78948012f86da32cfef (diff)
downloadnixlib-afcf2d55332c5c01c2d989e9d010577d257cb6cc.tar
nixlib-afcf2d55332c5c01c2d989e9d010577d257cb6cc.tar.gz
nixlib-afcf2d55332c5c01c2d989e9d010577d257cb6cc.tar.bz2
nixlib-afcf2d55332c5c01c2d989e9d010577d257cb6cc.tar.lz
nixlib-afcf2d55332c5c01c2d989e9d010577d257cb6cc.tar.xz
nixlib-afcf2d55332c5c01c2d989e9d010577d257cb6cc.tar.zst
nixlib-afcf2d55332c5c01c2d989e9d010577d257cb6cc.zip
Merge commit '4e60699fa727e4a0f9a3e78948012f86da32cfef'
Diffstat (limited to 'nixpkgs/pkgs/tools/virtualization/google-compute-engine')
-rw-r--r--nixpkgs/pkgs/tools/virtualization/google-compute-engine/default.nix17
1 files changed, 12 insertions, 5 deletions
diff --git a/nixpkgs/pkgs/tools/virtualization/google-compute-engine/default.nix b/nixpkgs/pkgs/tools/virtualization/google-compute-engine/default.nix
index 0db43ccfcfdd..48255ca68a73 100644
--- a/nixpkgs/pkgs/tools/virtualization/google-compute-engine/default.nix
+++ b/nixpkgs/pkgs/tools/virtualization/google-compute-engine/default.nix
@@ -11,7 +11,7 @@
 }:
 
 buildPythonApplication rec {
-  name = "google-compute-engine-${version}";
+  pname = "google-compute-engine";
   version = "20190124";
   namePrefix = "";
 
@@ -22,13 +22,16 @@ buildPythonApplication rec {
     sha256 = "08cy0jd463kng6hwbd3nfldsp4dpd2lknlvdm88cq795wy0kh4wp";
   };
 
+  buildInputs = [ bash ];
+  propagatedBuildInputs = [ boto setuptools distro ];
+
+
   postPatch = ''
     for file in $(find google_compute_engine -type f); do
       substituteInPlace "$file" \
-        --replace /bin/systemctl "${systemd}/bin/systemctl" \
+        --replace /bin/systemctl "/run/current-system/sw/bin/systemctl" \
         --replace /bin/bash "${bashInteractive}/bin/bash" \
         --replace /sbin/hwclock "${utillinux}/bin/hwclock"
-
       # SELinux tool ???  /sbin/restorecon
     done
 
@@ -42,9 +45,13 @@ buildPythonApplication rec {
     # allows to install the package in `services.udev.packages` in NixOS
     mkdir -p $out/lib/udev/rules.d
     cp -r google_config/udev/*.rules $out/lib/udev/rules.d
-  '';
 
-  propagatedBuildInputs = [ boto setuptools distro ];
+    # sysctl snippets will be used by google-compute-config.nix
+    mkdir -p $out/sysctl.d
+    cp google_config/sysctl/*.conf $out/sysctl.d
+
+    patchShebangs $out/bin/*
+  '';
 
   doCheck = false;