2021-02-22 00:14:54 +00:00
|
|
|
{ lib, stdenv, fetchFromGitHub, pantheon, vala, python3, python2, pkg-config, libxml2, meson, ninja, gtk3, glib, webkitgtk, libgee
|
2020-04-13 14:30:13 +01:00
|
|
|
, gobject-introspection, sqlite, poppler, poppler_utils, html2text, curl, gnugrep, coreutils, bash, unzip, unar, wrapGAppsHook
|
|
|
|
, appstream, desktop-file-utils }:
|
2018-09-08 08:39:14 +01:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "bookworm";
|
2020-04-13 14:30:13 +01:00
|
|
|
version = "1.1.2";
|
2018-09-08 08:39:14 +01:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "babluboy";
|
|
|
|
repo = pname;
|
2020-04-13 14:30:13 +01:00
|
|
|
rev = version;
|
|
|
|
sha256 = "0w0rlyahpgx0l6inkbj106agbnr2czil0vdcy1zzv70apnjz488j";
|
2018-09-08 08:39:14 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
2018-10-31 21:52:35 +00:00
|
|
|
bash
|
2018-12-02 11:41:15 +00:00
|
|
|
gobject-introspection
|
2018-09-08 08:39:14 +01:00
|
|
|
libxml2
|
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
|
2018-10-31 21:52:35 +00:00
|
|
|
python3
|
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 = [
|
|
|
|
pantheon.elementary-icon-theme
|
|
|
|
pantheon.granite
|
2018-09-08 08:39:14 +01:00
|
|
|
glib
|
2019-12-03 00:57:38 +00:00
|
|
|
libgee
|
2018-09-08 08:39:14 +01:00
|
|
|
gtk3
|
|
|
|
html2text
|
|
|
|
poppler
|
2018-10-31 21:52:35 +00:00
|
|
|
python2
|
2018-09-08 08:39:14 +01:00
|
|
|
sqlite
|
|
|
|
webkitgtk
|
2020-04-13 14:30:13 +01:00
|
|
|
appstream
|
|
|
|
desktop-file-utils
|
2018-09-08 08:39:14 +01:00
|
|
|
];
|
|
|
|
|
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
|
|
|
|
'';
|
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2018-09-08 08:39:14 +01:00
|
|
|
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.
|
|
|
|
'';
|
2020-04-01 02:11:51 +01:00
|
|
|
homepage = "https://babluboy.github.io/bookworm/";
|
2018-09-08 08:39:14 +01:00
|
|
|
license = licenses.gpl3Plus;
|
|
|
|
platforms = platforms.linux;
|
|
|
|
};
|
|
|
|
}
|