diff --git a/gomuks b/gomuks index 9444dd2..2d566a2 160000 --- a/gomuks +++ b/gomuks @@ -1 +1 @@ -Subproject commit 9444dd293664c300c6e710bb6cddcd9c6cab365d +Subproject commit 2d566a2b585e2dba882714f7ca741a52afb36237 diff --git a/hook/build.dart b/hook/build.dart index 83474b9..4a9bf71 100644 --- a/hook/build.dart +++ b/hook/build.dart @@ -57,7 +57,17 @@ Future main(List args) => build(args, (input, output) async { break; case OS.macOS: libFileName = "libgomuks.dylib"; - extraEnv = {"SDKROOT": await getXCodeSDK()}; + extraEnv = { + "SDKROOT": await getXCodeSDK(), + "CGO_ENABLED": "1", + "GOARCH": switch (targetArch) { + Architecture.arm64 => "arm64", + Architecture.x64 => "amd64", + _ => throw UnsupportedError( + "Unsupported macOS architecture: $targetArch", + ), + }, + }; break; case OS.windows: libFileName = "libgomuks.dll"; diff --git a/linux/nix/pkg/gomuks.nix b/linux/nix/pkg/gomuks.nix index ffa9d7c..ca94198 100644 --- a/linux/nix/pkg/gomuks.nix +++ b/linux/nix/pkg/gomuks.nix @@ -17,7 +17,7 @@ buildGoModule ( src = "${src}/gomuks"; - vendorHash = "sha256-C03ss88QAnmZu+XxoHhc1M/261xFl8hR/pzLbU37Qe8="; + vendorHash = "sha256-fnRuw+zt6Iofv0kqypx+jy1gLvOHTQvJsOwSKu7kGLs="; buildPhase = '' runHook preBuild