1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-12-17 02:14:36 +00:00
nixpkgs/pkgs/applications/office/bookworm/default.nix

76 lines
2.1 KiB
Nix
Raw Normal View History

2018-10-31 21:52:35 +00:00
{ stdenv, fetchFromGitHub, fetchpatch, vala_0_40, python3, python2, pkgconfig, libxml2, meson, ninja, gtk3, granite, gnome3
, gobjectIntrospection, sqlite, poppler, poppler_utils, html2text, curl, gnugrep, coreutils, bash, unzip, unar, wrapGAppsHook }:
2018-09-08 08:39:14 +01:00
stdenv.mkDerivation rec {
pname = "bookworm";
version = "unstable-2018-10-21";
2018-09-08 08:39:14 +01:00
src = fetchFromGitHub {
owner = "babluboy";
repo = pname;
2018-11-05 23:27:41 +00:00
rev = "4f7b118281667d22f1b3205edf0b775341fa49cb";
2018-10-31 21:52:35 +00:00
sha256 = "0bcyim87zk4b4xmgfs158lnds3y8jg7ppzw54kjpc9rh66fpn3b9";
2018-09-08 08:39:14 +01:00
};
2018-10-31 21:52:35 +00:00
# See: https://github.com/babluboy/bookworm/pull/220
patches = [
(fetchpatch {
url = "https://github.com/worldofpeace/bookworm/commit/b2faf685c46b95d6a2d4ec3725e4e4122b61e99a.patch";
sha256 = "14az86cj5j65hngfflrp1rmnrkdrhg2a8pl7www3jgfwasxay975";
})
];
2018-09-08 08:39:14 +01:00
nativeBuildInputs = [
2018-10-31 21:52:35 +00:00
bash
2018-09-08 08:39:14 +01:00
gobjectIntrospection
libxml2
2018-10-31 21:52:35 +00:00
meson
2018-09-08 08:39:14 +01:00
ninja
pkgconfig
2018-10-31 21:52:35 +00:00
python3
vala_0_40 # should be `elementary.vala` when elementary attribute set is merged
2018-09-08 08:39:14 +01:00
wrapGAppsHook
];
buildInputs = with gnome3; [
glib
2018-10-31 21:52:35 +00:00
gnome3.defaultIconTheme # should be `elementary.defaultIconTheme`when elementary attribute set is merged
2018-09-08 08:39:14 +01:00
granite
gtk3
html2text
libgee
poppler
2018-10-31 21:52:35 +00:00
python2
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+=(
2018-10-31 21:52:35 +00:00
--prefix PATH : "${stdenv.lib.makeBinPath [ unzip unar poppler_utils html2text coreutils curl gnugrep ]}"
--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
'';
2018-09-08 08:39:14 +01:00
meta = with stdenv.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;
};
}