Files

50 lines
1.7 KiB
Nix
Raw Permalink Normal View History

2026-06-15 07:11:19 +02:00
{
appimageTools,
fetchurl,
lib,
nix-update-script,
stdenvNoCC,
}: let
pname = "openwork";
version = "0.16.4";
src = fetchurl {
url =
if stdenvNoCC.hostPlatform.system == "aarch64-linux"
then "https://github.com/different-ai/openwork/releases/download/v${version}/openwork-linux-arm64-${version}.AppImage"
else "https://github.com/different-ai/openwork/releases/download/v${version}/openwork-linux-x86_64-${version}.AppImage";
hash =
if stdenvNoCC.hostPlatform.system == "aarch64-linux"
then "sha256-ZSoAcOH0/gQynSCY8qCvysaNBnUl/G8Zz66a11y60Qs="
else "sha256-CyyZ187oa+xV/t33T5aGpUN1CICxsTSBU3+1OoPbfUs=";
};
appimageContents = appimageTools.extractType2 {inherit pname version src;};
in
appimageTools.wrapType2 {
inherit pname version src;
extraInstallCommands = ''
install -m 444 -D ${appimageContents}/@openworkdesktop.desktop \
$out/share/applications/openwork.desktop
substituteInPlace $out/share/applications/openwork.desktop \
--replace-fail 'Exec=AppRun --no-sandbox %U' 'Exec=${pname} %U' \
--replace-fail 'Icon=@openworkdesktop' 'Icon=${pname}'
install -m 444 -D ${appimageContents}/@openworkdesktop.png \
$out/share/icons/hicolor/512x512/apps/${pname}.png
'';
passthru = {
updateScript = nix-update-script {};
};
meta = {
description = "Open-source alternative to Claude Cowork powered by opencode";
homepage = "https://github.com/different-ai/openwork";
changelog = "https://github.com/different-ai/openwork/releases/tag/v${version}";
license = with lib.licenses; [mit fsl11Mit];
platforms = ["x86_64-linux" "aarch64-linux"];
mainProgram = "openwork";
};
}