summary refs log tree commit diff
path: root/pkgs/tools/virtualization
diff options
context:
space:
mode:
authorFlorian Klink <flokli@flokli.de>2019-09-01 00:27:56 +0200
committerFlorian Klink <flokli@flokli.de>2019-09-01 01:23:18 +0200
commit10f5f8c5d8036f5eac629df7939ed5e6c1bcabbb (patch)
treecfb020c5db122253b7589f1eabcc23dcf645b477 /pkgs/tools/virtualization
parent106a1fe265b6314ee20e5f0822676e6a6877803a (diff)
downloadnixpkgs-10f5f8c5d8036f5eac629df7939ed5e6c1bcabbb.tar
nixpkgs-10f5f8c5d8036f5eac629df7939ed5e6c1bcabbb.tar.gz
nixpkgs-10f5f8c5d8036f5eac629df7939ed5e6c1bcabbb.tar.bz2
nixpkgs-10f5f8c5d8036f5eac629df7939ed5e6c1bcabbb.tar.lz
nixpkgs-10f5f8c5d8036f5eac629df7939ed5e6c1bcabbb.tar.xz
nixpkgs-10f5f8c5d8036f5eac629df7939ed5e6c1bcabbb.tar.zst
nixpkgs-10f5f8c5d8036f5eac629df7939ed5e6c1bcabbb.zip
google-compute-engine: patch shebangs in $out/bin, properly patch systemctl
Diffstat (limited to 'pkgs/tools/virtualization')
-rw-r--r--pkgs/tools/virtualization/google-compute-engine/default.nix11
1 files changed, 7 insertions, 4 deletions
diff --git a/pkgs/tools/virtualization/google-compute-engine/default.nix b/pkgs/tools/virtualization/google-compute-engine/default.nix
index 5abdcc23a74..d4c817b7ecb 100644
--- a/pkgs/tools/virtualization/google-compute-engine/default.nix
+++ b/pkgs/tools/virtualization/google-compute-engine/default.nix
@@ -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,9 @@ 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 ];
+    patchShebangs $out/bin/*
+  '';
 
   doCheck = false;