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