2024-04-21 15:54:59 +00:00
|
|
|
{ lib
|
|
|
|
, mupdf
|
|
|
|
, stdenv
|
|
|
|
, fetchFromGitHub
|
|
|
|
, substituteAll
|
|
|
|
, cmake
|
|
|
|
, qt6
|
|
|
|
, desktopToDarwinBundle
|
|
|
|
}:
|
|
|
|
|
|
|
|
let
|
|
|
|
mupdf-cxx = mupdf.override { enableCxx = true; };
|
|
|
|
in
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "librum";
|
|
|
|
version = "0.12.2";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "Librum-Reader";
|
|
|
|
repo = "Librum";
|
|
|
|
rev = "v.${version}";
|
|
|
|
fetchSubmodules = true;
|
|
|
|
hash = "sha256-Iwcbcz8LrznFP8rfW6mg9p7klAtTx4daFxylTeFKrH0=";
|
|
|
|
};
|
|
|
|
|
|
|
|
patches = [
|
|
|
|
(substituteAll {
|
|
|
|
src = ./use_mupdf_in_nixpkgs.patch;
|
|
|
|
nixMupdfLibPath = "${mupdf-cxx.out}/lib";
|
|
|
|
nixMupdfIncludePath = "${mupdf-cxx.dev}/include";
|
|
|
|
})
|
|
|
|
];
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
cmake
|
|
|
|
qt6.qttools
|
|
|
|
qt6.wrapQtAppsHook
|
2024-09-26 11:04:55 +00:00
|
|
|
] ++ lib.optionals stdenv.hostPlatform.isDarwin [
|
2024-04-21 15:54:59 +00:00
|
|
|
desktopToDarwinBundle
|
|
|
|
];
|
|
|
|
|
|
|
|
buildInputs = [
|
|
|
|
qt6.qtbase
|
|
|
|
qt6.qtsvg
|
2024-09-26 11:04:55 +00:00
|
|
|
] ++ lib.optionals stdenv.hostPlatform.isLinux [
|
2024-04-21 15:54:59 +00:00
|
|
|
qt6.qtwayland
|
|
|
|
];
|
|
|
|
|
|
|
|
meta = with lib; {
|
2024-06-20 14:57:18 +00:00
|
|
|
description = "Application designed to make reading enjoyable and straightforward";
|
2024-04-21 15:54:59 +00:00
|
|
|
longDescription = ''
|
|
|
|
Librum is an application designed to make reading enjoyable
|
|
|
|
and straightforward for everyone. It's not just an e-book
|
|
|
|
reader. With Librum, you can manage your own online library
|
|
|
|
and access it from any device anytime, anywhere. It has
|
|
|
|
features like note-taking, AI tooling, and highlighting,
|
|
|
|
while offering customization to make it as personal as you
|
|
|
|
want! Librum also provides free access to over 70,000 books
|
|
|
|
and personal reading statistics while being free and
|
|
|
|
completely open source.
|
|
|
|
'';
|
|
|
|
homepage = "https://librumreader.com";
|
2024-07-27 06:49:29 +00:00
|
|
|
changelog = "https://github.com/Librum-Reader/Librum/releases/tag/${src.rev}";
|
2024-04-21 15:54:59 +00:00
|
|
|
license = licenses.gpl3Plus;
|
|
|
|
mainProgram = "librum";
|
|
|
|
maintainers = with maintainers; [ aleksana oluceps ];
|
|
|
|
platforms = platforms.unix;
|
|
|
|
};
|
|
|
|
}
|