tangled
alpha
login
or
join now
pyrox.dev
/
nixpkgs
lol
0
fork
atom
overview
issues
pulls
pipelines
gomuks-web: init at 0.4.0-unstable-2025-04-22
Katja (ctucx)
9 months ago
c757cf78
7afbfc0e
+74
1 changed file
expand all
collapse all
unified
split
pkgs
by-name
go
gomuks-web
package.nix
+74
pkgs/by-name/go/gomuks-web/package.nix
···
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
···
1
+
{
2
+
lib,
3
+
fetchFromGitHub,
4
+
buildGoModule,
5
+
buildNpmPackage,
6
+
stdenv,
7
+
olm,
8
+
unstableGitUpdater,
9
+
withGoolm ? false,
10
+
}:
11
+
12
+
let
13
+
cppStdLib = if stdenv.hostPlatform.isDarwin then "-lc++" else "-lstdc++";
14
+
15
+
in
16
+
buildGoModule (finalAttrs: {
17
+
pname = "gomuks-web";
18
+
version = "0.4.0-unstable-2025-04-22";
19
+
20
+
src = fetchFromGitHub {
21
+
owner = "tulir";
22
+
repo = "gomuks";
23
+
rev = "fd257ed74c9df42e5b6d14d3c6a283f557f61666";
24
+
hash = "sha256-jMDLfiwkUme2bxE+ZEtUoNMwZ7GuGGzCV2dH1V87YtQ=";
25
+
};
26
+
27
+
frontend = buildNpmPackage {
28
+
name = "${finalAttrs.pname}_${finalAttrs.version}-frontend";
29
+
src = "${finalAttrs.src}/web";
30
+
inherit (finalAttrs) version;
31
+
32
+
npmDepsHash = "sha256-Mt2gJ1lLT3oQ3RKr3XTVFXkS/Xmjy0gahbdaxxrO+6g=";
33
+
34
+
installPhase = ''
35
+
cp -r dist $out
36
+
'';
37
+
};
38
+
39
+
vendorHash = "sha256-qeSxxd9ml2ENAYSPkdd1OWqy2DULnwLUVkKje47uT/I=";
40
+
41
+
buildInputs = [
42
+
(if withGoolm then stdenv.cc.cc.lib else olm)
43
+
];
44
+
45
+
CGO_LDFLAGS = lib.optional withGoolm cppStdLib;
46
+
47
+
tags = lib.optional withGoolm "goolm";
48
+
49
+
subPackages = [ "cmd/gomuks" ];
50
+
51
+
preBuild = ''
52
+
cp -r ${finalAttrs.frontend} ./web/dist
53
+
'';
54
+
55
+
postInstall = ''
56
+
mv $out/bin/gomuks $out/bin/gomuks-web
57
+
'';
58
+
59
+
passthru.updateScript = {
60
+
inherit (finalAttrs) frontend;
61
+
updateScript = unstableGitUpdater {
62
+
branch = "main";
63
+
};
64
+
};
65
+
66
+
meta = {
67
+
mainProgram = "gomuks-web";
68
+
description = "Matrix client written in Go";
69
+
homepage = "https://github.com/tulir/gomuks";
70
+
license = lib.licenses.agpl3Only;
71
+
maintainers = with lib.maintainers; [ ctucx ];
72
+
platforms = lib.platforms.unix;
73
+
};
74
+
})