diff options
author | Florian Klink <flokli@flokli.de> | 2019-09-01 00:27:56 +0200 |
---|---|---|
committer | Florian Klink <flokli@flokli.de> | 2019-09-01 01:23:18 +0200 |
commit | 10f5f8c5d8036f5eac629df7939ed5e6c1bcabbb (patch) | |
tree | cfb020c5db122253b7589f1eabcc23dcf645b477 /pkgs/tools/virtualization | |
parent | 106a1fe265b6314ee20e5f0822676e6a6877803a (diff) |
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.nix | 11 |
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 5abdcc23a74c..d4c817b7ecb7 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; |