2022-03-30 09:31:56 +00:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
|
|
|
, fetchFromGitHub
|
|
|
|
, appstream
|
|
|
|
, coreutils
|
|
|
|
, curl
|
|
|
|
, desktop-file-utils
|
|
|
|
, glib
|
|
|
|
, gnugrep
|
|
|
|
, gobject-introspection
|
|
|
|
, gtk3
|
|
|
|
, html2text
|
|
|
|
, libgee
|
|
|
|
, libxml2
|
|
|
|
, meson
|
|
|
|
, ninja
|
|
|
|
, pantheon
|
|
|
|
, pkg-config
|
|
|
|
, poppler
|
|
|
|
, poppler_utils
|
|
|
|
, python3
|
|
|
|
, sqlite
|
|
|
|
, unar
|
|
|
|
, unzip
|
|
|
|
, vala
|
|
|
|
, webkitgtk
|
2024-05-15 15:35:15 +00:00
|
|
|
, wrapGAppsHook3
|
2022-03-30 09:31:56 +00:00
|
|
|
}:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "bookworm";
|
2022-03-30 09:31:56 +00:00
|
|
|
version = "unstable-2022-01-09";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "babluboy";
|
|
|
|
repo = pname;
|
2022-03-30 09:31:56 +00:00
|
|
|
rev = "f3df858ce748a6bbc43f03a6e261ff76a6d7d303";
|
|
|
|
hash = "sha256-mLyJfblF5WnWBV3rX1ZRupccou4t5mBpo3W7+ECNMVI=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
meson
|
|
|
|
ninja
|
2021-02-05 17:12:51 +00:00
|
|
|
pkg-config
|
2020-04-24 23:36:52 +00:00
|
|
|
vala
|
2024-05-15 15:35:15 +00:00
|
|
|
wrapGAppsHook3
|
2023-08-10 07:59:29 +00:00
|
|
|
gobject-introspection
|
2020-04-24 23:36:52 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
buildInputs = [
|
2022-03-30 09:31:56 +00:00
|
|
|
appstream
|
|
|
|
desktop-file-utils
|
2020-04-24 23:36:52 +00:00
|
|
|
glib
|
|
|
|
gtk3
|
|
|
|
html2text
|
2022-03-30 09:31:56 +00:00
|
|
|
libgee
|
|
|
|
libxml2
|
|
|
|
pantheon.granite
|
2020-04-24 23:36:52 +00:00
|
|
|
poppler
|
2022-03-30 09:31:56 +00:00
|
|
|
python3
|
2020-04-24 23:36:52 +00:00
|
|
|
sqlite
|
|
|
|
webkitgtk
|
|
|
|
];
|
|
|
|
|
|
|
|
postPatch = ''
|
|
|
|
chmod +x meson/post_install.py
|
|
|
|
patchShebangs meson/post_install.py
|
|
|
|
'';
|
|
|
|
|
|
|
|
# These programs are expected in PATH from the source code and scripts
|
|
|
|
preFixup = ''
|
|
|
|
gappsWrapperArgs+=(
|
2021-01-15 22:18:51 +00:00
|
|
|
--prefix PATH : "${lib.makeBinPath [ unzip unar poppler_utils html2text coreutils curl gnugrep ]}"
|
2020-04-24 23:36:52 +00:00
|
|
|
--prefix PATH : $out/bin
|
|
|
|
)
|
|
|
|
'';
|
|
|
|
|
|
|
|
postFixup = ''
|
|
|
|
patchShebangs $out/share/bookworm/scripts/mobi_lib/*.py
|
|
|
|
patchShebangs $out/share/bookworm/scripts/tasks/*.sh
|
|
|
|
'';
|
|
|
|
|
2022-03-30 09:31:56 +00:00
|
|
|
meta = with lib; {
|
|
|
|
description = "A simple, focused eBook reader";
|
2024-04-21 15:54:59 +00:00
|
|
|
mainProgram = "com.github.babluboy.bookworm";
|
2022-03-30 09:31:56 +00:00
|
|
|
longDescription = ''
|
|
|
|
Read the books you love without having to worry about different format complexities like epub, pdf, mobi, cbr, etc.
|
|
|
|
'';
|
|
|
|
homepage = "https://babluboy.github.io/bookworm/";
|
|
|
|
license = licenses.gpl3Plus;
|
|
|
|
platforms = platforms.linux;
|
|
|
|
};
|
|
|
|
}
|