From 5e1cb57bf89d6bb087b5c74207a747d46ede7add Mon Sep 17 00:00:00 2001 From: Andrew Fontaine Date: Fri, 7 Aug 2020 11:39:45 -0400 Subject: [PATCH] minio: support building on darwin Modified build command and flags to allow successful build on Darwin systems. Based on flags in GitHub issue from minio project [0] [0]: https://github.com/minio/minio/issues/10188#issuecomment-668223207 --- pkgs/servers/minio/default.nix | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/pkgs/servers/minio/default.nix b/pkgs/servers/minio/default.nix index 19e228b1624..4a14dca660b 100644 --- a/pkgs/servers/minio/default.nix +++ b/pkgs/servers/minio/default.nix @@ -23,6 +23,15 @@ buildGoModule rec { sed -i "s/CommitID.*/CommitID = \"${src.rev}\"/g" cmd/build-constants.go ''; + postConfigure = '' + export CGO_ENABLED=0 + ''; + + buildFlagsArray = [ + "-tags=kqueue" + "-trimpath" + ]; + passthru.tests.minio = nixosTests.minio; meta = with stdenv.lib; {