Merge master into staging-next

This commit is contained in:
github-actions[bot]
2021-05-11 00:48:15 +00:00
committed by GitHub
69 changed files with 4881 additions and 8823 deletions
@@ -8,6 +8,7 @@
, dmidecode
, util-linux
, bashInteractive
, overrideEtc ? true
}:
let
@@ -64,6 +65,9 @@ buildGoPackage rec {
--replace '"script"' '"${util-linux}/bin/script"'
echo "${version}" > VERSION
'' + lib.optionalString overrideEtc ''
substituteInPlace agent/appconfig/constants_unix.go \
--replace '"/etc/amazon/ssm/"' '"${placeholder "out"}/etc/amazon/ssm/"'
'';
preBuild = ''
@@ -96,6 +100,20 @@ buildGoPackage rec {
popd
'';
# These templates retain their `.template` extensions on installation. The
# amazon-ssm-agent.json.template is required as default configuration when an
# amazon-ssm-agent.json isn't present. Here, we retain the template to show
# we're using the default configuration.
# seelog.xml isn't actually required to run, but it does ship as a template
# with debian packages, so it's here for reference. Future work in the nixos
# module could use this template and substitute a different log level.
postInstall = ''
mkdir -p $out/etc/amazon/ssm
cp go/src/${goPackagePath}/amazon-ssm-agent.json.template $out/etc/amazon/ssm/amazon-ssm-agent.json.template
cp go/src/${goPackagePath}/seelog_unix.xml $out/etc/amazon/ssm/seelog.xml.template
'';
postFixup = ''
wrapProgram $out/bin/amazon-ssm-agent --prefix PATH : ${bashInteractive}/bin
'';