commit c688e9d72a8f949c3f3a415c8ef3487b32283074
parent afb3d06c87aab3f19f62098b48d0747ba9501844
Author: Katja Ramona Sophie Kwast (zaphyra) <git@zaphyra.eu>
Date: Fri, 22 Aug 2025 12:46:30 +0200
parent afb3d06c87aab3f19f62098b48d0747ba9501844
Author: Katja Ramona Sophie Kwast (zaphyra) <git@zaphyra.eu>
Date: Fri, 22 Aug 2025 12:46:30 +0200
packages: disable cgo where possible
5 files changed, 10 insertions(+), 20 deletions(-)
diff --git a/packages/deppa/package.nix b/packages/deppa/package.nix @@ -33,6 +33,8 @@ buildGoModule { installManPage deppa.8 ''; + env.CGO_ENABLED = 0; + vendorHash = null; meta = {
diff --git a/packages/gomuks-web/package.nix b/packages/gomuks-web/package.nix @@ -91,6 +91,8 @@ buildGoModule (finalAttrs: { ]) ]; + doCheck = false; + tags = [ "goolm" ]; subPackages = [ "cmd/gomuks" ];
diff --git a/packages/gotosocial-unstable/package.nix b/packages/gotosocial-unstable/package.nix @@ -80,6 +80,8 @@ unstable.buildGo125Module (finalAttrs: { "kvformat" ]; + env.CGO_ENABLED = 0; + vendorHash = null; nativeBuildInputs = [ installShellFiles ];
diff --git a/packages/mautrix-telegramgo/package.nix b/packages/mautrix-telegramgo/package.nix @@ -1,22 +1,10 @@ { tgcMaintainers, lib, - stdenv, buildGoModule, fetchFromGitHub, - olm, - # This option enables the use of an experimental pure-Go implementation of - # the Olm protocol instead of libolm for end-to-end encryption. Using goolm - # is not recommended by the mautrix developers, but they are interested in - # people trying it out in non-production-critical environments and reporting - # any issues they run into. - withGoolm ? true, }: -let - cppStdLib = if stdenv.hostPlatform.isDarwin then "-lc++" else "-lstdc++"; - -in buildGoModule (finalAttrs: { pname = "mautrix-telegramgo"; version = "0.0.0-${builtins.substring 0 6 finalAttrs.rev}"; @@ -30,20 +18,16 @@ buildGoModule (finalAttrs: { inherit (finalAttrs) rev; }; - buildInputs = (lib.optional (!withGoolm) olm) ++ (lib.optional withGoolm stdenv.cc.cc.lib); - - CGO_LDFLAGS = lib.optional withGoolm [ cppStdLib ]; - - tags = lib.optional withGoolm "goolm"; + tags = [ "goolm" ]; doCheck = false; vendorHash = "sha256-SNQxZYbFE8DzGF8Ubx6nho93J1hmNG2XnQ1re8alqPw="; - meta = with lib; { + meta = { homepage = "https://github.com/mautrix/telegramgo"; description = "Go rewrite of mautrix-telegram"; - license = licenses.agpl3Plus; + license = lib.licenses.agpl3Plus; maintainers = [ tgcMaintainers.zaphyra ]; mainProgram = "mautrix-telegram"; };
diff --git a/packages/sointu/package.nix b/packages/sointu/package.nix @@ -44,7 +44,7 @@ buildGoModule (finalAttrs: { xorg.libXfixes ]; - env.CGO_ENABLED = true; + env.CGO_ENABLED = 1; doCheck = false;