Files
nixpkgs/pkgs/by-name/wa/waveterm/package.nix
Dark Steveneq 646b892680
Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
push sheeet
2025-10-09 14:15:47 +02:00

161 lines
3.2 KiB
Nix

{
lib,
stdenv,
fetchurl,
dpkg,
autoPatchelfHook,
atk,
at-spi2-atk,
cups,
libdrm,
gtk3,
pango,
cairo,
libX11,
libXcomposite,
libXdamage,
libXext,
libXfixes,
libXrandr,
libgbm,
expat,
libxcb,
alsa-lib,
nss,
nspr,
vips,
udev,
libGL,
unzip,
}:
let
selectSystem = attrs: attrs.${stdenv.hostPlatform.system};
pname = "waveterm";
version = "0.11.6";
passthru.updateScript = ./update.sh;
metaCommon = {
description = "Open-source, cross-platform terminal for seamless workflows";
homepage = "https://www.waveterm.dev";
sourceProvenance = with lib.sourceTypes; [ binaryNativeCode ];
license = lib.licenses.asl20;
platforms = [
"aarch64-linux"
"aarch64-darwin"
"x86_64-linux"
"x86_64-darwin"
];
maintainers = [ ];
};
linux = stdenv.mkDerivation {
inherit pname version passthru;
src =
let
arch = selectSystem {
x86_64-linux = "amd64";
aarch64-linux = "arm64";
};
in
fetchurl {
url = "https://github.com/wavetermdev/waveterm/releases/download/v${version}/waveterm-linux-${arch}-${version}.deb";
hash = selectSystem {
x86_64-linux = "sha256-OM64Tyqo+phMiH6TWmp47hBhnFo0cTvzFvhX/7/JUec=";
aarch64-linux = "sha256-g+e2wn1n0EqFeUah5ZgvL5D/y1khRQ2BUEowQf/ZoaI=";
};
};
nativeBuildInputs = [
dpkg
autoPatchelfHook
];
buildInputs = [
atk
at-spi2-atk
cups
libdrm
gtk3
pango
cairo
libX11
libXcomposite
libXdamage
libXext
libXfixes
libXrandr
libgbm
expat
libxcb
alsa-lib
nss
nspr
vips
];
installPhase = ''
runHook preInstall
mkdir -p $out/bin $out/app
cp -r opt/Wave $out/app/waveterm
cp -r usr/share $out/share
substituteInPlace $out/share/applications/waveterm.desktop \
--replace-fail "/opt/Wave/" ""
ln -s $out/app/waveterm/waveterm $out/bin/waveterm
runHook postInstall
'';
preFixup = ''
patchelf --add-needed libGL.so.1 \
--add-rpath ${
lib.makeLibraryPath [
libGL
udev
]
} $out/app/waveterm/waveterm
'';
meta = metaCommon // {
mainProgram = "waveterm";
};
};
darwin = stdenv.mkDerivation {
inherit pname version passthru;
src =
let
arch = selectSystem {
x86_64-darwin = "x64";
aarch64-darwin = "arm64";
};
in
fetchurl {
url = "https://github.com/wavetermdev/waveterm/releases/download/v${version}/Wave-darwin-${arch}-${version}.zip";
hash = selectSystem {
x86_64-darwin = "sha256-AW4AQ/U/WHIlXmgbQJ8g0yQQgpBolYT2kb/fDNWUS1g=";
aarch64-darwin = "sha256-Laxjj/MZzKsKhfRvOROQcPiatwNJKVqUCcGWB0chnok=";
};
};
nativeBuildInputs = [ unzip ];
installPhase = ''
runHook preInstall
mkdir -p $out/Applications
cp -r . "$out/Applications/Wave.app"
runHook postInstall
'';
meta = metaCommon // {
mainProgram = "Wave";
};
};
in
if stdenv.hostPlatform.isDarwin then darwin else linux