From 46369c246b4081553a50cf396fd2c961ad44e04f Mon Sep 17 00:00:00 2001 From: Roland Coeurjoly Date: Sun, 25 Aug 2024 17:24:05 +0200 Subject: [PATCH] amazon-ssm-agent: substitute --replace with --replace-fail (cherry picked from commit 0fca1292718eeba3c1d4a8ada6f98e3069063653) --- pkgs/by-name/am/amazon-ssm-agent/package.nix | 12 ++++++------ 1 file 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 = ''