2024-02-29 20:09:43 +00:00
|
|
|
{ lib
|
|
|
|
, appimageTools
|
|
|
|
, fetchurl
|
|
|
|
}:
|
|
|
|
|
|
|
|
let
|
|
|
|
pname = "jan";
|
2024-09-26 11:04:55 +00:00
|
|
|
version = "0.5.4";
|
2024-02-29 20:09:43 +00:00
|
|
|
src = fetchurl {
|
|
|
|
url = "https://github.com/janhq/jan/releases/download/v${version}/jan-linux-x86_64-${version}.AppImage";
|
2024-09-26 11:04:55 +00:00
|
|
|
hash = "sha256-BrNfpf9v8yAs4y3vaPlqtOI9SE7IFfZm/CYegcuZT3c=";
|
2024-02-29 20:09:43 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
appimageContents = appimageTools.extractType2 { inherit pname version src; };
|
|
|
|
in
|
|
|
|
appimageTools.wrapType2 {
|
|
|
|
inherit pname version src;
|
|
|
|
|
|
|
|
extraInstallCommands = ''
|
|
|
|
install -Dm444 ${appimageContents}/jan.desktop -t $out/share/applications
|
|
|
|
substituteInPlace $out/share/applications/jan.desktop \
|
2024-04-21 15:54:59 +00:00
|
|
|
--replace-fail 'Exec=AppRun --no-sandbox %U' 'Exec=jan'
|
2024-02-29 20:09:43 +00:00
|
|
|
cp -r ${appimageContents}/usr/share/icons $out/share
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = {
|
|
|
|
changelog = "https://github.com/janhq/jan/releases/tag/v${version}";
|
|
|
|
description = "Jan is an open source alternative to ChatGPT that runs 100% offline on your computer";
|
|
|
|
homepage = "https://github.com/janhq/jan";
|
|
|
|
license = lib.licenses.agpl3Plus;
|
|
|
|
mainProgram = "jan";
|
2024-07-31 10:19:44 +00:00
|
|
|
maintainers = [ ];
|
2024-02-29 20:09:43 +00:00
|
|
|
platforms = lib.platforms.linux;
|
|
|
|
};
|
|
|
|
}
|