-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdefault.nix
60 lines (57 loc) · 1.71 KB
/
default.nix
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
{
stdenvNoCC,
nodejs,
esbuild,
fetchurl,
ungoogled-chromium,
lib,
makeDesktopItem,
runtimeShell,
symlinkJoin,
writeScriptBin,
# command line arguments which are always set e.g "--disable-gpu"
commandLineArgs ? [],
}: let
pname = "shikimori";
version = "0.1.0";
desktopItem = makeDesktopItem {
name = pname;
exec = pname;
icon = fetchurl {
name = "shikimori-logo.svg";
url = "https://raw.githubusercontent.com/shikimori/shikimori/a6205d375bd10b581a98e2c37f0d5a380d624c50/app/assets/images/src/favicon.svg";
sha256 = "sha256-JGuiJuqMSNopputLK8UBu7AeA3dZDG8A8SGJbX80Wp0=";
meta.license = lib.licenses.osl3;
};
desktopName = "Shikimori";
genericName = "Encyclopedia of anime, manga and light novels";
categories = ["TV" "AudioVideo" "Network"];
startupNotify = true;
};
script = let
shikiplayer = import ./shikiplayer.nix {inherit stdenvNoCC nodejs esbuild;};
in
writeScriptBin pname ''
#!${runtimeShell}
exec ${ungoogled-chromium}/bin/${ungoogled-chromium.meta.mainProgram} ${lib.escapeShellArgs commandLineArgs} \
--app=https://shikimori.one \
--load-extension=${shikiplayer} \
--no-first-run \
--no-default-browser-check \
--no-crash-upload \
"$@"
'';
meta = with lib; {
description = "Shikimori is a Russian-language encyclopedia of anime, manga and light novels";
homepage = "https://shikimori.one";
license = licenses.osl3;
platforms = ungoogled-chromium.meta.platforms or lib.platforms.all;
maintainers = with maintainers; [yunfachi];
mainProgram = "shikimori";
};
in
symlinkJoin {
inherit meta;
name = pname;
paths = [script desktopItem];
}