depot/third_party/nixpkgs/pkgs/applications/networking/ktailctl/default.nix
Default email 83627f9931 Project import generated by Copybara.
GitOrigin-RevId: 2893f56de08021cffd9b6b6dfc70fd9ccd51eb60
2024-06-24 14:47:55 -04:00

97 lines
1.7 KiB
Nix

{ lib
, stdenv
, fetchFromGitHub
, buildGoModule
, cmake
, extra-cmake-modules
, git
, go
, wrapQtAppsHook
, qtbase
, qtdeclarative
, qtsvg
, qtwayland
, kconfig
, kcoreaddons
, kguiaddons
, ki18n
, kirigami
, kirigami-addons
, knotifications
, nlohmann_json
, qqc2-desktop-style
}:
let
version = "0.16.1";
src = fetchFromGitHub {
owner = "f-koehler";
repo = "KTailctl";
rev = "v${version}";
hash = "sha256-rMvFwWTrYWZUAMWd6H/SXE26q5ASjwsa8bD1tFC6yBI=";
};
goDeps = (buildGoModule {
pname = "ktailctl-go-wrapper";
inherit src version;
modRoot = "src/wrapper";
vendorHash = "sha256-GD+G+7b8GBwR3OrRPJbGJVom+kLC67VvlGFIA0S7UF8=";
}).goModules;
in
stdenv.mkDerivation {
pname = "ktailctl";
inherit version src;
patches = [
# Install libktailctl_config.so https://github.com/f-koehler/KTailctl/pull/212
./install-missing-libraries.diff
];
postPatch = ''
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
go
wrapQtAppsHook
];
buildInputs = [
qtbase
qtdeclarative
qtsvg
qtwayland
kconfig
kcoreaddons
kguiaddons
ki18n
kirigami
kirigami-addons
knotifications
nlohmann_json
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";
platforms = platforms.unix;
};
}