btrbk: add mainProgram (#356350)
[NixPkgs.git] / pkgs / by-name / li / librum / package.nix
blob40158f72a120967d3957adefac82520540c5a799
1 { lib
2 , mupdf
3 , stdenv
4 , fetchFromGitHub
5 , substituteAll
6 , cmake
7 , qt6
8 , desktopToDarwinBundle
9 }:
11 let
12   mupdf-cxx = mupdf.override { enableCxx = true; };
14 stdenv.mkDerivation rec {
15   pname = "librum";
16   version = "0.12.2";
18   src = fetchFromGitHub {
19     owner = "Librum-Reader";
20     repo = "Librum";
21     rev = "v.${version}";
22     fetchSubmodules = true;
23     hash = "sha256-Iwcbcz8LrznFP8rfW6mg9p7klAtTx4daFxylTeFKrH0=";
24   };
26   patches = [
27     (substituteAll {
28       src = ./use_mupdf_in_nixpkgs.patch;
29       nixMupdfLibPath = "${mupdf-cxx.out}/lib";
30       nixMupdfIncludePath = "${mupdf-cxx.dev}/include";
31     })
32   ];
34   nativeBuildInputs = [
35     cmake
36     qt6.qttools
37     qt6.wrapQtAppsHook
38   ] ++ lib.optionals stdenv.hostPlatform.isDarwin [
39     desktopToDarwinBundle
40   ];
42   buildInputs = [
43     qt6.qtbase
44     qt6.qtsvg
45   ] ++ lib.optionals stdenv.hostPlatform.isLinux [
46     qt6.qtwayland
47   ];
49   meta = with lib; {
50     description = "Application designed to make reading enjoyable and straightforward";
51     longDescription = ''
52       Librum is an application designed to make reading enjoyable
53       and straightforward for everyone. It's not just an e-book
54       reader. With Librum, you can manage your own online library
55       and access it from any device anytime, anywhere. It has
56       features like note-taking, AI tooling, and highlighting,
57       while offering customization to make it as personal as you
58       want! Librum also provides free access to over 70,000 books
59       and personal reading statistics while being free and
60       completely open source.
61     '';
62     homepage = "https://librumreader.com";
63     changelog = "https://github.com/Librum-Reader/Librum/releases/tag/${src.rev}";
64     license = licenses.gpl3Plus;
65     mainProgram = "librum";
66     maintainers = with maintainers; [ aleksana oluceps ];
67     platforms = platforms.unix;
68   };