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

105 lines
2.3 KiB
Nix
Raw Permalink Normal View History

2024-12-05 06:11:42 +08:00
{
lib,
stdenv,
fetchurl,
2025-03-12 03:56:21 +08:00
unzip,
2024-12-05 06:11:42 +08:00
autoPatchelfHook,
fontconfig,
freetype,
libGL,
glib,
alsa-lib,
pulseaudio,
xorg,
gtk3,
atk,
pango,
gdk-pixbuf,
cairo,
gst_all_1,
makeWrapper,
libsForQt5,
profiles ? {
path = "~";
},
}:
2025-03-12 03:56:21 +08:00
stdenv.mkDerivation (finalAttrs: {
2024-12-05 06:11:42 +08:00
pname = "windterm";
2025-03-12 03:56:21 +08:00
version = "2.7.0";
2024-12-05 06:11:42 +08:00
src = fetchurl {
2025-03-12 03:56:21 +08:00
url = "https://github.com/kingToolbox/WindTerm/releases/download/${finalAttrs.version}/WindTerm_${finalAttrs.version}_Linux_Portable_x86_64.zip";
hash = "sha256-d5dpfutgI5AgUS4rVJaVpgw5s/0B/n67BH/VCiiJEDw=";
2024-12-05 06:11:42 +08:00
};
nativeBuildInputs = [
2025-03-12 03:56:21 +08:00
unzip
2024-12-05 06:11:42 +08:00
makeWrapper
autoPatchelfHook
];
buildInputs = [
xorg.libxcb
xorg.xcbutil
2025-03-12 03:56:21 +08:00
xorg.libXtst
2024-12-05 06:11:42 +08:00
xorg.xcbutilimage
xorg.xcbutilkeysyms
xorg.xcbutilrenderutil
2025-03-12 03:56:21 +08:00
libsForQt5.qtbase
libsForQt5.qtmultimedia
gst_all_1.gst-plugins-base
2024-12-05 06:11:42 +08:00
fontconfig
freetype
libGL
glib
alsa-lib
pulseaudio
gtk3
atk
pango
gdk-pixbuf
cairo
(lib.getLib stdenv.cc.cc)
];
2025-03-12 03:56:21 +08:00
dontBuild = true;
2024-12-05 06:11:42 +08:00
installPhase = ''
runHook preInstall
2025-03-12 03:56:21 +08:00
mkdir -p $out/app $out/share/applications $out/share/pixmaps $out/share/licenses/windterm
cp --recursive --no-preserve=mode . $out/app/windterm
cat > $out/app/windterm/profiles.config <<EOF
2024-12-05 06:11:42 +08:00
${builtins.toJSON profiles}
EOF
2025-03-12 03:56:21 +08:00
install -Dm644 $out/app/windterm/license.txt $out/share/licenses/windterm/license.txt
install -Dm644 $out/app/windterm/windterm.png $out/share/pixmaps/windterm.png
substituteInPlace $out/app/windterm/windterm.desktop \
--replace-fail "/usr/bin/" ""
install -Dm644 $out/app/windterm/windterm.desktop $out/share/applications/windterm.desktop
chmod +x $out/app/windterm/WindTerm
2024-12-05 06:11:42 +08:00
runHook postInstall
'';
dontWrapQtApps = true;
2025-03-12 03:56:21 +08:00
postFixup = ''
mkdir $out/bin
makeWrapper $out/app/windterm/WindTerm $out/bin/windterm \
--prefix QT_PLUGIN_PATH : $out/app/windterm/lib \
2024-12-05 06:11:42 +08:00
''${qtWrapperArgs[@]}
'';
meta = {
description = "Professional cross-platform SSH/Sftp/Shell/Telnet/Serial terminal";
homepage = "https://github.com/kingToolbox/WindTerm";
mainProgram = "windterm";
sourceProvenance = with lib.sourceTypes; [ binaryNativeCode ];
license = lib.licenses.unfree;
maintainers = with lib.maintainers; [ ];
2024-12-05 06:11:42 +08:00
platforms = [ "x86_64-linux" ];
};
2025-03-12 03:56:21 +08:00
})