2023-10-08 18:36:16 +00:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
|
|
|
, fetchFromGitHub
|
2024-01-14 00:22:38 +00:00
|
|
|
, buildGoModule
|
2023-10-08 18:36:16 +00:00
|
|
|
, cmake
|
|
|
|
, extra-cmake-modules
|
|
|
|
, git
|
2024-01-14 00:22:38 +00:00
|
|
|
, go
|
2023-10-08 18:36:16 +00:00
|
|
|
, wrapQtAppsHook
|
|
|
|
, qtbase
|
|
|
|
, qtquickcontrols2
|
|
|
|
, kconfig
|
|
|
|
, kcoreaddons
|
|
|
|
, kguiaddons
|
|
|
|
, ki18n
|
|
|
|
, kirigami2
|
|
|
|
, kirigami-addons
|
|
|
|
, knotifications
|
|
|
|
}:
|
|
|
|
|
|
|
|
let
|
|
|
|
version = "0.9.0";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "f-koehler";
|
|
|
|
repo = "KTailctl";
|
|
|
|
rev = "v${version}";
|
|
|
|
hash = "sha256-nY6DEHkDVWIlvc64smXb9KshrhNgNLKiilYydbMKCqc=";
|
|
|
|
};
|
|
|
|
|
2024-01-14 00:22:38 +00:00
|
|
|
goDeps = (buildGoModule {
|
2023-10-08 18:36:16 +00:00
|
|
|
pname = "tailwrap";
|
|
|
|
inherit src version;
|
|
|
|
modRoot = "tailwrap";
|
|
|
|
vendorHash = "sha256-Y9xhoTf3vCtiNi5qOPg020EQmASo58BZI3rAoUEC8qE=";
|
|
|
|
}).goModules;
|
2024-01-14 00:22:38 +00:00
|
|
|
in
|
|
|
|
stdenv.mkDerivation {
|
2023-10-08 18:36:16 +00:00
|
|
|
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
|
2024-01-14 00:22:38 +00:00
|
|
|
go
|
2023-10-08 18:36:16 +00:00
|
|
|
wrapQtAppsHook
|
|
|
|
];
|
|
|
|
|
|
|
|
buildInputs = [
|
|
|
|
qtbase
|
|
|
|
qtquickcontrols2
|
|
|
|
kconfig
|
|
|
|
kcoreaddons
|
|
|
|
kguiaddons
|
|
|
|
ki18n
|
|
|
|
kirigami2
|
|
|
|
kirigami-addons
|
|
|
|
knotifications
|
|
|
|
];
|
|
|
|
|
|
|
|
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;
|
|
|
|
};
|
|
|
|
}
|