xepub: init at 1.0.1

This commit is contained in:
Bobby Rong
2026-09-17 23:09:44 +08:00
parent 8d44f5b7c1
commit d6880e9908
2 changed files with 76 additions and 0 deletions

View File

@@ -277,6 +277,7 @@ in
warpinator
# cinnamon xapp
xepub
xviewer
xreader
xed-editor

View File

@@ -0,0 +1,75 @@
{
stdenv,
lib,
fetchFromGitHub,
gobject-introspection,
meson,
ninja,
python3Packages,
wrapGAppsHook3,
glib,
gtk3,
python3,
webkitgtk_4_1,
xapp,
xapp-symbolic-icons,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "xepub";
version = "1.0.1";
src = fetchFromGitHub {
owner = "xapp-project";
repo = "xepub";
tag = finalAttrs.version;
hash = "sha256-kEhGBY6WyE+mpZn10Ll3GO+sCPwdGXbHqaziA9y7wZY=";
};
strictDeps = true;
__structuredAttrs = true;
nativeBuildInputs = [
gobject-introspection
meson
ninja
python3Packages.wrapPython
wrapGAppsHook3
];
buildInputs = [
glib
gtk3
python3
webkitgtk_4_1
xapp
];
pythonPath = with python3Packages; [
pygobject3
python-xapp
setproctitle
];
postPatch = ''
substituteInPlace meson.build --replace-fail "/usr/bin/python3" "python3"
'';
preFixup = ''
buildPythonPath "$out ''${pythonPath[*]}"
gappsWrapperArgs+=(
--prefix PYTHONPATH : "$program_PYTHONPATH"
--prefix XDG_DATA_DIRS : "${lib.makeSearchPath "share" [ xapp-symbolic-icons ]}"
)
'';
meta = {
description = "EPUB reader for Linux desktops";
mainProgram = "xepub";
homepage = "https://github.com/xapp-project/xepub";
license = lib.licenses.gpl3Plus;
platforms = lib.platforms.linux;
teams = [ lib.teams.cinnamon ];
};
})