diff --git a/nixos/modules/services/x11/desktop-managers/cinnamon.nix b/nixos/modules/services/x11/desktop-managers/cinnamon.nix index 1fb9a39782e7..b356c55ec122 100644 --- a/nixos/modules/services/x11/desktop-managers/cinnamon.nix +++ b/nixos/modules/services/x11/desktop-managers/cinnamon.nix @@ -277,6 +277,7 @@ in warpinator # cinnamon xapp + xepub xviewer xreader xed-editor diff --git a/pkgs/by-name/xe/xepub/package.nix b/pkgs/by-name/xe/xepub/package.nix new file mode 100644 index 000000000000..050933651aa2 --- /dev/null +++ b/pkgs/by-name/xe/xepub/package.nix @@ -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 ]; + }; +})