google-compute-engine: patch shebangs in $out/bin, properly patch systemctl
This commit is contained in:
parent
106a1fe265
commit
10f5f8c5d8
|
@ -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;
|
||||
|
||||
|
|
Loading…
Reference in New Issue