nixpkgs/pkgs/applications/office/bookworm/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

94 lines
1.8 KiB
Nix
Raw Normal View History

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 07:39:14 +00:00
stdenv.mkDerivation rec {
pname = "bookworm";
2022-03-22 11:19:39 +00:00
version = "unstable-2022-01-09";
2018-09-08 07:39:14 +00:00
src = fetchFromGitHub {
owner = "babluboy";
repo = pname;
2022-03-22 11:19:39 +00:00
rev = "f3df858ce748a6bbc43f03a6e261ff76a6d7d303";
hash = "sha256-mLyJfblF5WnWBV3rX1ZRupccou4t5mBpo3W7+ECNMVI=";
2018-09-08 07:39:14 +00:00
};
nativeBuildInputs = [
2018-10-31 21:52:35 +00:00
meson
2018-09-08 07:39:14 +00:00
ninja
pkg-config
vala
2018-09-08 07:39:14 +00:00
wrapGAppsHook
gobject-introspection
2018-09-08 07:39:14 +00:00
];
2018-08-20 20:31:18 +00:00
buildInputs = [
2022-03-22 11:19:39 +00:00
appstream
desktop-file-utils
2018-09-08 07:39:14 +00:00
glib
gtk3
html2text
2022-03-22 11:19:39 +00:00
libgee
libxml2
pantheon.granite
2018-09-08 07:39:14 +00:00
poppler
2022-03-22 11:19:39 +00:00
python3
2018-09-08 07:39:14 +00: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 07:39:14 +00: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 07:39:14 +00: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";
mainProgram = "com.github.babluboy.bookworm";
2022-03-22 11:19:39 +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;
};
}