Merge branch 'staging-next' into staging
This commit is contained in:
@@ -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
|
||||
'';
|
||||
|
||||
Reference in New Issue
Block a user