···11+# This file contains the base package, some of which is compiled.
22+# Runtime glue to optinal runtime dependencies is in 'default.nix'.
33+{ fetchurl, lib, qt5
44+55+# python deps
66+, python, buildPythonPackage
77+, alembic, beautifulsoup4, chardet, lxml, Mako, pyenchant
88+, pyqt5_with_qtwebkit, pyxdg, sip, sqlalchemy, sqlalchemy_migrate
99+}:
1010+1111+buildPythonPackage rec {
1212+ pname = "openlp";
1313+ version = "2.4.6";
1414+1515+ src = fetchurl {
1616+ url = "https://get.openlp.org/${version}/OpenLP-${version}.tar.gz";
1717+ sha256 = "f63dcf5f1f8a8199bf55e806b44066ad920d26c9cf67ae432eb8cdd1e761fc30";
1818+ };
1919+2020+ doCheck = false;
2121+ # FIXME: checks must be disabled because they are lacking the qt env.
2222+ # They fail like this, even if built and wrapped with all Qt and
2323+ # runtime dependencies:
2424+ #
2525+ # running install tests
2626+ # qt.qpa.plugin: Could not find the Qt platform plugin "xcb" in ""
2727+ # This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.
2828+ #
2929+ # Available platform plugins are: wayland-egl, wayland, wayland-xcomposite-egl, wayland-xcomposite-glx.
3030+ #
3131+ # See also https://discourse.nixos.org/t/qt-plugin-path-unset-in-test-phase/
3232+3333+ #checkInputs = [ mock nose ];
3434+ nativeBuildInputs = [ qt5.qttools ];
3535+ propagatedBuildInputs = [
3636+ alembic
3737+ beautifulsoup4
3838+ chardet
3939+ lxml
4040+ Mako
4141+ pyenchant
4242+ pyqt5_with_qtwebkit
4343+ pyxdg
4444+ sip
4545+ sqlalchemy
4646+ sqlalchemy_migrate
4747+ ];
4848+4949+ prePatch = ''
5050+ echo 'from vlc import *' > openlp/core/ui/media/vendor/vlc.py
5151+ '';
5252+5353+ dontWrapQtApps = true;
5454+ dontWrapGApps = true;
5555+ postInstall = ''
5656+ ( # use subshell because of cd
5757+ tdestdir="$out/i18n"
5858+ mkdir -p "$tdestdir"
5959+ cd ./resources/i18n
6060+ for file in *.ts; do
6161+ lconvert -i "$file" -o "$tdestdir/''${file%%ts}qm"
6262+ done
6363+ )
6464+ '';
6565+6666+ preFixup = ''
6767+ rm -r $out/${python.sitePackages}/tests
6868+ rm -r $out/bin
6969+ '';
7070+7171+ meta = with lib; {
7272+ description = "Free church presentation software";
7373+ homepage = "https://openlp.org/";
7474+ downloadPage = "https://openlp.org/#downloads";
7575+ platforms = platforms.unix;
7676+ license = licenses.gpl2Only;
7777+ maintainers = [ maintainers.jorsn ];
7878+7979+ longDescription = ''
8080+ OpenLP is a free church presentation software.
8181+8282+ Features:
8383+8484+ * Cross platform between Linux, Windows, OS X and FreeBSD
8585+ * Display songs, Bible verses, presentations, images, audio and video
8686+ * Control OpenLP remotely via the Android remote, iOS remote or mobile web browser
8787+ * Quickly and easily import songs from other popular presentation packages
8888+ * Easy enough to use to get up and running in less than 10 minutes
8989+9090+ Remark: This pkg only supports sqlite dbs. If you wish to have support for
9191+ mysql or postgresql dbs, or Jenkins, please contact the maintainer.
9292+9393+ Bugs which affect this software packaged in Nixpkgs:
9494+9595+ 1. The package must disable checks, because they are lacking the qt env.
9696+ (see pkg source and https://discourse.nixos.org/t/qt-plugin-path-unset-in-test-phase/)
9797+ 2. There is a segfault on exit. Not a real problem, according to debug log, everything
9898+ shuts down correctly. Maybe related to https://forums.openlp.org/discussion/3620/crash-on-exit.
9999+ Plan: Wait for OpenLP-3, since it is already in beta 1
100100+ (2021-02-09; news: https://openlp.org/blog/).
101101+ '';
102102+ };
103103+}