summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoland Coeurjoly <rolandcoeurjoly@gmail.com>2024-08-25 17:24:05 +0200
committergithub-actions[bot] <github-actions[bot]@users.noreply.github.com>2024-09-03 09:18:22 +0000
commit46369c246b4081553a50cf396fd2c961ad44e04f (patch)
tree507bffc7baac57b2e4971ed2ad25f4a0ac567d9c
parent[Backport release-24.05] imagemagick: 7.1.1-37 -> 7.1.1-38 (#339125) (diff)
downloadnixpkgs-origin/backport-337268-to-release-24.05.tar.gz
amazon-ssm-agent: substitute --replace with --replace-failorigin/backport-337268-to-release-24.05
(cherry picked from commit 0fca1292718eeba3c1d4a8ada6f98e3069063653)
-rw-r--r--pkgs/by-name/am/amazon-ssm-agent/package.nix12
1 files changed, 6 insertions, 6 deletions
diff --git a/pkgs/by-name/am/amazon-ssm-agent/package.nix b/pkgs/by-name/am/amazon-ssm-agent/package.nix
index 1c7cae5f152a..4135645cb1ef 100644
--- a/pkgs/by-name/am/amazon-ssm-agent/package.nix
+++ b/pkgs/by-name/am/amazon-ssm-agent/package.nix
@@ -85,15 +85,15 @@ buildGoModule rec {
printf "#!/bin/sh\ntrue" > ./Tools/src/checkstyle.sh
substituteInPlace agent/platform/platform_unix.go \
- --replace "/usr/bin/uname" "${coreutils}/bin/uname" \
- --replace '"/bin", "hostname"' '"${nettools}/bin/hostname"' \
- --replace '"lsb_release"' '"${fake-lsb-release}/bin/lsb_release"'
+ --replace-fail "/usr/bin/uname" "${coreutils}/bin/uname" \
+ --replace-fail '"/bin", "hostname"' '"${nettools}/bin/hostname"' \
+ --replace-fail '"lsb_release"' '"${fake-lsb-release}/bin/lsb_release"'
substituteInPlace agent/session/shell/shell_unix.go \
- --replace '"script"' '"${util-linux}/bin/script"'
+ --replace-fail '"script"' '"${util-linux}/bin/script"'
substituteInPlace agent/rebooter/rebooter_unix.go \
- --replace "/sbin/shutdown" "shutdown"
+ --replace-fail "/sbin/shutdown" "shutdown"
echo "${version}" > VERSION
'' + lib.optionalString overrideEtc ''
@@ -101,7 +101,7 @@ buildGoModule rec {
--replace '"/etc/amazon/ssm/"' '"${placeholder "out"}/etc/amazon/ssm/"'
'' + lib.optionalString stdenv.isLinux ''
substituteInPlace agent/managedInstances/fingerprint/hardwareInfo_unix.go \
- --replace /usr/sbin/dmidecode ${dmidecode}/bin/dmidecode
+ --replace-fail /usr/sbin/dmidecode ${dmidecode}/bin/dmidecode
'';
preBuild = ''