1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
|
{ lib
, stdenv
, fetchFromGitHub
, buildGoModule
, cmake
, extra-cmake-modules
, git
, go
, wrapQtAppsHook
, qtbase
, qtdeclarative
, qtsvg
, kconfig
, kcoreaddons
, kguiaddons
, ki18n
, kirigami
, kirigami-addons
, knotifications
, nlohmann_json
}:
let
version = "0.16.0";
src = fetchFromGitHub {
owner = "f-koehler";
repo = "KTailctl";
rev = "v${version}";
hash = "sha256-fIx6XfNGK+jDpeaoCzTKwv3J01yWoHOgWxjbwTGVK1U=";
};
goDeps = (buildGoModule {
pname = "tailwrap";
inherit src version;
modRoot = "tailwrap";
vendorHash = "sha256-egTzSdOKrhdEBKarIfROxZUsxbnR9F1JDbdoKzGf9UM=";
}).goModules;
in
stdenv.mkDerivation {
pname = "ktailctl";
inherit version src;
postPatch = ''
cp -r --reflink=auto ${goDeps} tailwrap/vendor
'';
# needed for go build to work
preBuild = ''
export HOME=$TMPDIR
'';
cmakeFlags = [
# actually just disables Go vendoring updates
"-DKTAILCTL_FLATPAK_BUILD=ON"
];
nativeBuildInputs = [
cmake
extra-cmake-modules
git
go
wrapQtAppsHook
];
buildInputs = [
qtbase
qtdeclarative
qtsvg
kconfig
kcoreaddons
kguiaddons
ki18n
kirigami
knotifications
nlohmann_json
];
meta = with lib; {
description = "A GUI to monitor and manage Tailscale on your Linux desktop";
homepage = "https://github.com/f-koehler/KTailctl";
license = licenses.gpl3Only;
maintainers = with maintainers; [ k900 ];
mainProgram = "ktailctl";
platforms = platforms.all;
};
}
|