fantasia-archive: init

inky
Elnu 2 years ago
parent 6e3221fddf
commit d36de05488

@ -19,6 +19,8 @@ in
../modules/startpage ../modules/startpage
../modules/terminal ../modules/terminal
../modules/todo-txt ../modules/todo-txt
../modules/fantasia-archive
]; ];
home.file."./.background-image".source = theme.wallpaper; home.file."./.background-image".source = theme.wallpaper;

@ -0,0 +1,7 @@
{ config, lib, pkgs, ... }:
{
home.packages = with pkgs; [
(pkgs.callPackage ./fantasia-archive.nix {})
];
}

@ -0,0 +1,50 @@
{ lib
, fetchzip
, appimageTools
, makeDesktopItem
}:
let
pname = "fantasia-archive";
version = "0.1.10";
archive = fetchzip {
url = "https://github.com/Elvanos/fantasia-archive/releases/download/v${version}/Fantasia.Archive-${version}-linux-appImage.zip";
hash = "sha256-Ls+7wmj2qFoppiHJwt9Uan+9irFvzHxEWjIWrA9Nw2w=";
};
src = "${archive}/Fantasia.Archive-${version}-linux-appImage.AppImage";
appimageContents = appimageTools.extractType2 {
inherit pname src version;
};
description = "100% free, powerful & feature-rich offline worldbuilding tool that runs on your computer!";
desktopItem = makeDesktopItem {
name = pname;
exec = "sh -c \"${pname} || ${pname} --disable-gpu-sandbox\"";
icon = "${appimageContents}/fantasiaarchive.png";
comment = description;
desktopName = "Fantasia Archive";
genericName = "A database manager for world building";
categories = [ "Office" ];
};
in
appimageTools.wrapType2 {
inherit pname version src;
extraInstallCommands = ''
mkdir -p $out/share/applications
ln -s ${desktopItem}/share/applications/${pname}.desktop $out/share/applications/${pname}.desktop
cd $out/bin
mv fantasia-archive-${version} ${pname}
'';
meta = with lib; {
inherit description;
homepage = "https://fantasiaarchive.com/";
license = licenses.gpl3;
maintainers = with maintainers; [ elnudev ];
platforms = [ "x86_64-linux" ];
sourceProvenance = [ lib.sourceTypes.binaryNativeCode ];
};
}
Loading…
Cancel
Save