This repository has no description
0

Configure Feed

Select the types of activity you want to include in your feed.

5pkgs.gomuks: build TUI client from new codebase with goolm encryption

Use the gomuks v0.2601.0 codebase (cmd/gomuks-terminal) instead of the
abandoned v0.3.1 TUI. This version uses mautrix with built-in goolm,
a pure-Go olm replacement, avoiding the insecure and deprecated libolm
C library entirely. E2EE works without CGO.

+79
+79
5pkgs/gomuks/package.nix
··· 1 + { 2 + lib, 3 + fetchFromGitHub, 4 + fetchNpmDeps, 5 + buildGoModule, 6 + nodejs, 7 + npmHooks, 8 + }: 9 + 10 + # gomuks TUI with E2EE via pure-Go goolm (no insecure libolm needed) 11 + # Built from the new gomuks codebase which includes cmd/gomuks-terminal 12 + buildGoModule ( 13 + finalAttrs: 14 + let 15 + rev = "82abf26775d59c642fa7ea5274cf8631cd6942c6"; 16 + in 17 + { 18 + pname = "gomuks"; 19 + version = "0.2601.0"; 20 + 21 + proxyVendor = true; 22 + vendorHash = "sha256-M493helHfjHyJCqHxyaC2wkhtsFNA937crdnfCWj9IQ="; 23 + 24 + src = fetchFromGitHub { 25 + owner = "gomuks"; 26 + repo = "gomuks"; 27 + hash = "sha256-0AqA1Fl6xIotmF1hYfEm2FEEiSBzBp7RDnaJjTBeTwU="; 28 + inherit rev; 29 + }; 30 + 31 + nativeBuildInputs = [ 32 + nodejs 33 + npmHooks.npmConfigHook 34 + ]; 35 + 36 + env = { 37 + npmRoot = "web"; 38 + npmDeps = fetchNpmDeps { 39 + src = "${finalAttrs.src}/web"; 40 + hash = "sha256-SUxE4SZOZI+GgLTecRf5rqYRv3koV85eCZ1TFKO4gTI="; 41 + }; 42 + }; 43 + 44 + postPatch = '' 45 + substituteInPlace ./web/build-wasm.sh \ 46 + --replace-fail 'go.mau.fi/gomuks/version.Tag=$(git describe --exact-match --tags 2>/dev/null)' "go.mau.fi/gomuks/version.Tag=v${finalAttrs.version}" \ 47 + --replace-fail 'go.mau.fi/gomuks/version.Commit=$(git rev-parse HEAD)' "go.mau.fi/gomuks/version.Commit=${rev}" 48 + ''; 49 + 50 + doCheck = false; 51 + 52 + tags = [ "goolm" ]; 53 + 54 + ldflags = [ 55 + "-X 'go.mau.fi/gomuks/version.Tag=v${finalAttrs.version}'" 56 + "-X 'go.mau.fi/gomuks/version.Commit=${rev}'" 57 + ]; 58 + 59 + subPackages = [ 60 + "cmd/gomuks-terminal" 61 + ]; 62 + 63 + preBuild = '' 64 + CGO_ENABLED=0 go generate ./web 65 + ''; 66 + 67 + postInstall = '' 68 + mv $out/bin/gomuks-terminal $out/bin/gomuks 69 + ''; 70 + 71 + meta = { 72 + mainProgram = "gomuks"; 73 + description = "Terminal Matrix client with E2EE via goolm"; 74 + homepage = "https://github.com/tulir/gomuks"; 75 + license = lib.licenses.agpl3Only; 76 + platforms = lib.platforms.unix; 77 + }; 78 + } 79 + )