2022-03-22 11:19:39 +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
|
|
|
|
, wrapGAppsHook
|
|
|
|
}:
|
2018-09-08 08:39:14 +01:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "bookworm";
|
2022-03-22 11:19:39 +00:00
|
|
|
version = "unstable-2022-01-09";
|
2018-09-08 08:39:14 +01:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "babluboy";
|
|
|
|
repo = pname;
|
2022-03-22 11:19:39 +00:00
|
|
|
rev = "f3df858ce748a6bbc43f03a6e261ff76a6d7d303";
|
|
|
|
hash = "sha256-mLyJfblF5WnWBV3rX1ZRupccou4t5mBpo3W7+ECNMVI=";
|
2018-09-08 08:39:14 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
2018-10-31 21:52:35 +00:00
|
|
|
meson
|
2018-09-08 08:39:14 +01:00
|
|
|
ninja
|
2021-01-17 02:09:27 +00:00
|
|
|
pkg-config
|
2019-10-10 03:47:37 +01:00
|
|
|
vala
|
2018-09-08 08:39:14 +01:00
|
|
|
wrapGAppsHook
|
|
|
|
];
|
|
|
|
|
2018-08-20 21:31:18 +01:00
|
|
|
buildInputs = [
|
2022-03-22 11:19:39 +00:00
|
|
|
appstream
|
|
|
|
desktop-file-utils
|
2018-09-08 08:39:14 +01:00
|
|
|
glib
|
2022-03-22 11:19:39 +00:00
|
|
|
gobject-introspection
|
2018-09-08 08:39:14 +01:00
|
|
|
gtk3
|
|
|
|
html2text
|
2022-03-22 11:19:39 +00:00
|
|
|
libgee
|
|
|
|
libxml2
|
|
|
|
pantheon.granite
|
2018-09-08 08:39:14 +01:00
|
|
|
poppler
|
2022-03-22 11:19:39 +00:00
|
|
|
python3
|
2018-09-08 08:39:14 +01:00
|
|
|
sqlite
|
|
|
|
webkitgtk
|
|
|
|
];
|
|
|
|
|
2018-10-31 21:52:35 +00:00
|
|
|
postPatch = ''
|
|
|
|
chmod +x meson/post_install.py
|
|
|
|
patchShebangs meson/post_install.py
|
|
|
|
'';
|
|
|
|
|
|
|
|
# These programs are expected in PATH from the source code and scripts
|
2018-09-08 08:39:14 +01:00
|
|
|
preFixup = ''
|
|
|
|
gappsWrapperArgs+=(
|
2021-01-15 05:42:41 +00:00
|
|
|
--prefix PATH : "${lib.makeBinPath [ unzip unar poppler_utils html2text coreutils curl gnugrep ]}"
|
2018-10-31 21:52:35 +00:00
|
|
|
--prefix PATH : $out/bin
|
2018-09-08 08:39:14 +01:00
|
|
|
)
|
|
|
|
'';
|
|
|
|
|
2018-10-31 21:52:35 +00:00
|
|
|
postFixup = ''
|
|
|
|
patchShebangs $out/share/bookworm/scripts/mobi_lib/*.py
|
|
|
|
patchShebangs $out/share/bookworm/scripts/tasks/*.sh
|
|
|
|
'';
|
|
|
|
|
2022-03-22 11:19:39 +00:00
|
|
|
meta = with lib; {
|
|
|
|
description = "A simple, focused eBook reader";
|
|
|
|
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;
|
|
|
|
};
|
|
|
|
}
|