2023-10-09 19:29:22 +00:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
|
|
|
, fetchFromGitHub
|
2024-01-25 14:12:00 +00:00
|
|
|
, buildGoModule
|
2023-10-09 19:29:22 +00:00
|
|
|
, cmake
|
|
|
|
, extra-cmake-modules
|
|
|
|
, git
|
2024-01-25 14:12:00 +00:00
|
|
|
, go
|
2023-10-09 19:29:22 +00:00
|
|
|
, wrapQtAppsHook
|
|
|
|
, qtbase
|
2024-04-21 15:54:59 +00:00
|
|
|
, qtdeclarative
|
|
|
|
, qtsvg
|
2024-06-24 18:47:55 +00:00
|
|
|
, qtwayland
|
2023-10-09 19:29:22 +00:00
|
|
|
, kconfig
|
|
|
|
, kcoreaddons
|
|
|
|
, kguiaddons
|
|
|
|
, ki18n
|
2024-04-21 15:54:59 +00:00
|
|
|
, kirigami
|
2023-10-09 19:29:22 +00:00
|
|
|
, kirigami-addons
|
|
|
|
, knotifications
|
2024-04-21 15:54:59 +00:00
|
|
|
, nlohmann_json
|
2024-06-24 18:47:55 +00:00
|
|
|
, qqc2-desktop-style
|
2023-10-09 19:29:22 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
let
|
2024-07-27 06:49:29 +00:00
|
|
|
version = "0.17.1";
|
2023-10-09 19:29:22 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "f-koehler";
|
|
|
|
repo = "KTailctl";
|
|
|
|
rev = "v${version}";
|
2024-07-27 06:49:29 +00:00
|
|
|
hash = "sha256-urB8NcdQMF6RNX8F2CpzOd0ZkRi3IS4XFyOOXIeChpY=";
|
2023-10-09 19:29:22 +00:00
|
|
|
};
|
|
|
|
|
2024-01-25 14:12:00 +00:00
|
|
|
goDeps = (buildGoModule {
|
2024-06-24 18:47:55 +00:00
|
|
|
pname = "ktailctl-go-wrapper";
|
2023-10-09 19:29:22 +00:00
|
|
|
inherit src version;
|
2024-06-24 18:47:55 +00:00
|
|
|
modRoot = "src/wrapper";
|
2024-07-27 06:49:29 +00:00
|
|
|
vendorHash = "sha256-Ls4MVppMJbUUukaKkDAN8Lx/s09JRJTf/RMgk0iDcnw=";
|
2023-10-09 19:29:22 +00:00
|
|
|
}).goModules;
|
2024-01-25 14:12:00 +00:00
|
|
|
in
|
|
|
|
stdenv.mkDerivation {
|
2023-10-09 19:29:22 +00:00
|
|
|
pname = "ktailctl";
|
|
|
|
inherit version src;
|
|
|
|
|
|
|
|
postPatch = ''
|
2024-06-24 18:47:55 +00:00
|
|
|
cp -r --reflink=auto ${goDeps} src/wrapper/vendor
|
2023-10-09 19:29:22 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
# 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-25 14:12:00 +00:00
|
|
|
go
|
2023-10-09 19:29:22 +00:00
|
|
|
wrapQtAppsHook
|
|
|
|
];
|
|
|
|
|
|
|
|
buildInputs = [
|
|
|
|
qtbase
|
2024-04-21 15:54:59 +00:00
|
|
|
qtdeclarative
|
|
|
|
qtsvg
|
2024-06-24 18:47:55 +00:00
|
|
|
qtwayland
|
2023-10-09 19:29:22 +00:00
|
|
|
kconfig
|
|
|
|
kcoreaddons
|
|
|
|
kguiaddons
|
|
|
|
ki18n
|
2024-04-21 15:54:59 +00:00
|
|
|
kirigami
|
2024-06-24 18:47:55 +00:00
|
|
|
kirigami-addons
|
2023-10-09 19:29:22 +00:00
|
|
|
knotifications
|
2024-04-21 15:54:59 +00:00
|
|
|
nlohmann_json
|
2024-06-24 18:47:55 +00:00
|
|
|
qqc2-desktop-style
|
2023-10-09 19:29:22 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
meta = with lib; {
|
2024-06-20 14:57:18 +00:00
|
|
|
description = "GUI to monitor and manage Tailscale on your Linux desktop";
|
2023-10-09 19:29:22 +00:00
|
|
|
homepage = "https://github.com/f-koehler/KTailctl";
|
|
|
|
license = licenses.gpl3Only;
|
|
|
|
maintainers = with maintainers; [ k900 ];
|
|
|
|
mainProgram = "ktailctl";
|
2024-06-24 18:47:55 +00:00
|
|
|
platforms = platforms.unix;
|
2023-10-09 19:29:22 +00:00
|
|
|
};
|
|
|
|
}
|