Merge pull request #287000 from drupol/init/jan-0-4-6
jan: init at 0.4.6
This commit is contained in:
commit
6dbda4cd94
36
pkgs/by-name/ja/jan/package.nix
Normal file
36
pkgs/by-name/ja/jan/package.nix
Normal file
@ -0,0 +1,36 @@
|
||||
{ lib
|
||||
, appimageTools
|
||||
, fetchurl
|
||||
}:
|
||||
|
||||
let
|
||||
pname = "jan";
|
||||
version = "0.4.6";
|
||||
src = fetchurl {
|
||||
url = "https://github.com/janhq/jan/releases/download/v${version}/jan-linux-x86_64-${version}.AppImage";
|
||||
hash = "sha256-/FYaFyp028CeEFfrxNnj67/z7FoOwU0wC2V56mACD5Q=";
|
||||
};
|
||||
|
||||
appimageContents = appimageTools.extractType2 { inherit pname version src; };
|
||||
in
|
||||
appimageTools.wrapType2 {
|
||||
inherit pname version src;
|
||||
|
||||
extraInstallCommands = ''
|
||||
mv $out/bin/jan-${version} $out/bin/jan
|
||||
install -Dm444 ${appimageContents}/jan.desktop -t $out/share/applications
|
||||
substituteInPlace $out/share/applications/jan.desktop \
|
||||
--replace 'Exec=AppRun --no-sandbox %U' 'Exec=jan'
|
||||
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";
|
||||
maintainers = with lib.maintainers; [ drupol ];
|
||||
platforms = lib.platforms.linux;
|
||||
};
|
||||
}
|
Loading…
Reference in New Issue
Block a user