1{ lib, stdenv, fetchurl, appimageTools, makeDesktopItem }:
2
3stdenv.mkDerivation (finalAttrs: let
4 inherit (finalAttrs) pname version src appexec icon desktopItem;
5
6in
7{
8 pname = "remnote";
9 version = "1.12.64";
10
11 src = fetchurl {
12 url = "https://download.remnote.io/remnote-desktop/RemNote-${version}.AppImage";
13 hash = "sha256-Pvz3bBpv4wN2NXxuKNNraCuOqvvtYOyg5PTSwMpL3cw=";
14 };
15 appexec = appimageTools.wrapType2 {
16 inherit pname version src;
17 };
18 icon = fetchurl {
19 url = "https://www.remnote.io/icon.png";
20 hash = "sha256-r5D7fNefKPdjtmV7f/88Gn3tqeEG8LGuD4nHI/sCk94=";
21 };
22 desktopItem = makeDesktopItem {
23 type = "Application";
24 name = "remnote";
25 desktopName = "RemNote";
26 comment = "Spaced Repetition";
27 icon = "remnote";
28 exec = "remnote %u";
29 categories = [ "Office" ];
30 mimeTypes = [ "x-scheme-handler/remnote" "x-scheme-handler/rn" ];
31 };
32 dontUnpack = true;
33 dontConfigure = true;
34 dontBuild = true;
35 installPhase = ''
36 runHook preInstall
37
38 install -D ${appexec}/bin/remnote-${version} $out/bin/remnote
39 install -D "${desktopItem}/share/applications/"* -t $out/share/applications/
40 install -D ${icon} $out/share/pixmaps/remnote.png
41
42 runHook postInstall
43 '';
44 meta = with lib; {
45 description = "A note-taking application focused on learning and productivity";
46 homepage = "https://remnote.com/";
47 maintainers = with maintainers; [ max-niederman jgarcia ];
48 license = licenses.unfree;
49 platforms = [ "x86_64-linux" ];
50 mainProgram = "remnote";
51 };
52})