Files
nixpkgs/pkgs/openwork/default.nix
T
m3ta-chiron 8f2d1beba3 fix: replace deprecated appimageTools.extractType2 with extract
Also bumps the buzz input (0.5.18 -> 0.5.20), which pulls rust-overlay
fd2ebb9 where the stdenv.isLinux/isDarwin reads were migrated to
stdenv.hostPlatform — eliminating evaluation warnings.
2026-08-31 11:44:50 +02:00

49 lines
1.6 KiB
Nix

{
appimageTools,
fetchurl,
lib,
nix-update-script,
stdenvNoCC,
}: let
pname = "openwork";
version = "0.18.40";
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-I9ayBQDOjfcXMLDza5TsUzN8hujhgVk5E71IabPpiPM=";
};
appimageContents = appimageTools.extract {inherit pname version src;};
in
appimageTools.wrapType2 {
inherit pname version src;
extraInstallCommands = ''
install -m 444 -D ${appimageContents}/com.differentai.openwork.desktop \
$out/share/applications/openwork.desktop
substituteInPlace $out/share/applications/openwork.desktop \
--replace-fail 'Exec=AppRun %U' 'Exec=${pname} %U'
install -m 444 -D ${appimageContents}/openwork.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";
};
}