about summary refs log tree commit diff
path: root/pkgs/by-name/am
diff options
context:
space:
mode:
authorAnthony Roussel <anthony@roussel.dev>2023-11-14 09:08:38 +0100
committerAnthony Roussel <anthony@roussel.dev>2023-11-14 09:32:19 +0100
commitf263c60908265008e3799d605bc2d7e08bfebe04 (patch)
tree52d16b5b3ce70efbd57532562b11b8e7ab0c32e6 /pkgs/by-name/am
parenta02ff694bec1c4764d123bcb7c38e35790679f0e (diff)
amazon-ssm-agent: add darwin support
Diffstat (limited to 'pkgs/by-name/am')
-rw-r--r--pkgs/by-name/am/amazon-ssm-agent/package.nix12
1 files changed, 8 insertions, 4 deletions
diff --git a/pkgs/by-name/am/amazon-ssm-agent/package.nix b/pkgs/by-name/am/amazon-ssm-agent/package.nix
index 42318be05baf5..a6a8a690d538c 100644
--- a/pkgs/by-name/am/amazon-ssm-agent/package.nix
+++ b/pkgs/by-name/am/amazon-ssm-agent/package.nix
@@ -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;
   };
 }