amazon-ssm-agent: add darwin support

This commit is contained in:
Anthony Roussel 2023-11-14 09:08:38 +01:00
parent a02ff694be
commit f263c60908
No known key found for this signature in database
GPG Key ID: 9DC4987B1A55E75E

View File

@ -2,6 +2,7 @@
, writeShellScriptBin
, buildGoModule
, makeWrapper
, darwin
, fetchFromGitHub
, coreutils
, nettools
@ -60,7 +61,11 @@ buildGoModule rec {
./0002-version-gen-don-t-use-unnecessary-constants.patch
];
nativeBuildInputs = [ makeWrapper ];
nativeBuildInputs = [
makeWrapper
] ++ lib.optionals stdenv.isDarwin [
darwin.DarwinTools
];
# See the list https://github.com/aws/amazon-ssm-agent/blob/3.2.1630.0/makefile#L120-L138
# The updater is not built because it cannot work on NixOS
@ -149,6 +154,8 @@ buildGoModule rec {
};
};
__darwinAllowLocalNetworking = true;
meta = with lib; {
description = "Agent to enable remote management of your Amazon EC2 instance configuration";
changelog = "https://github.com/aws/amazon-ssm-agent/releases/tag/${version}";
@ -156,8 +163,5 @@ buildGoModule rec {
license = licenses.asl20;
platforms = platforms.unix;
maintainers = with maintainers; [ copumpkin manveru anthonyroussel ];
# Darwin support is broken
broken = stdenv.isDarwin;
};
}