nixpkgs/pkgs/applications/networking/ktailctl/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

93 lines
1.6 KiB
Nix
Raw Normal View History

{ lib
, stdenv
, fetchFromGitHub
2024-09-27 19:20:08 +00:00
, buildGo123Module
, cmake
, extra-cmake-modules
, git
2024-09-27 19:20:08 +00:00
, go_1_23
, wrapQtAppsHook
, qtbase
2024-04-05 11:17:19 +00:00
, qtdeclarative
, qtsvg
2024-06-24 12:39:46 +00:00
, qtwayland
, kconfig
, kcoreaddons
, kguiaddons
, ki18n
2024-04-05 11:17:19 +00:00
, kirigami
, kirigami-addons
, knotifications
2024-04-05 11:17:19 +00:00
, nlohmann_json
2024-06-24 12:39:46 +00:00
, qqc2-desktop-style
}:
let
version = "0.18.1";
src = fetchFromGitHub {
owner = "f-koehler";
repo = "KTailctl";
rev = "v${version}";
hash = "sha256-hlpxim4Vm/C37ts+Q/t9swCejKEE97R1QlP+Y2jNWoM=";
};
2024-09-27 19:20:08 +00:00
goDeps = (buildGo123Module {
2024-06-24 12:39:46 +00:00
pname = "ktailctl-go-wrapper";
inherit src version;
2024-06-24 12:39:46 +00:00
modRoot = "src/wrapper";
2024-09-27 19:20:08 +00:00
vendorHash = "sha256-KdkvAPLnoC7DccRVIz7t/Ns71dnG59DpO5qwOhJk7qc=";
}).goModules;
2024-01-14 00:22:38 +00:00
in
stdenv.mkDerivation {
pname = "ktailctl";
inherit version src;
postPatch = ''
2024-06-24 12:39:46 +00:00
cp -r --reflink=auto ${goDeps} src/wrapper/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-09-27 19:20:08 +00:00
go_1_23
wrapQtAppsHook
];
buildInputs = [
qtbase
2024-04-05 11:17:19 +00:00
qtdeclarative
qtsvg
2024-06-24 12:39:46 +00:00
qtwayland
kconfig
kcoreaddons
kguiaddons
ki18n
2024-04-05 11:17:19 +00:00
kirigami
2024-06-24 12:39:46 +00:00
kirigami-addons
knotifications
2024-04-05 11:17:19 +00:00
nlohmann_json
2024-06-24 12:39:46 +00:00
qqc2-desktop-style
];
meta = with lib; {
description = "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";
2024-06-24 12:39:46 +00:00
platforms = platforms.unix;
};
}