push sheeet
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

This commit is contained in:
Dark Steveneq
2025-10-09 14:15:47 +02:00
commit 646b892680
49168 changed files with 5897842 additions and 0 deletions

View File

@@ -0,0 +1,160 @@
{
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

View File

@@ -0,0 +1,34 @@
#!/usr/bin/env nix-shell
#!nix-shell -i bash -p bash nixVersions.latest curl coreutils jq common-updater-scripts
set -eou pipefail
latestTag=$(curl ${GITHUB_TOKEN:+-u ":$GITHUB_TOKEN"} -sL https://api.github.com/repos/wavetermdev/waveterm/releases/latest | jq -r ".tag_name")
latestVersion="$(expr "$latestTag" : 'v\(.*\)')"
currentVersion=$(nix-instantiate --eval -E "with import ./. {}; waveterm.version" | tr -d '"')
echo "latest version: $latestVersion"
echo "current version: $currentVersion"
if [[ "$latestVersion" == "$currentVersion" ]]; then
echo "package is up-to-date"
exit 0
fi
for i in \
"x86_64-linux amd64" \
"aarch64-linux arm64"; do
set -- $i
prefetch=$(nix-prefetch-url "https://github.com/wavetermdev/waveterm/releases/download/v$latestVersion/waveterm-linux-$2-$latestVersion.deb")
hash=$(nix --extra-experimental-features nix-command hash convert --hash-algo sha256 --to sri $prefetch)
update-source-version waveterm $latestVersion $hash --system=$1 --ignore-same-version
done
for i in \
"x86_64-darwin x64" \
"aarch64-darwin arm64"; do
set -- $i
prefetch=$(nix-prefetch-url "https://github.com/wavetermdev/waveterm/releases/download/v$latestVersion/Wave-darwin-$2-$latestVersion.zip")
hash=$(nix --extra-experimental-features nix-command hash convert --hash-algo sha256 --to sri $prefetch)
update-source-version waveterm $latestVersion $hash --system=$1 --ignore-same-version
done