mirror of
https://github.com/NixOS/nixpkgs.git
synced 2026-07-22 08:30:57 +00:00
[Backport release-24.05] amazon-ssm-agent: substitute --replace with --replace-fail (#339210)
This commit is contained in:
@@ -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 = ''
|
||||
|
||||
Reference in New Issue
Block a user