1{ lib, appimageTools, fetchurl }:
2
3let
4 version = "0.7.2";
5 pname = "devdocs-desktop";
6
7 src = fetchurl {
8 url = "https://github.com/egoist/devdocs-desktop/releases/download/v${version}/DevDocs-${version}.AppImage";
9 sha256 = "sha256-4ugpzh0Dweae6tKb6uqRhEW9HT+iVIo8MQRbVKTdRFw=";
10 };
11
12 appimageContents = appimageTools.extractType2 {
13 inherit pname version src;
14 };
15
16in appimageTools.wrapType2 rec {
17 inherit pname version src;
18
19 extraInstallCommands = ''
20 install -m 444 -D ${appimageContents}/devdocs.desktop $out/share/applications/devdocs.desktop
21 install -m 444 -D ${appimageContents}/devdocs.png $out/share/icons/hicolor/0x0/apps/devdocs.png
22 substituteInPlace $out/share/applications/devdocs.desktop \
23 --replace 'Exec=AppRun' 'Exec=${pname}'
24 '';
25
26 meta = with lib; {
27 description = "Full-featured desktop app for DevDocs.io";
28 longDescription = ''
29 DevDocs.io combines multiple API documentations in a fast, organized, and searchable interface. This is an unofficial desktop app for it.
30 '';
31 homepage = "https://github.com/egoist/devdocs-desktop";
32 downloadPage = "https://github.com/egoist/devdocs-desktop/releases";
33 license = licenses.mit;
34 maintainers = with maintainers; [ ymarkus ];
35 platforms = [ "x86_64-linux" ];
36 mainProgram = "devdocs-desktop";
37 };
38}